adding room service, joining room
adding nick password into model, stored in the Room to allow more secure joining for repeated times
This commit is contained in:
@@ -62,7 +62,8 @@ object Models {
|
||||
owner: PlayerID,
|
||||
password: String,
|
||||
allowedCards: List[String],
|
||||
round: RoundState
|
||||
round: RoundState,
|
||||
playersPasswords: Map[String, String] = Map.empty // nickname into password
|
||||
) {
|
||||
def toViewFor(playerId: PlayerID): RoomStateView = {
|
||||
players
|
||||
|
||||
@@ -4,6 +4,6 @@ import io.circe.generic.semiauto._
|
||||
import io.circe._
|
||||
|
||||
object Requests {
|
||||
final case class LogIn(roomName: String, nickname: String, password: String)
|
||||
final case class LogIn(roomName: String, nickname: String, password: String, nickPassword: String)
|
||||
derives Codec.AsObject
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user