From d026e461faa30facb067616f36acd695c101ed96 Mon Sep 17 00:00:00 2001 From: Thibault Duplessis Date: Thu, 25 Oct 2012 10:27:29 +0200 Subject: [PATCH] tweak move notifier --- app/round/MoveNotifier.scala | 8 ++------ app/round/RoundEnv.scala | 4 +--- todo | 3 --- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/app/round/MoveNotifier.scala b/app/round/MoveNotifier.scala index 94fe6449cf..a4ee142c04 100644 --- a/app/round/MoveNotifier.scala +++ b/app/round/MoveNotifier.scala @@ -11,14 +11,10 @@ import play.api.libs.concurrent._ import play.api.Play.current final class MoveNotifier( - siteHubName: String, - lobbyHubName: String, - tournamentHubMasterName: String, + hubNames: List[String], countMove: () ⇒ Unit) { - lazy val hubRefs = List(siteHubName, lobbyHubName, tournamentHubMasterName) map { name ⇒ - Akka.system.actorFor("/user/" + name) - } + lazy val hubRefs = hubNames map { name ⇒ Akka.system.actorFor("/user/" + name) } def apply(gameId: String, fen: String, lastMove: Option[String]) { countMove() diff --git a/app/round/RoundEnv.scala b/app/round/RoundEnv.scala index f223ff1c09..a178ef9e32 100644 --- a/app/round/RoundEnv.scala +++ b/app/round/RoundEnv.scala @@ -43,9 +43,7 @@ final class RoundEnv( )), name = ActorRoundHubMaster) private lazy val moveNotifier = new MoveNotifier( - siteHubName = ActorSiteHub, - lobbyHubName = ActorLobbyHub, - tournamentHubMasterName = ActorTournamentHubMaster, + hubNames = List(ActorSiteHub, ActorLobbyHub, ActorTournamentHubMaster), countMove = countMove) lazy val socket = new Socket( diff --git a/todo b/todo index 794b466266..6f3e3f8aea 100644 --- a/todo +++ b/todo @@ -1,8 +1,5 @@ chat should autoscroll only when at bottom finish flagged game -It's possible to join your own game and win it, which will then be displayed as a win and I saw players who abuse this to manipulate their stats. -player timeout depending on game duration -do not count games vs engine as win/loss start chess960 after both player move http://fr.lichess.org/forum/lichess-feedback/clock-fairness-in-chess960-games chess960 confirmation http://fr.lichess.org/forum/lichess-feedback/separate-960-lobby?page=1#7 use POST instead of GET where it makes sense