Tic Tac Toe powered by Ruby and the Sinatra framework. You play as player “x” against an intelligent computer. This app is hosted live at this link.
I built this from scratch, with the exception of the Sinatra framework. Keep in mind that this app is entirely server-based, so there is no JavaScript or event handling. Instead, it uses a form with invisible buttons that send a POST request to the server when an empty square is clicked.
- Clone this repository (
git clone https://github.com/johnisom/sinatra_ttt
) cd
into this repository (cd sinatra_ttt
)- Install dependencies (
bundle install
)- If you don’t have ruby-2.6.5, install it
- Run the server locally (
bundle exec rackup
) - Enjoy playing tic-tac-toe at http://localhost:9292/