You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
604 B

class Lobby implements Serialized.Lobby{
id: string
clients: Serialized.Client[]
clientCounts: number[]
game: string
constructor(lobby: Serialized.Lobby){
this.id = lobby.id
this.clients = lobby.clients
this.clientCounts = lobby.clientCounts
this.game = lobby.game
}
get leader(): Serialized.Client{
return this.clients[0]
}
serialized(): Serialized.Lobby{
return {
id: this.id,
game: this.game,
clientCounts: this.clientCounts,
clients: this.clients
}
}
}