Tic Tac Toe in Ruby for 8th Light
AI uses a recursive algorithim similar to minimax on hard difficulty and has predetermined behavior on Easy.
To play the game, run Main.rb and follow the instructions.
Rspec tests included, files ending with Spec.rb
To Run tests navigate to base directory and run rake
TicTacToe.rb -- Manages the board, checks for victory, keeps track of the games status, move function allows the player to place boards.
Computer.rb -- Handles the easy difficulty computer, simple logic, Turn is the only function that needs to be public.
Main.rb -- Handles the main (function calls to start the game) and allows the player to pick the difficulty. RUN Main.rb to play
Game.rb -- Allows the user to interact with the game, also displays all text.
RecursiveComputer.rb -- The Hard difficulty computer, uses plays out every game tree and evaluates the board.
=========================