From 9ea20b6c1f39a32582cac3d1a1828a90dabe422e Mon Sep 17 00:00:00 2001 From: TiynGER Date: Sat, 1 May 2021 01:56:07 +0200 Subject: [PATCH] lichess: turned down difficulty and removed unnecessary echoes --- src/lichess.nim | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/lichess.nim b/src/lichess.nim index 1c7a7d3..fdcd1cf 100644 --- a/src/lichess.nim +++ b/src/lichess.nim @@ -11,7 +11,7 @@ var session = berserk.TokenSession(secret.api_token) var client = berserk.Client(session=session) let engineID = "tiyn-ychess" -let engineDifficulty = 5 +let engineDifficulty = 3 let toAccept = ["tiynger"] @@ -27,22 +27,16 @@ proc playGame(id: string) {.async.} = echo("gameFull received") movesString = event["state"]["moves"] if $event["white"]["id"] == engineID: - echo("white assigned") color = Color.White if $event["black"]["id"] == engineID: - echo("black assigned") color = Color.Black else: echo("gameState received") movesString = event["moves"] - echo("movesString",movesString) if $movesString != "": - echo("movestring not empty") var moves = movesString.split(" ") game.checkedMove(notationToMove($moves[-1], game.toMove)) game.echoBoard(game.toMove) - echo("toMove", game.toMove) - echo("color", color) if game.toMove == color: echo("engine has to make a move") var bestMove = moveToNotation(game.bestMove(engineDifficulty))