tweak move notifier

This commit is contained in:
Thibault Duplessis 2012-10-25 10:27:29 +02:00
parent adcc776c48
commit d026e461fa
3 changed files with 3 additions and 12 deletions

View file

@ -11,14 +11,10 @@ import play.api.libs.concurrent._
import play.api.Play.current import play.api.Play.current
final class MoveNotifier( final class MoveNotifier(
siteHubName: String, hubNames: List[String],
lobbyHubName: String,
tournamentHubMasterName: String,
countMove: () Unit) { countMove: () Unit) {
lazy val hubRefs = List(siteHubName, lobbyHubName, tournamentHubMasterName) map { name lazy val hubRefs = hubNames map { name Akka.system.actorFor("/user/" + name) }
Akka.system.actorFor("/user/" + name)
}
def apply(gameId: String, fen: String, lastMove: Option[String]) { def apply(gameId: String, fen: String, lastMove: Option[String]) {
countMove() countMove()

View file

@ -43,9 +43,7 @@ final class RoundEnv(
)), name = ActorRoundHubMaster) )), name = ActorRoundHubMaster)
private lazy val moveNotifier = new MoveNotifier( private lazy val moveNotifier = new MoveNotifier(
siteHubName = ActorSiteHub, hubNames = List(ActorSiteHub, ActorLobbyHub, ActorTournamentHubMaster),
lobbyHubName = ActorLobbyHub,
tournamentHubMasterName = ActorTournamentHubMaster,
countMove = countMove) countMove = countMove)
lazy val socket = new Socket( lazy val socket = new Socket(

3
todo
View file

@ -1,8 +1,5 @@
chat should autoscroll only when at bottom chat should autoscroll only when at bottom
finish flagged game 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 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 chess960 confirmation http://fr.lichess.org/forum/lichess-feedback/separate-960-lobby?page=1#7
use POST instead of GET where it makes sense use POST instead of GET where it makes sense