Skip to content

alvp01/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TIC TAC TOE GAME

Ruby code for tic-tac-toe Game.

screenshot

Game rules

Tic tac toe game consists in a 3 by 3 board and two players.
Players choose between X and O as their tokens to play.
Players take turns to play their token in a unoccupied cell.
The first player who gets three of their tokens in line wins the game.
If no player gets three tokens in line and the board is full it is a tie.

Live Demo

Try on repl.it

Installation

Open a bash console and type:

Built With

  • RUBY
  • VSCode

Testing

We are using RSpec testing tool to test all enumerable methods. Also some detailed documentation about this tool

Install

  • In a terminal window type gem install rspec
  • Once rspec install has finished, type rspec --init
  • You will see a folder spec and a file .rspec
  • Inside spec folder you'll see a spec_helper.rb file.

Run

We have already created rspec-testing files called board_spec.rb, helper_spec.rb, player_spec.rb and spec_helper.rb if you want to create another one with the end [your file name]_spec.rb

  • go to the folder inside your terminal type rspec
  • If all test were passed you will see:

15 examples, 0 failures

Else you'll see a red message, then check errors and fix them

Authors

👤 Abel Lavieri

👤 Shingirayi Mandebvu

🤝 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!

Acknowledgments

  • Microverse

📝 License

This project is MIT licensed.

About

Microverse Ruby project about OOP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages