aboutsummaryrefslogtreecommitdiff
path: root/src/scalevalapokalypsi/Server/Server.scala
diff options
context:
space:
mode:
authorAleksi Heikkila <aleksi.e.heikkila@aalto.fi>2024-11-23 22:33:53 +0200
committerAleksi Heikkila <aleksi.e.heikkila@aalto.fi>2024-11-23 22:33:53 +0200
commit27dd937617cce1e43df1c16e12050f6e88763d54 (patch)
tree8247736f7c4d5b1a0c1541c25f477e73e5783944 /src/scalevalapokalypsi/Server/Server.scala
parentb11c02e8f1f4dea09847da999c2acb2f96df8a58 (diff)
parent28b83db50f33cb704311ffe608dcd8c4412635cf (diff)
downloadscalevalapokalypsi-27dd937617cce1e43df1c16e12050f6e88763d54.tar.gz
scalevalapokalypsi-27dd937617cce1e43df1c16e12050f6e88763d54.zip
Merge branch 'master' of ssh://cron4.fi/~/O1-game
Diffstat (limited to 'src/scalevalapokalypsi/Server/Server.scala')
-rw-r--r--src/scalevalapokalypsi/Server/Server.scala12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/scalevalapokalypsi/Server/Server.scala b/src/scalevalapokalypsi/Server/Server.scala
index bfb0893..2ea8bd4 100644
--- a/src/scalevalapokalypsi/Server/Server.scala
+++ b/src/scalevalapokalypsi/Server/Server.scala
@@ -56,8 +56,7 @@ class Server(
this.writeObservations()
if this.canExecuteTurns then
this.clients.foreach(_.giveTurn())
- //this.writeClientDataToClients()
- //this.writeObservations()
+ this.adventure.foreach(_.takeNpcTurns())
this.clients.foreach(c =>
this.writeToClient(this.turnStartInfo(c), c)
)
@@ -123,12 +122,9 @@ class Server(
val target = c.player.flatMap(_.getSingEffectTarget)
target.foreach(t =>
if c.player.exists(_.isSinging) && !c.clientHasSong then
- this.writeToClient(
- s"${SING_INDICATOR}${t.getVerseAgainst}\r\n",
- // TODO: store the verse and check how close client input is when determining sing quality
- c
- )
- c.startSong()
+ val verse = t.getVerseAgainst
+ this.writeToClient(s"${SING_INDICATOR}$verse\r\n", c)
+ c.startSong(verse)
)
)