Skip to content

Tic Tac Toe Microverse's Project with testing.

License

Notifications You must be signed in to change notification settings

t-yanick/Tic-Tac-Toe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧐 Tic Tac Toe

This is the third collaborative project from the Ruby module from the Microverse program it consists on 5 Milestones, in where we will recreate the well known Tic Tac Toe game with User Interface, Game Logic, and OOP principles, we also are going to incorporate some test driven development at the end of the project.

Game rules:

  • The instructions of the game are displayed at the beginning of the game. The game board consists of 3 by 3 grid and 9 locations. screenshot 1
  • Two players are requested to enter their name. screenshot 2
  • The players can choose between the 'X' or 'O' mark, the player that makes the first move is chosen randomly. screenshot 3
  • You only can enter numbers from 1 to 9, no letters allowed and no player can move in a place which is already taken. screenshot 4
  • The game board will check for a winner after the first 4 moves and if no player wins it's a draw. screenshot 5
  • Players can choose to play again and set the players with new values.

🔧 Built With

  • Ruby.
  • Using Rubocop Linters.
  • OOP.

🔴 Live Demo

Live Demo Link

🛠 Getting Started

Install

Besides the live demo link, you can run those functions in you own local environment. In order to run, you need to install Ruby in your computer. For windows you can go to Ruby installer and for MAC and LINUX you can go to Ruby official site for intructions on how to intall it. Then you can clone the project by typing git clone https://github.com/Ceci007/Tic-Tac-Toe.git

To get a local copy up and running follow these simple example steps.

  • Go to the main page of te repo.
  • Press the "Code" button and get the repo link.
  • Clone it using git.

Run the game

Type bin/main.rb in the root file of the project. You can also type ruby bin/main.rb in the root file of the project.

Running tests with Rspec

This game was tested with Rspec wich is a computer domain-specific language (DSL) testing tool written in programming language Ruby to test Ruby code. It is a behavior-driven development (BDD) framework which is extensively used in production applications.

How to get Rspec running

  • In the terminal, type gem install rspec
  • Once done, go to project directory and type rspec --init
  • You will see a folder spec and a file .rspec
  • Inside spec folder you'll see a spec_helper.rb file.
  • In the terminal, type rspec

Rspec output

screenshot 6

✒️ Authors

👤 Cecilia Benitez

👤 John Elvis Duran

👤 Tazoh Yanick

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

📝 License

This project is MIT licensed.

About

Tic Tac Toe Microverse's Project with testing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Ruby 100.0%