Skip to content

DcRonan/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OOP (Object Oriented Programming) - Tic Tac Toe

Microverse

Library Directory

Contents
Built With
Live Demo
Run Tests
Authors
License

Description

In this project, we created a playable Tic Tac Toe game. For a live demo, please follow the link below.

gif

Game Instructions

Tic Tac Toe is a game that involves having 2 players against one another and to win you will need to either get your nought O or cross X in a line of 3.

If you prefer to get quick access to the game, then please click the button on the 'Live Demo' section!

Steps

1. Open the command prompt and to the Tic Tac Toe main directory
2. Run 'ruby bin/main'
3. Click 'Enter' to start
4. Player 1 enter your name(The first player will be 'X')
5. Player 2 enter your name
6. To take your first move, enter a number between 1-9(1 being the top left and 3 being the top right, 4 being the middle left and 6 being the middle right)
7. If a player has chosen an invalid number or an already chosen number, it will ask you to enter a valid number
8. When a player has completed a consecutive 3 line of 'X' or 'O', it will prompt that player that he or she is the winner
9. If no one is a winner, it will prompt that it is a draw!

Built With

- Ruby 2.7
- VS Code
- Rubocop 0.81.0

Live Demo

Click on the button below..

Run on Repl.it

Getting Started

Install

To get this working on your local computer, follow the steps below!

1. Install Ruby
2. Open the Terminal
3. Download code by entering 'git clone https://github.com/DcRonan/Tic-Tac-Toe.git' in the terminal
4. Run 'cd Tic-Tac-Toe' to enter the main directory
4. Run 'bundle install'

Run

1. Open the terminal
2. Run 'cd Tic-Tac-Toe' to enter the main directory
3. Run 'cd bin/' to enter file directory
4. Run 'ruby main' to start the game

Tests

Install

1. Open a terminal
2. Run 'gem install rspec'
3. Run 'cd Tic-Tac-Toe'
4. Run rspec --init’ to install rspec in the directory

Run

1. Run 'rspec' in the terminal
2. In the terminal, you should see if the tests pass or fail like so:

img

Authors

👨‍💻 Daniel Ronan

GitHub
LINKEDIN
EMAIL
TWITTER

👨‍💻 - Bello Babakolo

GitHub
LINKEDIN
EMAIL
TWITTER

🤝 Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

License

Cocoapods

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages