Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
db5dd28
Merge pull request #33 from SS26-SE2-Codenames/main
the-only-queen-anna May 3, 2026
5ddc2d1
refactored the simplest issues:
the-only-queen-anna May 3, 2026
e815caf
refactoring of lobby screen
the-only-queen-anna May 3, 2026
d77693e
refactoring of game screen
the-only-queen-anna May 3, 2026
5810fa8
formatted code to fit ktlint standards
the-only-queen-anna May 3, 2026
0f46065
refactored GameBoardGrid
the-only-queen-anna May 3, 2026
3946454
fix: hint can be entered and sent again
the-only-queen-anna May 3, 2026
86a6f36
Merge pull request #34 from SS26-SE2-Codenames/refactor/sonar-refacto…
the-only-queen-anna May 4, 2026
51b9f46
feat: add DTO to mirror backend chat DTO
XtophB May 5, 2026
3cd3a4f
feat: add chat model for UI and List to store the incoming chats
XtophB May 5, 2026
982c32d
feat: add subscribe and sending functionalities
XtophB May 5, 2026
a34f3fa
feat: add mapping of continuous chat steam to domain model
XtophB May 5, 2026
eeaf105
feat: update ViewModel to listen to respective chats and update chat log
XtophB May 5, 2026
2e5eb36
feat: add send chat message functionality to view model
XtophB May 5, 2026
95f6340
refactor: apply ktlintFormat for code style
XtophB May 6, 2026
b4d6ac0
added UserNameScreen
May 6, 2026
d3fc77b
fixed formatting issues
May 6, 2026
a4d5d5b
fixed more formatting issues
May 6, 2026
dfa47f2
Merge pull request #35 from SS26-SE2-Codenames/start_screen
5eli May 6, 2026
ac7cc46
Settings Screen implemented
ad-devel May 6, 2026
023613c
Merge pull request #36 from SS26-SE2-Codenames/settings_screen
ad-devel May 6, 2026
c6f6805
chore: add missing .mailmap file
XtophB May 7, 2026
b5d0bb0
fix: add correct email for Prettner
XtophB May 7, 2026
79fb167
fix: add second email for Budhiawan
XtophB May 7, 2026
28e5e83
Merge pull request #37 from SS26-SE2-Codenames/chore/mailmap-file
XtophB May 7, 2026
82e599a
Merge branch 'development' into feature/31-frontend-chat-integration
XtophB May 7, 2026
1451c54
Chatfenster UI implementation
ad-devel May 7, 2026
a546b2d
Merge pull request #38 from SS26-SE2-Codenames/chatfenster_ui
ad-devel May 7, 2026
af544b5
Merge remote-tracking branch 'origin/development' into feature/31-fro…
XtophB May 9, 2026
b242d03
fix: updates to chat logs now no longer cause racec conditions
XtophB May 9, 2026
38b8a7e
chore: add comments for clarity
XtophB May 9, 2026
5a4aeda
test: add test for ChatRepository
XtophB May 9, 2026
8c44fa0
test: add setup method
XtophB May 9, 2026
5af2732
test: add tests for sending msg and subscribing
XtophB May 9, 2026
3d74db5
fix: connect method now takes team and role
XtophB May 9, 2026
70bbc24
refactor: delete duplicate code, promote reusability
XtophB May 9, 2026
e4e9887
test: add test for sending msg
XtophB May 9, 2026
b36c897
test: add test for updates to Lists of chats
XtophB May 9, 2026
02ffe18
fix: use same verify method as subscribe to lobby
XtophB May 9, 2026
74e35e1
chore: add comment for clarification on why variable exists
XtophB May 10, 2026
52c656d
test: add missing branch test for operative chat
XtophB May 10, 2026
a2bb822
test: add missing branch coverage
XtophB May 10, 2026
f0136d9
refactor: ktlintFormat and ktlintCheck
XtophB May 10, 2026
58d8c38
test: add additional tests for unhappy paths
XtophB May 10, 2026
971a492
Merge pull request #39 from SS26-SE2-Codenames/feature/31-frontend-ch…
XtophB May 11, 2026
c69bf5d
Merge branch 'development' into ui_state_update
ad-devel May 11, 2026
3b06d91
refactor: added comment to emtpy code block for sonar
the-only-queen-anna May 12, 2026
aecf34d
refactor: extracted all gradients to new file Brush.kt, to avoid dupl…
the-only-queen-anna May 12, 2026
d1e8ea8
added username as parameter to start screen and welcome text
the-only-queen-anna May 12, 2026
7e2388c
improved check for lobby code validity, added backend calls to lobby …
the-only-queen-anna May 12, 2026
f8f266d
fix: switched from route arguments to hiltViewModel for username stat…
the-only-queen-anna May 13, 2026
a8f522f
can now create a lobby, team and role are set null by default, user h…
the-only-queen-anna May 13, 2026
3898b07
added owner to session view model in JoinLobbyScreen, lobby join work…
the-only-queen-anna May 13, 2026
94f3129
added backend call to role change logic, had to change some data type…
the-only-queen-anna May 13, 2026
cc53b54
changes to Lobby UI:
the-only-queen-anna May 13, 2026
64f7ce3
fix: polling works now
the-only-queen-anna May 13, 2026
87c11d4
ui_state_update v1
ad-devel May 13, 2026
a77fda8
commit for device change; changed order of parameters of leave flow t…
the-only-queen-anna May 13, 2026
046400b
fix leaving lobby logic
the-only-queen-anna May 13, 2026
5f2682c
fix: join works now, added viewmodel owner to joinLobbyScreen
the-only-queen-anna May 13, 2026
425bab6
test: add tests for viewmodels
the-only-queen-anna May 13, 2026
7186778
format: formatted tests
the-only-queen-anna May 13, 2026
7229a8e
Fixed GameWebSocketHandlerTest issues
ad-devel May 14, 2026
d027654
Fix sonar issues
ad-devel May 15, 2026
1925c4f
Merge pull request #41 from SS26-SE2-Codenames/ui_state_update
ad-devel May 15, 2026
1ca7794
merge with development, resolving merge conflicts
the-only-queen-anna May 15, 2026
795624d
updated chat UI with different tabs for different chat-types
May 15, 2026
d35bd37
fix: session view model is now passed as an argument to all pages, lo…
the-only-queen-anna May 15, 2026
bb2ae7d
change lobby api to use proper http methods
the-only-queen-anna May 15, 2026
521f168
removed logs
the-only-queen-anna May 15, 2026
ca2ff67
added the ui-state-update for the chat-system
May 15, 2026
f183376
added ChatViewModelTest
May 15, 2026
f02e237
sonar: fixed build issues (just formatting), also fixed one failing test
the-only-queen-anna May 15, 2026
a04cb7d
formatted the code properly
May 15, 2026
2e0ca38
formatted the code properly
May 15, 2026
487e71a
test: added tests for lobby view model
the-only-queen-anna May 15, 2026
822fe84
formatted tests
the-only-queen-anna May 15, 2026
3193b34
Merge pull request #43 from SS26-SE2-Codenames/chat_ui_state_update
5eli May 15, 2026
1530bff
merge with development
the-only-queen-anna May 15, 2026
12fd1bc
sonar: changed IP back to sonar
the-only-queen-anna May 16, 2026
65bdbac
Merge pull request #44 from SS26-SE2-Codenames/lobby-integration
the-only-queen-anna May 16, 2026
fb4148d
feat: add DTO for clue
XtophB May 16, 2026
f37afa7
feat: add currentPhasae to GameMessage to match backend DTO sent
XtophB May 16, 2026
fd88f9e
feat: add method to send clue to the backend
XtophB May 16, 2026
02b8b66
refactor: change string to enum
XtophB May 16, 2026
1147c09
refactor: change string to enum to match gaame message dto
XtophB May 16, 2026
6fa7fd6
refactor: change string to enum to match game message dto in test class
XtophB May 16, 2026
a61f05d
test: add test to verify sending clue
XtophB May 16, 2026
b119c0b
refactor: fix indent
XtophB May 16, 2026
52ee0d2
feat: add sending clue to game screen wrapper
XtophB May 16, 2026
1360a35
feat: add clue display to screen
XtophB May 16, 2026
9bd9351
fix: change destination to match backend
XtophB May 16, 2026
53f3a89
fix: change attribute to match backend serialization
XtophB May 16, 2026
fa68cea
feat: add outgoing clue dto to match backend
XtophB May 16, 2026
a753ff4
fix: change game message dto to match backend
XtophB May 16, 2026
7864ffe
fix: send the clue message DTO that matches the backend
XtophB May 16, 2026
f09f559
fix: change parameters to match the method that sends dto to backend
XtophB May 16, 2026
64a606a
test: fix miss-match that clue has to be DTO and not String
XtophB May 16, 2026
dbab5f0
test: fix tests
XtophB May 16, 2026
3bc9040
fix: add extraction if clue is available or pass standard string if null
XtophB May 16, 2026
d82c6f9
refactor: remove TODO, can be asked in PR
XtophB May 16, 2026
5c05b09
refactor: execute ktlintFormat command
XtophB May 16, 2026
7368a3f
feature: only host can start game
the-only-queen-anna May 17, 2026
58b656f
refactor: extracted data classes and enums from GameBoard Screen
the-only-queen-anna May 17, 2026
6e6bdda
add game start flow
the-only-queen-anna May 17, 2026
83c6808
test: add test for sendClue
XtophB May 17, 2026
e3107a2
progress: game start button works, all players in the lobby are trans…
the-only-queen-anna May 17, 2026
2c35e5d
minor mapping changes to ensure game start works:
the-only-queen-anna May 17, 2026
1e52796
refactor: fix minor issues
the-only-queen-anna May 17, 2026
a2b8878
format: reformatted via ktlint
the-only-queen-anna May 17, 2026
fb750e7
fix: some test changes and more type changes, commit for device change
the-only-queen-anna May 17, 2026
31712c4
test: fix existing tests for game view model
the-only-queen-anna May 17, 2026
fbb5b69
test: added more tests
the-only-queen-anna May 17, 2026
ac82b4d
Merge pull request #47 from SS26-SE2-Codenames/game-start
the-only-queen-anna May 18, 2026
e7ca214
chore: merge dev into branch, fix conflicts
XtophB May 18, 2026
4e87063
fix: extract team out of Turn
XtophB May 18, 2026
ce9bc0e
fix: extract word from DTO to currentHint
XtophB May 18, 2026
dd88612
fix: add back mapping to mock screen, else it wont build
XtophB May 18, 2026
16e46d8
fix: read gameState card instead of old cardList from GameMessage
XtophB May 18, 2026
49ca7e2
fix: remove null check since not needed
XtophB May 18, 2026
c9dd64b
fix: change string to clueDTO as it is expected for clue
XtophB May 18, 2026
b3737ad
fix: change string to clueDTO and change assertion values
XtophB May 18, 2026
a5a67ea
refactor: linting
XtophB May 18, 2026
a3e34b3
refactor: change regex team extraction to proper if else check
XtophB May 18, 2026
6054380
test: add test for both branches for sending clue as spymaster and not
XtophB May 18, 2026
251c7e9
test: add test for Team Chat similar to existing tests (need assist)
XtophB May 18, 2026
55d101c
test: remove test, it's an old problem where we have not found solution
XtophB May 18, 2026
ffdeca6
refactor: kitlintFormat
XtophB May 18, 2026
4a0b3b6
fixed mapping of game state dto to correctly transfer clue contents
the-only-queen-anna May 18, 2026
37feae5
test: fix tests
the-only-queen-anna May 18, 2026
1dc4d1f
Merge pull request #46 from SS26-SE2-Codenames/feature/32-clue-system
XtophB May 18, 2026
fca7706
Merge remote-tracking branch 'origin/development' into chat_ui_state_fix
ad-devel May 18, 2026
fbdc6db
chat_ui_state_update_fix
ad-devel May 18, 2026
3f11a53
Chat_ui_state_fix - fixed issues after review
ad-devel May 19, 2026
4c411ee
fixed sonar issue
ad-devel May 19, 2026
9e8d79e
fix: refined chat state wiring and tab visibility
ad-devel May 20, 2026
c29106a
fix: chat window size
ad-devel May 20, 2026
a47a488
added unit tests
ad-devel May 20, 2026
2c6c8e8
Merge pull request #48 from SS26-SE2-Codenames/chat_ui_state_fix
ad-devel May 20, 2026
b997804
fix: move chat button to enable hint giving + remove ip adresses
the-only-queen-anna May 20, 2026
5bc5c76
format: formatted code
the-only-queen-anna May 20, 2026
8db3ffe
Merge pull request #54 from SS26-SE2-Codenames/development-fix
the-only-queen-anna May 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .idea/misc.sync-conflict-20260504-182215-U4KWF3D.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Christopher Budhiawan <xtophb@gmail.com>
Christopher Budhiawan <christopher.budhiawan@gmail.com>
Emre Orhan <Emre.Orhan@gmx.at>
Sofija Sternad-Gugnjak <sofijasternad@outlook.com>
Alexander Dermutz <adgaming.dev@gmail.com>
Selina Prettner <prettnerseli@gmail.com>
Selina Prettner <prettnerseli@gamil.com>
Anna Pschernig <annpschernig@edu.aau.at>
Natasa Jeftic <natasajeftic6@gmail.com>
162 changes: 162 additions & 0 deletions app/src/androidTest/java/com/codenames/frontend/GameboardScreenTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
package com.codenames.frontend

import androidx.compose.ui.test.assertCountEquals
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onAllNodesWithText
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import com.codenames.frontend.data.model.ChatDomainModel
import com.codenames.frontend.data.model.ChatLists
import com.codenames.frontend.data.model.GameCard
import com.codenames.frontend.data.model.GameState
import com.codenames.frontend.data.model.enums.CardType
import com.codenames.frontend.data.model.enums.ChatTab
import com.codenames.frontend.ui.roles.PlayerRoles
import com.codenames.frontend.ui.screens.GameboardScreen
import org.junit.Rule
import org.junit.Test

class GameboardScreenTest {
@get:Rule
val composeRule = createComposeRule()

@Test
fun gameboardDisplaysGameStateFromParameters() {
val cards =
listOf(
GameCard("BERLIN", CardType.BLUE, revealed = false),
GameCard("ROME", CardType.RED, revealed = true),
GameCard("MOON", CardType.NEUTRAL, revealed = false),
GameCard("VIPER", CardType.ASSASSIN, revealed = false),
)

composeRule.setContent {
GameboardScreen(
userRole = PlayerRoles.BLUE_SPYMASTER,
gameState =
GameState(
currentHint = "EAGLE",
currentTurn = PlayerRoles.BLUE_OPERATIVE,
remainingGuesses = 3,
currentBlueFound = 0,
currentRedFound = 1,
cards = cards,
),
onHintChange = { _, _ -> },
onReveal = {},
)
}

composeRule.onNodeWithText("BERLIN").assertIsDisplayed()
composeRule.onNodeWithText("ROME").assertIsDisplayed()
composeRule.onNodeWithText("Turn: BLUE_OPERATIVE | Guesses: 3").assertIsDisplayed()
composeRule.onNodeWithText("0 FOUND").assertIsDisplayed()
composeRule.onNodeWithText("1 FOUND").assertIsDisplayed()
composeRule.onAllNodesWithText("Hint: EAGLE").assertCountEquals(0)
}

@Test
fun gameboardDisplaysHintForOperative() {
composeRule.setContent {
GameboardScreen(
userRole = PlayerRoles.BLUE_OPERATIVE,
gameState =
GameState(
currentHint = "EAGLE",
cards = listOf(GameCard("BERLIN", CardType.BLUE)),
),
onHintChange = { _, _ -> },
onReveal = {},
)
}

composeRule.onNodeWithText("Hint: EAGLE").assertIsDisplayed()
}

@Test
fun spymasterCanOpenLobbyChat() {
composeRule.setContent {
GameboardScreen(
userRole = PlayerRoles.BLUE_SPYMASTER,
gameState =
GameState(
currentHint = "EAGLE",
cards = listOf(GameCard("BERLIN", CardType.BLUE)),
chatLists =
ChatLists(
lobbyMessages =
listOf(
ChatDomainModel(
sender = "Anna",
text = "Lobby message",
isFromMe = false,
),
),
),
availableChatTabs = listOf(ChatTab.GLOBAL),
),
onHintChange = { _, _ -> },
onReveal = {},
)
}

composeRule.onNodeWithText("Chat").performClick()
composeRule.onNodeWithText("Global Chat").assertIsDisplayed()
composeRule.onNodeWithText("Anna").assertIsDisplayed()
composeRule.onNodeWithText("Lobby message").assertIsDisplayed()
}

@Test
fun gameboardDisplaysTeamChatMessages() {
composeRule.setContent {
GameboardScreen(
userRole = PlayerRoles.BLUE_OPERATIVE,
gameState =
GameState(
currentHint = "EAGLE",
cards = listOf(GameCard("BERLIN", CardType.BLUE)),
chatLists =
ChatLists(
teamMessages =
listOf(
ChatDomainModel(
sender = "Max",
text = "Take Berlin",
isFromMe = false,
),
),
),
availableChatTabs = listOf(ChatTab.GLOBAL, ChatTab.TEAM),
),
onHintChange = { _, _ -> },
onReveal = {},
)
}

composeRule.onNodeWithText("Chat").performClick()
composeRule.onNodeWithText("Team").performClick()
composeRule.onNodeWithText("Max").assertIsDisplayed()
composeRule.onNodeWithText("Take Berlin").assertIsDisplayed()
}

@Test
fun operativeChatTabIsHiddenWhenNotAvailable() {
composeRule.setContent {
GameboardScreen(
userRole = PlayerRoles.BLUE_OPERATIVE,
gameState =
GameState(
currentHint = "EAGLE",
cards = listOf(GameCard("BERLIN", CardType.BLUE)),
availableChatTabs = listOf(ChatTab.GLOBAL, ChatTab.TEAM),
),
onHintChange = { _, _ -> },
onReveal = {},
)
}

composeRule.onNodeWithText("Chat").performClick()
composeRule.onAllNodesWithText("Operatives").assertCountEquals(0)
}
}
10 changes: 10 additions & 0 deletions app/src/main/java/com/codenames/frontend/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.runtime.Composable
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
import com.codenames.frontend.ui.navigation.NavGraph
import com.codenames.frontend.ui.theme.CodenamesTheme
import dagger.hilt.android.AndroidEntryPoint
Expand All @@ -14,6 +16,14 @@ class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()

WindowInsetsControllerCompat(window, window.decorView).apply {
hide(WindowInsetsCompat.Type.systemBars())

systemBarsBehavior =
WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
}

setContent {
CodenamesTheme {
AppContent()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.codenames.frontend.data.model

data class ChatDomainModel(
val sender: String,
val text: String,
val isFromMe: Boolean,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.codenames.frontend.data.model

data class ChatLists(
val lobbyMessages: List<ChatDomainModel> = emptyList(),
val teamMessages: List<ChatDomainModel> = emptyList(),
val operativeMessages: List<ChatDomainModel> = emptyList(),
)
15 changes: 15 additions & 0 deletions app/src/main/java/com/codenames/frontend/data/model/ChatMessage.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.codenames.frontend.data.model

import com.codenames.frontend.data.model.enums.ChatTab
import kotlinx.serialization.Serializable

@Serializable
data class ChatMessage(
val id: Int,
val sender: String,
val message: String,
val timestamp: String,
val chatTab: ChatTab,
val isSystemMessage: Boolean = false,
val isFromMe: Boolean = false,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package com.codenames.frontend.data.model

data class ChatUiState(
val messages: List<ChatMessage> = emptyList(),
val currentInput: String = "",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.codenames.frontend.data.model

import com.codenames.frontend.data.model.enums.CardType

data class GameCard(
val word: String,
val type: CardType,
val revealed: Boolean = false,
)
17 changes: 17 additions & 0 deletions app/src/main/java/com/codenames/frontend/data/model/GameState.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.codenames.frontend.data.model

import com.codenames.frontend.data.model.enums.ChatTab
import com.codenames.frontend.data.model.enums.Team
import com.codenames.frontend.ui.roles.PlayerRoles

data class GameState(
val currentHint: String = "",
val cards: List<GameCard> = emptyList(),
val currentTurn: PlayerRoles = PlayerRoles.NONE,
val winner: Team? = null,
val remainingGuesses: Int = 0,
val currentRedFound: Int = 0,
val currentBlueFound: Int = 0,
val chatLists: ChatLists = ChatLists(),
val availableChatTabs: List<ChatTab> = listOf(ChatTab.GLOBAL),
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ data class LobbyUiState(
val players: List<Player> = emptyList(),
val error: String? = null,
val isGameStarted: Boolean = false,
val blueOperatives: List<String> = emptyList(),
val blueSpymasters: List<String> = emptyList(),
val redOperatives: List<String> = emptyList(),
val redSpymasters: List<String> = emptyList(),
)
39 changes: 38 additions & 1 deletion app/src/main/java/com/codenames/frontend/data/model/Mapper.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
package com.codenames.frontend.data.model

import com.codenames.frontend.data.model.enums.CardType
import com.codenames.frontend.data.model.enums.Role
import com.codenames.frontend.data.model.enums.Team
import com.codenames.frontend.network.dto.CardDto
import com.codenames.frontend.network.dto.GameMessage
import com.codenames.frontend.network.dto.LobbyResponse
import com.codenames.frontend.network.dto.PlayerDto
import com.codenames.frontend.ui.roles.PlayerRoles

fun LobbyResponse.toLobbyState(): LobbyUiState =
LobbyUiState(
lobbyCode = lobbyCode,
players = playerList.map { it.toUi() },
isGameStarted = isStarted,
)

fun PlayerDto.toUi(): Player =
Expand All @@ -15,5 +22,35 @@ fun PlayerDto.toUi(): Player =
role = role,
team = team,
isHost = isHost,
isReady = false, // if we add this functionality
isReady = false,
)

fun GameMessage.toGameState(): GameState {
val cards = cardList.map { it.toGameCard() }

return GameState(
currentHint = currentClue?.word ?: "",
cards = cards,
currentTurn = getCurrentTurn(),
winner = winner,
remainingGuesses = currentClue?.guessAmount ?: 0,
currentRedFound = cards.count { it.type == CardType.RED && it.revealed },
currentBlueFound = cards.count { it.type == CardType.BLUE && it.revealed },
)
}

fun CardDto.toGameCard(): GameCard =
GameCard(
word = word,
type = color,
revealed = isGuessed,
)

fun GameMessage.getCurrentTurn(): PlayerRoles {
if (currentTurn == Team.RED) {
if (currentPhase == Role.SPYMASTER) return PlayerRoles.RED_SPYMASTER
return PlayerRoles.RED_OPERATIVE
}
if (currentPhase == Role.SPYMASTER) return PlayerRoles.BLUE_SPYMASTER
return PlayerRoles.BLUE_OPERATIVE
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.codenames.frontend.data.model

data class SessionState(
val username: String,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.codenames.frontend.data.model.enums

enum class CardType {
BLUE,
RED,
NEUTRAL,
ASSASSIN,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.codenames.frontend.data.model.enums

import kotlinx.serialization.Serializable

@Serializable
enum class ChatMessageType {
CHAT,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.codenames.frontend.data.model.enums

enum class ChatTab(
val title: String,
) {
GLOBAL("Global"),
TEAM("Team"),
OPERATIVES("Operatives"),
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.codenames.frontend.data.model.enums

import kotlinx.serialization.Serializable

@Serializable
enum class Role {
OPERATIVE,
SPYMASTER,
Expand Down
Loading
Loading