Skip to content

tafodinho/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe

A Tic-Tac-Toe two player console game

Game instructions

This game is entirely a console game so to run the game you will need to follow the below instructions
  • To Start the Game, Navigate to the root folder of the prject and run the game by typing $ruby Game.rb
  • this will display a UI with numbers indicating positions to place pieces
  • First player piece will be represented by an "X" and second player by and "O"
  • After executing the command above the game will request for a position for the face player to place piece
  • After the first player places a piece the position will be marked by and "X" and request for the second player to enter position to place Piece
  • That position will also be marked with an "O" and request the first player to make a move and so on and so forth
  • The game ends when a player has marked a straight line(either verticaly, horizontally or Diagonaly) with either and "X" or an "O"
  • The game will also end when users have a draw game in which case there is no straight line marked by either players and the board has no free space to place a piece

Project Stucture

This project is modeled into four classes

A UI Class That takes care of printing information to the screen.

A Player Class That models the two palyers of the game.

A Board class That models the board for the game.

A Game Class That models the acctions of the Game 

Built With

Ruby

Contributors

About

A Tic-Tac-Toe two player console game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages