claim threefold draw during opponent turn
parent
5fcf8cbd8a
commit
0235a90c35
|
@ -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().
|
||||
<a class="lichess_claim_draw socket-link" data-msg="draw-claim">@trans.claimADraw()</a>
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue