Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zinaaan/chutes-and-ladders
chutes and ladders game
https://github.com/zinaaan/chutes-and-ladders
chutes-and-ladders game gradle java11 spring-boot unit-testing
Last synced: about 1 month ago
JSON representation
chutes and ladders game
- Host: GitHub
- URL: https://github.com/zinaaan/chutes-and-ladders
- Owner: Zinaaan
- Created: 2023-05-13T20:43:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-26T19:48:07.000Z (over 1 year ago)
- Last Synced: 2024-11-11T18:12:01.820Z (3 months ago)
- Topics: chutes-and-ladders, game, gradle, java11, spring-boot, unit-testing
- Language: Java
- Homepage:
- Size: 1.14 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chutes-and-ladders
## Game Introductions:
![1685111545051](https://github.com/Zinaaan/chutes-and-ladders/assets/39329676/52acb385-4fe9-411d-8f55-569f6ccd7da3)## Function requirements:
1. Specific size of the game board (n * n)
2. Each game has a different number of chutes and ladders
3. Allow multiple players playing, and each of them could know the current game process
4. Rules for player movement
5. System should have reasonable rules, for example, the chute shouldn't overlap with the ladder
6. Allow adding a new player or delete an existing player during the game playing## Design patterns used:
1. **Policy pattern and Factory pattern**, injecting the Bean of game rules, rolling rules, turning rules, etc. along with the process of spring initializing by integrating with spring
2. **Builder pattern**, using builder pattern to ensure that complicated process of game building become more concise and specific.
3. **Observer pattern (pub-sub model)**, allow each participant noticing the game process and other players action. Using Spring ApplicationEventPublisherAware as a register, publish events along with the process of spring initializing as well as register as the lister by `@GameListener` annotation and detecting by SpringAOP.## Tests:
Comprehensively **unit testing** and **integration testing**.