Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marwan37/terminal_games_collection
Lesson 2: Object Oriented Programming
https://github.com/marwan37/terminal_games_collection
Last synced: 28 days ago
JSON representation
Lesson 2: Object Oriented Programming
- Host: GitHub
- URL: https://github.com/marwan37/terminal_games_collection
- Owner: marwan37
- Created: 2022-04-18T22:29:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-22T17:01:07.000Z (over 1 year ago)
- Last Synced: 2024-11-06T17:54:47.504Z (3 months ago)
- Language: Ruby
- Size: 252 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ruby Terminal Games Collection
This repository contains two interactive, color-coded games for the terminal, created using Ruby.
## Games
### Tic Tac Toe
Tic Tac Toe is a classic two-player game where each player takes turns marking a space in a 3x3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game.
- Main File: [ttt/ttt_oo.rb](ttt/ttt_oo.rb)
- Supporting Files:
- [Board](ttt/board.rb)
- [Game Rules](ttt/game_rules.rb)
- [Artificial Intelligence Module](ttt/modules/artificial_intelligence.rb)
- [Displayable Module](ttt/modules/displayable.rb)### Twenty-One
Twenty-One is a card game where players try to reach a hand value as close to 21 as possible without exceeding it.
- Main File: [twentyone/oo_twenty_one.rb](twentyone/oo_twenty_one.rb)
- Supporting Files:
- [Card](twentyone/card.rb)
- [Coins](twentyone/coins.rb)
- [Displayable](twentyone/displayable.rb)
- [Displayable Player](twentyone/displayable_player.rb)
- [Game Loop](twentyone/game_loop.rb)
- [Hand](twentyone/hand.rb)
- [Participant](twentyone/participant.rb)## Additional Files
- [Object-Oriented Rock Paper Scissors](oo_rps.rb)
## Installation
To play the games, clone the repository and run the main game files using Ruby.
## Contributing
Feel free to fork the repository and submit pull requests for any enhancements or bug fixes.
## License
This project is open-source and available under the MIT License.
## Author
Created by [Marwan](https://github.com/marwan37).