Skip to content

Commit 5d813ae

Browse files
committed
Change opponent's time pressure threshold
1 parent 5e0357a commit 5d813ae

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lichess_game.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def _offer_draw(self, is_trusted: bool = True, is_draw: bool | None = None) -> b
275275
):
276276
return False
277277

278-
if not self.increment and self.opponent_time < 20.0:
278+
if not self.increment and self.opponent_time < 30.0 and self.opponent_time < self.own_time:
279279
return False
280280

281281
if is_draw is not None:
@@ -311,7 +311,7 @@ def _resign(self, is_trusted: bool = True, is_lost: bool | None = None) -> bool:
311311
):
312312
return False
313313

314-
if not self.increment and self.opponent_time < 20.0:
314+
if not self.increment and self.opponent_time < 30.0 and self.opponent_time < self.own_time:
315315
return False
316316

317317
if is_lost is not None:

0 commit comments

Comments
 (0)