This is a game of Tic Tac Toe. It can be played against another human or against a Computer.
The Computer will win if he has the opportunity and will NEVER lose! :)
The Computer can use to make the best decision a rule based or the minimax algorithm.
git clone git@github.com:MihaiLiviuCojocar/unbeatable-tic-tac-toe.git
cd unbeatable-tic-tac-toe
bundle install
run rackup
Click here.
Have fun! :)
rspec
cucumber
When run cucumber features/computer_is_unbeatable.feature
then you shoud see something like this(!! this test is run 500 times !!):