-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feat: [websocket] 看見其他玩家加入/離開(#154)" * fix: 第一次code review修正
- Loading branch information
1 parent
4086edc
commit 863ab3e
Showing
5 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
domain/src/main/kotlin/tw/waterballsa/gaas/events/PlayerJoinedRoomEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package tw.waterballsa.gaas.events | ||
|
||
import tw.waterballsa.gaas.events.enums.EventMessageType | ||
|
||
data class PlayerJoinedRoomEvent( | ||
val type: EventMessageType, | ||
val data: Data | ||
) : DomainEvent() { | ||
data class Data( | ||
val user: Player, | ||
val roomId: String | ||
) { | ||
data class Player( | ||
val id: String, | ||
val nickname: String | ||
) | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
domain/src/main/kotlin/tw/waterballsa/gaas/events/PlayerLeavedRoomEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package tw.waterballsa.gaas.events | ||
|
||
import tw.waterballsa.gaas.events.enums.EventMessageType | ||
|
||
data class PlayerLeavedRoomEvent( | ||
val type: EventMessageType, | ||
val data: Data | ||
) : DomainEvent() { | ||
data class Data( | ||
val user: Player, | ||
val roomId: String | ||
) { | ||
data class Player( | ||
val id: String, | ||
val nickname: String | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters