Skip to content

Commit

Permalink
tweak move notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Oct 25, 2012
1 parent adcc776 commit d026e46
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
8 changes: 2 additions & 6 deletions app/round/MoveNotifier.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 1 addition & 3 deletions app/round/RoundEnv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 0 additions & 3 deletions todo
Original file line number Diff line number Diff line change
@@ -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:https://fr.lichess.org/forum/lichess-feedback/clock-fairness-in-chess960-games
chess960 confirmation http:https://fr.lichess.org/forum/lichess-feedback/separate-960-lobby?page=1#7
use POST instead of GET where it makes sense
Expand Down

0 comments on commit d026e46

Please sign in to comment.