🎮 TicTacToeMaster is a Ruby gem for playing Tic Tac Toe.
It supports both console interface and easy integration into web applications.
- Simple console interface (
UI::ConsoleUI) for quick play in the terminal - Flexible structure to add other UIs (e.g.,
UI::WebUI) - Supports two players with names and symbols
XandO - Checks for win, draw, and invalid moves
- Clean, testable code with RSpec
Add this line to your application's Gemfile:
gem 'tic_tac_toe_master'Or install it yourself as:
gem install tic_tac_toe_masterTo start playing just type in console:
tic_tac_toerequire 'tic_tac_toe_master'
# Start the game in console
TicTacToeMaster.start- Add UI::WebUI for integration with Rails or Sinatra
- Add AI for playing against the computer
- Support customizable board size and symbols
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the TicTacToeMaster project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.