chore(api): fixes
This commit is contained in:
@@ -219,10 +219,10 @@ body {
|
||||
|
||||
}
|
||||
|
||||
#nextPlayers {
|
||||
#next-players-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
height: 0;
|
||||
|
||||
p {
|
||||
@@ -231,10 +231,6 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
#invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#selecttrumpsuit {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -41,12 +41,12 @@ class UserSession(val user: User, val host: Boolean, val gameLobby: GameLobby) e
|
||||
lock.lock()
|
||||
val result = Try {
|
||||
eventType match {
|
||||
case "Ping" =>
|
||||
case "ping" =>
|
||||
// No action needed for Ping
|
||||
()
|
||||
case "Start Game" =>
|
||||
case "StartGame" =>
|
||||
gameLobby.startGame(user)
|
||||
case "play Card" =>
|
||||
case "PlayCard" =>
|
||||
val maybeCardIndex: Option[Int] = (data \ "cardindex").asOpt[Int]
|
||||
maybeCardIndex match {
|
||||
case Some(index) =>
|
||||
@@ -55,7 +55,7 @@ class UserSession(val user: User, val host: Boolean, val gameLobby: GameLobby) e
|
||||
case None =>
|
||||
println("Card Index not found or is not a number.")
|
||||
}
|
||||
case "Picked Trumpsuit" =>
|
||||
case "PickTrumpsuit" =>
|
||||
val maybeSuitIndex: Option[Int] = (data \ "suitIndex").asOpt[Int]
|
||||
maybeSuitIndex match {
|
||||
case Some(index) =>
|
||||
@@ -69,6 +69,7 @@ class UserSession(val user: User, val host: Boolean, val gameLobby: GameLobby) e
|
||||
lock.unlock()
|
||||
if (result.isFailure) {
|
||||
val throwable = result.failed.get
|
||||
throwable.printStackTrace()
|
||||
throw throwable
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user