tweak move notifier

pull/83/head
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
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()

View File

@ -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(

3
todo
View File

@ -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