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

https://github.com/davidsantana06/rock-paper-scissors-plus

Console app with 3 Rock Paper Scissors variants using modular SPI for easy expansion.
https://github.com/davidsantana06/rock-paper-scissors-plus

bash cli docker game java junit maven rock-paper-scissors rock-paper-scissors-lizard-spock rock-paper-scissors-nine

Last synced: about 1 month ago
JSON representation

Console app with 3 Rock Paper Scissors variants using modular SPI for easy expansion.

Awesome Lists containing this project

README

          

Rock Paper Scissors Plus — Usage

**âœ‚ī¸ Rock Paper Scissors Plus ➕** is a Java console application featuring three versions of the classic game: the traditional Classic with 3 gestures, the extended RPS-9 with 9, and the popular Rock Paper Scissors Lizard Spock with 5.

It uses a modular architecture based on the **Service Provider Interface (SPI)**, allowing easy addition of new variants while keeping a consistent terminal interface and gameplay.

![Java](https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white)
![Maven](https://img.shields.io/badge/Apache%20Maven-C71A36?style=for-the-badge&logo=Apache%20Maven&logoColor=white)
![JUnit5](https://img.shields.io/badge/junit5-25A162?style=for-the-badge&logo=junit5&logoColor=white)
![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white)

## đŸ•šī¸ How to Play

1. Select a game variant.
2. Choose your gesture from the list displayed.
3. The computer will pick its gesture randomly.
4. The result is displayed, showing the winner.

Available games include:

### âœ‚ī¸ Rock Paper Scissors (Classic)

| Gesture | Wins against | Loses against |
| ------------ | ------------ | ------------- |
| **Rock** | Scissors | Paper |
| **Paper** | Rock | Scissors |
| **Scissors** | Paper | Rock |

### đŸ”Ģ Rock Paper Scissors Nine (RPS-9)

| Gesture | Wins against | Loses against |
| ------------ | ------------------------------ | ------------------------------- |
| **Rock** | Fire, Scissors, Human, Sponge | Paper, Air, Water, Gun |
| **Paper** | Rock, Air, Water, Gun | Scissors, Fire, Human, Sponge |
| **Scissors** | Paper, Human, Sponge, Air | Rock, Fire, Water, Gun |
| **Fire** | Scissors, Paper, Human, Sponge | Rock, Air, Water, Gun |
| **Human** | Sponge, Paper, Air, Water | Rock, Scissors, Fire, Gun |
| **Sponge** | Paper, Air, Water, Gun | Rock, Scissors, Fire, Human |
| **Air** | Fire, Rock, Water, Gun | Paper, Scissors, Human, Sponge |
| **Water** | Rock, Fire, Scissors, Gun | Paper, Human, Sponge, Air |
| **Gun** | Rock, Scissors, Human | Paper, Sponge, Air, Water, Fire |

### 🖖 Rock Paper Scissors Lizard Spock

| Gesture | Wins against | Loses against |
| ------------ | ---------------- | ---------------- |
| **Rock** | Scissors, Lizard | Paper, Spock |
| **Paper** | Rock, Spock | Scissors, Lizard |
| **Scissors** | Paper, Lizard | Rock, Spock |
| **Lizard** | Paper, Spock | Rock, Scissors |
| **Spock** | Rock, Scissors | Paper, Lizard |

## đŸ› ī¸ Installation and Execution

Built with **Docker** and **Docker Compose**. From the root directory, build and run:

```bash
docker compose build
docker compose run --rm -it rock-paper-scissors-plus
```

## 📚 References

- SENIOR JAVA TECHNICAL INTERVIEW R$10K CLT BR COMPANY. YouTube, available at: [https://youtube.com/watch?v=r_SRTbbtlD4](https://youtube.com/watch?v=r_SRTbbtlD4).
- RPS-9. UMOP, available at: [https://umop.com/rps9.htm](https://umop.com/rps9.htm).
- Rock, Paper, Scissors, Lizard, Spock. The Big Bang Theory Wiki, available at: [https://bigbangtheory.fandom.com/wiki/Rock,\_Paper,\_Scissors,\_Lizard,\_Spock](https://bigbangtheory.fandom.com/wiki/Rock,_Paper,_Scissors,_Lizard,_Spock).

## âš–ī¸ License

Licensed under the **MIT License**, allowing free use and modification with proper credit.