Added link to click for player pov, started rendering with images

This commit is contained in:
LQ63
2025-10-20 15:17:17 +02:00
parent dad604186e
commit d9f7275854
7 changed files with 99 additions and 89 deletions

View File

@@ -8,18 +8,22 @@ import scala.collection.mutable
object PodGameManager {
private val sessions: mutable.Map[UUID, PlayerSession] = mutable.Map()
def addSession(session: PlayerSession): Unit = {
sessions.put(session.id, session)
private val gamesession: mutable.Map[UUID, Gamesession] = mutable.Map()
def addGame(session: PlayerSession, gamesession: Gamesession): Unit = {
gamesession.put(session.id, gamesession)
}
def createGame(player: String): Unit = {
val game = Gamesession(UUID.randomUUID())
}
def clearSessions(): Unit = {
sessions.clear()
gamesession.clear()
}
def identify(id: UUID): Option[PlayerSession] = {
sessions.get(id)
gamesession.get(id)
}
def transmit(id: UUID, event: SimpleEvent): Unit = {
@@ -27,7 +31,7 @@ object PodGameManager {
}
def transmitAll(event: SimpleEvent): Unit = {
sessions.foreach(session => session._2.updatePlayer(event))
gamesession.foreach(session => session._2.updatePlayer(event))
}
def listSessions(): List[UUID] = {