Skip to content

An example of object oriented programming by using Ruby

Notifications You must be signed in to change notification settings

ozovalihasan/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tic-tac-toe

This is a project in the Main Ruby curriculum at Microverse - @microverseinc .

tic_tac_toe_game

Built With

  • Ruby
  • Rspec

Description

The task was to implement a Tic Tac Toe game.

This project is mainly about

  • Object Oriented Programming
  • The DRY rule

How to Play the Game

  • Clone this github repo onto your local machine

  • In the terminal move to the home directory of this repo

  • Type the following commands

    cd bin 
    ./main
    
  • Alternatively, you can create an executable script main (Read About How to Create an Executable Script)

  • In order to play the Tic Tac Toe game just run the executable script in the terminal by typing main and follow the prompt
    main
    

Rules of the Game

  • Players' names can be entered at the beginning of the game
  • Players can choose 'X' or 'O' as a symbol
  • To win the game, three identical symbols must be next to each other vertically, horizontally, or diagonally. If there is a winner, the winner will be announced as "WINNER"
  • If no one has won by the end of ninth turn, the game will be ended as a "DRAW"

For more information check Wikipedia

Live Demo

Run on Repl.it

Testing

To test the project

  1. Navigate to the directory where the project is located.
  2. Open terminal in this directory.
  3. Install RSpec by using gem install rspec command.
  4. Start testing by using rspec command.

Authors

👤 Marylene Sawyer

👤 Hasan Özovalı

👤 Prajwal Thapa

📝 License

This project is MIT licensed.

Releases

No releases published

Packages

No packages published

Languages