![]() |
Forum Index : Microcontroller and PC projects : CMM2: Game: BoxDot - Connect dots, make squares, triumph!
Author | Message | ||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
Here is a little diversion, good for testing your shiny new CMM2 mouse. (No mouse, no play) A CMM2 version of the classic pencil and paper game Dots & Boxes. Adjust the mouse I2C port in line 18 to suit your setup. Mine uses the Nunchuk port on the front so it's set to 3. Yours will likely be different. Program ENDs on lines 35 and 157, in case someone needs to know... ![]() At this point, the computer AI is anything but. It will ruthlessly take every opportunity given it to capture squares, and it will never give away squares if it has a choice, but when it must give away a square, its choices can be extremely poor. Maybe in the future, it will be made smarter... Visit Vegipete's *Mite Library for cool programs. |
||||
Sasquatch![]() Guru ![]() Joined: 08/05/2020 Location: United StatesPosts: 377 |
Another excellent puzzle game by VegiPete! ![]() I can confirm that it works well with both the HobbyTronics-USB Mouse module as well as the Arduino-PS2 Mouse interface. I haven't had much time to play lately but so far it seems great! Edited 2020-10-31 06:57 by Sasquatch -Carl |
||||
vegipete![]() Guru ![]() Joined: 29/01/2013 Location: CanadaPosts: 1132 |
Here is an update that makes the computer much smarter. You can choose "Easy" which plays the same as before, and "Hard" which checks all moves before giving away squares. Note that there is no indication when the computer is thinking - you just have to wait for it. A big think can take almost 15 seconds. boxdot04.zip Visit Vegipete's *Mite Library for cool programs. |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |