Skip to content

Commit

Permalink
Merge pull request #836 from nhamil/nhamil/max-bot-ply
Browse files Browse the repository at this point in the history
Make human and bot maximum ply match
  • Loading branch information
WandererXII authored Jun 26, 2024
2 parents 5f81fc6 + 8ed82be commit 9d83f05
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions modules/game/src/main/Game.scala
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,6 @@ object Game {
if (variant.chushogi) 1000
else 700 // unlimited can cause StackOverflowError

val maxBotPlies = 600

val analysableVariants: Set[Variant] = Set(
shogi.variant.Standard,
shogi.variant.Minishogi,
Expand Down
2 changes: 1 addition & 1 deletion modules/round/src/main/Player.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ final private class Player(

private[round] def bot(usi: Usi, round: RoundDuct)(pov: Pov)(implicit proxy: GameProxy): Fu[Events] =
pov match {
case Pov(game, _) if game.playedPlies > Game.maxBotPlies =>
case Pov(game, _) if game.playedPlies > Game.maxPlies(game.variant) =>
round ! TooManyPlies
fuccess(Nil)
case Pov(game, color) if game playableBy color =>
Expand Down

0 comments on commit 9d83f05

Please sign in to comment.