artificial lag on AI and websocket member
This commit is contained in:
parent
3689655d7a
commit
b01ccd2a86
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue