Go Down

Topic: TicTacToe Decision Engine Library (Read 875 times) previous topic - next topic


Jan 18, 2015, 05:40 am Last Edit: Jan 21, 2015, 09:27 pm by marco_c
A library for playing TTT against the Arduino (computer moves).

The motivation for this library was to explore the separation between the algorithm for managing a game and the user interface for the game. Discovering a TicTacToe algorithm simple enough to implement on the Arduino allowed an exploration of this concept with simple user interface requirements.

The code implements an elegant algorithm that is briefly described  here with some additional features to make decisions easier to implement in code.

The integration between game library and user interface is largely implemented through a callback function that allows the user program to update each game cell as the game progresses, without needing detailed knowledge of the game board and current positions. The example programs supplied provide a framework that can be changed for alternative user interfaces.

Direct link to the library release or visit my code repository link in the signature below.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Go Up