artificial lag on AI and websocket member

This commit is contained in:
Thibault Duplessis 2014-10-21 00:40:54 +02:00
parent 3689655d7a
commit b01ccd2a86
2 changed files with 7 additions and 0 deletions

View file

@ -23,6 +23,7 @@ final class Client(
else fufail("[ai stockfish] invalid position")
def play(game: Game, level: Int): Fu[PlayResult] = withValidSituation(game) {
// Thread sleep 2000
for {
fen game.variant.exotic ?? { GameRepo initialFen game.id }
uciMoves uciMemo get game

View file

@ -20,6 +20,12 @@ trait SocketMember extends Ordered[SocketMember] {
def compare(other: SocketMember) = ~userId compare ~other.userId
def push(msg: JsValue) {
// import play.api.Play.current
// import play.api.libs.concurrent.Akka
// import scala.concurrent.duration._
// Akka.system.scheduler.scheduleOnce(2.second) {
// channel push msg
// }
channel push msg
}