-
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.
feat start game event broadcast (#181)
* feat start game event broadcast
- Loading branch information
Showing
4 changed files
with
34 additions
and
11 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
15 changes: 15 additions & 0 deletions
15
domain/src/main/kotlin/tw/waterballsa/gaas/events/StartedGameEvent.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,15 @@ | ||
package tw.waterballsa.gaas.events | ||
|
||
import tw.waterballsa.gaas.domain.Room | ||
import tw.waterballsa.gaas.events.enums.EventMessageType | ||
|
||
data class StartedGameEvent( | ||
val type: EventMessageType, | ||
val data: Data | ||
) : DomainEvent() { | ||
|
||
data class Data( | ||
val gameUrl: String, | ||
val roomId: Room.Id, | ||
) | ||
} |
10 changes: 10 additions & 0 deletions
10
domain/src/main/kotlin/tw/waterballsa/gaas/events/enums/EventMessageType.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,10 @@ | ||
package tw.waterballsa.gaas.events.enums | ||
|
||
enum class EventMessageType( | ||
val eventName: String | ||
) { | ||
CHAT_MESSAGE("CHAT_MESSAGE"), | ||
CHATROOM_JOIN("CHATROOM_JOIN"), | ||
CONNECT_EVENT("CONNECT_EVENT"), | ||
GAME_STARTED("GAME_STARTED"), | ||
} |
7 changes: 0 additions & 7 deletions
7
domain/src/main/kotlin/tw/waterballsa/gaas/exceptions/enums/SocketIOEventMessage.kt
This file was deleted.
Oops, something went wrong.