This is the tic tac toe game with multiple modes: play with AI, two-player mode with lots of customization, invincible mode.
You can try it at https://railstictactoe.herokuapp.com
Support this project π π
- Ruby on Rails
We are going to build the web application using:
- Rails 6.0.3.2
- Ruby 2.7.1
- Play Rank with AI
- Invincible mode
- Two-player mode
$ git clone https://github.com/TanHongIT/rails-tic-tac-toe-project
$ cd rails-tic-tac-toe-project
$ bundle install
$ yarn install
You must change the appropriate database configuration
Change configuration at "config/database.yml" with Postgresql.
default: &default
adapter: postgresql
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
username: railstictactoe
password: 1234
host: localhost
# tutorial for ubuntu linux:
# sudo -u postgres psql
# create user "railstictactoe" with password '1234';
# create database "railstictactoe" owner "railstictactoe";
development:
<<: *default
database: railstictactoe
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: railstictactoe_test
production:
<<: *default
database: railstictactoe_production
You must change the username, password and database name accordingly!
$ rails db:migrate
$ rails s
Now go to http://localhost:3000
Read more: Tic Tac Toe Invincible with Javascript, HTML, CSS : https://github.com/TanHongIT/JavaScript-Tic-Tac-Toe-Project