Skip to content

Commit

Permalink
#14 allow to leave the game at any time
Browse files Browse the repository at this point in the history
  • Loading branch information
stoerti committed Aug 19, 2024
1 parent 521ff9c commit 7147dd1
Show file tree
Hide file tree
Showing 27 changed files with 340 additions and 282 deletions.
4 changes: 2 additions & 2 deletions backend/src/main/kotlin/org/quizmania/game/api/commands.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ data class CreateGameCommand(
val moderatorUsername: String?
): GameCommand

data class AddPlayerCommand(
data class JoinGameCommand(
@TargetAggregateIdentifier
override val gameId: UUID,
val username: String,
): GameCommand

data class RemovePlayerCommand(
data class LeaveGameCommand(
@TargetAggregateIdentifier
override val gameId: UUID,
val username: String,
Expand Down
4 changes: 2 additions & 2 deletions backend/src/main/kotlin/org/quizmania/game/api/events.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ data class GameCreatedEvent(
val moderatorUsername: String?,
) : GameEvent

data class PlayerAddedEvent(
data class PlayerJoinedGameEvent(
override val gameId: GameId,
val gamePlayerId: GamePlayerId,
val username: String,
) : GameEvent

data class PlayerRemovedEvent(
data class PlayerLeftGameEvent(
override val gameId: GameId,
val gamePlayerId: GamePlayerId,
val username: String,
Expand Down
Loading

0 comments on commit 7147dd1

Please sign in to comment.