Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

UNO - Card Game with Java

License

NotificationsYou must be signed in to change notification settings

tk-codes/uno

Repository files navigation

CoverageMaintainability Rating

v2.0: Rebuilt the core game logic in domain-driven-design.

uno-uiNote: GUI is built merely to try out the core domain logic. It is not suitable for serious game. :)

Instructions

Run Application

Run themain method in the UnoApp class or use the following command in the terminal:

./gradlew run

Run Unit Tests

./gradlew test

Event Storming

event-storming.

Core Domain

The core game logic is built according toofficial uno rules.

Uno Card

Cards are value objects, i.e. immutable. The following card types are available in Uno:

  • Number Card
  • Skip Action Card
  • Reverse Action Card
  • Draw Two Action Card
  • Wild Color Card
  • Wild Draw Four Card

Initially wild cards don't have a color. When drawn, a new value object is created with the chosen color.

card-uml

Player

Player is an entity which contains a list of hand cards to play.

PlayerRoundIterator manages the players and switches turn as if the players are in a round table.

player-uml

Game

Game is the aggregate which maintains the state ofplayers,draw pile anddiscard pile as the cards are played.

game-uml

Domain Events

Game aggregate produces domain events usingDomainEventPublisher.

Subscribers can register for these events and handle them accordingly.

events-uml

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp