Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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).