feat(polling): implement PollingController for game event handling and user updates

This commit is contained in:
2025-11-13 11:05:59 +01:00
parent d5fa9bd2e4
commit 62fa28eac9
15 changed files with 382 additions and 145 deletions

View File

@@ -8,6 +8,10 @@ import scalafx.scene.image.Image
object WebUIUtils {
def cardtoImage(card: Card): Html = {
views.html.render.card.apply(f"images/cards/${cardtoString(card)}.png")(card.toString)
}
def cardtoString(card: Card) = {
val s = card.suit match {
case Spades => "S"
case Hearts => "H"
@@ -29,6 +33,7 @@ object WebUIUtils {
case Three => "3"
case Two => "2"
}
views.html.render.card.apply(f"images/cards/$cv$s.png")(card.toString)
f"$cv$s"
}
}