Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gregolive/tic_tac_toe
Classic tic-tac-toe with customizable markers played between two players.
https://github.com/gregolive/tic_tac_toe
Last synced: 18 days ago
JSON representation
Classic tic-tac-toe with customizable markers played between two players.
- Host: GitHub
- URL: https://github.com/gregolive/tic_tac_toe
- Owner: gregolive
- Created: 2021-10-05T16:32:36.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-21T10:25:16.000Z (about 3 years ago)
- Last Synced: 2023-07-25T07:27:40.351Z (over 1 year ago)
- Language: Ruby
- Homepage: https://replit.com/@gregolive/Tic-Tac-Toe
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TIC TAC TOE
Classic tic-tac-toe with customizable markers played between two players.
Live demo on [Replit](https://replit.com/@gregolive/Tic-Tac-Toe) 👈
## Functionality
A command version of the pen and pencil game tic tac toe made in Ruby. Players can choose a non-numeric marker to play as and place the marker by entering the corresponding number (1-9) on the game board.
## Reflection
Building this game was a nice introduction to classes in Ruby and displayed the benefits of untilizing this powerful feature of the language. Putting classes into practice this way helped me to netter understand how take adavntage of them as at first I struggled with the division of methods into classes, superclasses and modules.
At first I started by making a Player superclass with Player1 and Player2 subclasses, but then realized that the benefit of classes is being able to group all the player methods into one class. Another point of confusion was how much to include inside the Player class and what to keep outside of it. After first keeping the majority of the console outputs and some methods outside of the class, I realized it was cleaner with everything contained inside the class or an included module.
-Greg Olive