Skip to content

AbdumurodovaZulfizar/Tic-Tac-Toe-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe 👇

Welcome to Zulfizar and Angel's interesting game 🙌

Game description

Tic-tac-toe (American English), noughts and crosses (Commonwealth English and British English), or Xs and Os/“X’y O’sies” (Ireland), is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a diagonal, horizontal, or vertical row is the winner. It is a solved game with a forced draw assuming best play from both players.

  1. Number of players 🙍‍♂️🙎🏻‍♀️: 2
  2. Set up time ⏱: minimal
  3. Playing time ⏱: ~1 minute
  4. Skill(s) required 💪: Strategy, tactics, observation
  5. Symbols ⭕️❌: Noughts and crosses (Xs and Os)
  6. Each player should select the number from the board! (only numbers from 1 to 9!)

In order to win the game, a player must place three of their marks in a horizontal, vertical, or diagonal row.

The following example game is won by the second player, O:
GIF

Players soon discover that the best play from both parties leads to a draw. Hence, tic-tac-toe is most often played by young children, who often have not yet discovered the optimal strategy.

Content

Gameplay Instructions

  1. To begin the game firstly, follow Getting started section
  2. Find someone to play with.
  3. As the file is executed the game will ask you to first input Player X name. The same will be repeated for player O.
  4. Player X will be prompted to enter a number from 1-9 representing a field in the tic-tac-toe grid(3x3), once the player obliges, his symbol will be marked in his selected spot.
  5. Player O will be asked to repeat as above.
  6. The game will keep alternating players until a win or draw is achieved.
  7. To win the game, a player must fill out a line with his symbol vertically, horizontally, or diagonally.
  8. A draw is reached when neither player manages the above and the grid is filled.

RSpec test Instructions

  1. To test this game install RSpec, for it boot up your terminal and punch in `gem install rspec` to install RSpec.
  2. `cd` into Tic-Tac-Toe-Game project directory
  3. Type `rspec`

Built With

  • Ruby Language
  • Git  Git
  • GitHub  GitHub
  • Visual Studio Code  VScode

Getting Started

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

  • git clone https://github.com/AbdumurodovaZulfizar/Tic-Tac-Toe-Game.git
  • cd Tic-Tac-Toe-Game
  • Open Ruby file on your editor
  • Open your terminal(Command Prompt) and type bin/main.rb

Authors

👩🏻‍💼 Zulfizar Abdumurodova

🙍‍♂️ Angel Diaz

Dependencies

Ruby 3.0.1

Contributing

Contributions, issues and feature requests are welcome!

You can do it on issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Microverse for international opportunities.
  • Special thanks to all code reviewers.

📝 License

Copyright 2021 Zulfizar Abdumurodova & Ángel Díaz

  • MIT for this project.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages