Giter Club home page Giter Club logo

tanhongit / rails-tic-tac-toe-project Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 1.49 MB

This is the tic tac toe game with multiple modes: play with AI, two-player mode with lots of customization, invincible mode.

Home Page: https://railstictactoe.herokuapp.com/

License: MIT License

Ruby 51.26% JavaScript 3.63% CSS 0.70% HTML 38.69% SCSS 5.73%
rails rails-tic-tac-toe tanhongit-rails tictactoe-game tictactoe tic-tac-toe tic-tac-toe-rails tic-tac-toe-game p5js p5js-tic-tac-toe tic-tac-toe-invincible minimax-algorithm tanhongit-game javascript

rails-tic-tac-toe-project's Introduction

Welcome to Rails Tic-Tac-Toe Project

This is the tic tac toe game with multiple modes: play with AI, two-player mode with lots of customization, invincible mode.

Demo

You can try it at https://railstictactoe.herokuapp.com

Support for me

Support this project ๐Ÿ˜œ ๐Ÿ™

PayPal buymeacoffee TanHongIT

1. Technology

  • Ruby on Rails

2. Configuration requirements

We are going to build the web application using:

  • Rails 6.0.3.2
  • Ruby 2.7.1

3. Modes

  • Play Rank with AI
  • Invincible mode
  • Two-player mode

4. Runing

4.1. Clone Repo

$ git clone https://github.com/TanHongIT/rails-tic-tac-toe-project
$ cd rails-tic-tac-toe-project

4.2. Bundle Install

$ bundle install

4.3. Yarn Install

$ yarn install

4.4. Create database with Postgresql

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!

4.5. run rails db:migrate

$ rails db:migrate

4.6. Run server

$ rails s

Now go to http://localhost:3000

5. Images demo

HomePage.

Image

Play Rank With AI.

Image

High Score Rank Screen.

Image

Two-player Mode.

Image

Two-player Mode customization.

Image

Invincible mode.

Image

Read more: Tic Tac Toe Invincible with Javascript, HTML, CSS : https://github.com/TanHongIT/JavaScript-Tic-Tac-Toe-Project

rails-tic-tac-toe-project's People

Contributors

tanhongit avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.