The simple board game Tic-Tac-Toe served as an exercise for my first Android application.
The application has been developed using the MVVM (Model-View-View Model) pattern. The actual model class provides access to the state of the current Tic-Tac-Toe game via events published via rxjava.
The view model observes the game model and controls the actual view displaying the state of the game. Inputs from human players or the computer AI are fed into the model to advance the game.
As a result, the whole game logic is fully reactive, either based on user input or events generated from the game model.
Additionally, the human player can compete against an unbeatable AI using the minimax algorithm with alpha-beta pruning.