How kavin25r/rock-paper-scissors-game works
This is a Spring Boot Rock-Paper-Scissors game exposed through a REST API. A client can start a game, submit choices for rounds, or quit; the service generates computer choices, updates the score and returns a message and scores. The application entry point starts Spring Boot. The excerpts show the controller-to-service calls and the service’s use of Score; no database or other external integration is evident.
Main entry points: RPS_Controller.java Game Controller · RPS_Service.java Game Service · Score.java Game Score
Components 5
HTTP API
- Game Controller
src/main/java/com/game/rock_paper_scissors/controller/RPS_Controller.java
Game Runtime
- Game Service
src/main/java/com/game/rock_paper_scissors/service/RPS_Service.java - Game Score
src/main/java/com/game/rock_paper_scissors/util/Score.java
Application Startup
- Boot Application
src/main/java/com/game/rock_paper_scissors/RockPaperScissorsApplication.java
Other components
- API Client
Connections 3
- API Client → Game Controller: calls endpoints
src/main/java/com/game/rock_paper_scissors/controller/RPS_Controller.java - Game Controller → Game Service: dispatches actions
src/main/java/com/game/rock_paper_scissors/controller/RPS_Controller.java - Game Service → Game Score: reads and updates
src/main/java/com/game/rock_paper_scissors/service/RPS_Service.java