This repository contains a tiny (kinda) game implemented in Prolog just for training.
Unless, of course, you can say "a game" about "an algorithm".
The essence of the game consists in removing things off the table.
In one move, a player can pick up one, two or three matches. Whoever is forced to pick up the last match loses.
The algorithm is designed in such a way that there is only one single combination of moves that allows you to beat the computer.
- Copy the code.
- Paste copied code here.
- Type
play
into the terminal. - Press Run.
- Enjoy!