An open API service indexing awesome lists of open source software.

https://github.com/marcusal/tictactoe


https://github.com/marcusal/tictactoe

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

![Issues](https://img.shields.io/github/issues/marcusal/tictactoe?style=for-the-badge)
![Followers](https://img.shields.io/github/followers/marcusal?style=for-the-badge)
![Stars](https://img.shields.io/github/stars/marcusal?style=for-the-badge)
![Pull Requests](https://img.shields.io/github/issues-pr/marcusal/tictactoe?style=for-the-badge)
![Last Commit](https://img.shields.io/github/last-commit/marcusal/tictactoe/main?style=for-the-badge)

# Tic Tac Toe
In this project, we have implemented our version of Tic Tac Toe using Ruby.

GIF

## Built With Ruby

![Ruby](http://img.shields.io/badge/-Ruby-3776AB?style=flat-square&logo=ruby&logoColor=red)

## Prerequisites

Ruby 2.6 (Or later)

## How to Test for Errors

1. Install RSpec [Rspec Gem](https://rspec.info)
2. Access the game folder in the terminal
3. Run RSpec
```
$ rspec
```
3. Rspec will output any errors found

## Getting Started

[Live Link](https://repl.it/@CacheMeIfYouCan/TicTacToe)

__Clone the repo to your local machine using the terminal__:
```
$ git clone https://github.com/marcusal/TicTacToe
```

## How to Play

1. Run game by typing in your terminal:
```
$ ruby bin/main.rb
```
2. Player 1 and Player 2 can enter their desired usernames
3. Press enter to roll the dice
4. The game chooses a player to go first, and who is X or O
5. The game will ask each player for their input to allocate they're target for the board
6. Both players will continually take turns
7. Game will stop running and announce when a winning move has been made

## Game Rules

The game is played on a grid that's 3 squares by 3 squares.
There is a maximum of 2 players. You are either X or O ...
The first player to get 3 of her marks in a row (up, down, across, or diagonally) is the winner.
When all 9 squares are full, the game is over.

Tip: Part of your strategy is trying to figure out how to get three Xs in a row. The other part is trying to figure out how to stop the computer from getting three Os in a row.

## Authors

👤 **Marcus**

- GitHub: [@CacheMeGifYouCan](https://github.com/marcusal)
- LinkedIn: [Mark Allen](https://www.linkedin.com/in/marcusa999/)

## Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the [issues page](https://github.com/marcusal/TicTacToe/issues)

## 📝 License

This project is [MIT](LICENSE) licensed.