Game: various *mites: Four Equals Ten
| Author | Message | ||||
| vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1182 |
Greetings All, Here is a silly little arithmetic game based on the app 4 = 10 (which is available for various mobile devices.) My version is a bit easier than the app version in that mine allows all arithmetic operations to be used to solve each problem. The app version occasionally denies the use some operations, making some problems more difficult. I may add that feature in the future. This has been tested on the CMM2, PicoMiteVGA and MMB4W. It should run on a PicoMite with a properly configured 320x240 LCD screen. If someone tests this, please let me know of the results. The object of the game is to use simple arithmetic and (one set of) brackets to create an expression with four given digits that equal 10. You can use the digits in any order, and you can use whichever math operations you like. Only one set of brackets is available, so something like (7-2)*(3-1) is not allowed. Instead, in this case, 7*2-3-1 is a solution. Using brackets is optional, although some problems can only be solved with carefully placed brackets. The order of operations is of course very important. For example, given the 4 digits 1 2 3 4, the expression 1+2+3+4 equals 10. Many problems have more than one solution. For example, 1*3*4-2 is an equally valid solution. The BackSpace key allows you to delete your expression character by character if required. Have fun! ===================== edit: Oops, sorry folks, there's a bug in the program, results in nesting error after level 39 on the PicoMiteVGA. I'll fix it shortly and upload a new version. (Caused by the improper use of EXIT DO in lines 143 and 144, which occurred when the ShowCurrent subroutine was created.) ===================== ![]() FourTen v0.2.zip PS: There is extra code in the program that some might find useful. I'll let you explore and see what you can find... Edited 2023-01-12 16:13 by vegipete Visit Vegipete's *Mite Library for cool programs. |
||||