this is a simple tic-toc-toe game server.
ruby 3.2.2
- Database initialization the database is sqlite3, so you don't need to install any database server.
rails db:migrate
- Deployment instructions
bundle install
rails db:migrate
rails s -p 3001
there is three tables in the database.
Player table
| id | name | username | is_bot | created_at | updated_at |
Game table
| id | player_one_id | player_two_id | winner_id | status | game_type | created_at | updated_at |
Move table
| id | game_id | player_id | position | created_at | updated_at |
there is a postman collection in the root directory of the project.
tictoc.postman_collection.json
the game bot is not smart, it just play randomly. bot is handled in front-end side, so you can play with bot in the front-end side. bot algorith is poor minmax.