claim threefold draw during opponent turn

pull/83/head
Thibault Duplessis 2014-04-28 11:41:09 +02:00
parent 5fcf8cbd8a
commit 0235a90c35
2 changed files with 2 additions and 5 deletions

View File

@ -33,7 +33,7 @@
<a class="force_draw socket-link" data-msg="draw-force">@trans.forceDraw()</a>
</div>
}
@if(game.turnOf(player) && game.toChessHistory.threefoldRepetition) {
@if(game.toChessHistory.threefoldRepetition) {
<div id="claim_draw_zone">
@trans.threefoldRepetition().&nbsp;
<a class="lichess_claim_draw socket-link" data-msg="draw-claim">@trans.claimADraw()</a>

View File

@ -35,10 +35,7 @@ private[round] final class Drawer(messenger: Messenger, finisher: Finisher) {
}
def claim(pov: Pov): Fu[Events] =
(pov.game.playable &&
pov.game.player.color == pov.color &&
pov.game.toChessHistory.threefoldRepetition
) ?? finisher(pov.game, _.Draw)
(pov.game.playable && pov.game.toChessHistory.threefoldRepetition) ?? finisher(pov.game, _.Draw)
def force(game: Game): Fu[Events] = finisher(game, _.Draw, None, None)
}