Skip to content

Commit

Permalink
fixed negative time issue (#37)
Browse files Browse the repository at this point in the history
* allow opponent to play on negative time
* bumped version
  • Loading branch information
sictransit authored Dec 3, 2024
1 parent 5fa843d commit f0c5175
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Initializes the engine and provides engine information.
**Example:**
```
uci
id name Woodpusher 1.4.0+d6be4b9c9fa56528613008cd6f05241629906b4f
id name Woodpusher 1.4.1+689e19f3ce89cc8b63870a0e3e3c6f482ed476d3
id author Mikael Fredriksson <[email protected]>
option name OwnBook type check default true
uciok
Expand Down
6 changes: 3 additions & 3 deletions Woodpusher/UniversalChessInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public class UniversalChessInterface
private static readonly Regex PositionRegex =
new(@"^(position).+?(fen(.+?))?(moves(.+?))?$", RegexOptions.Compiled);
private static readonly Regex MovesRegex = new(@"([a-h][1-8][a-h][1-8][rnbq]?)", RegexOptions.Compiled);
private static readonly Regex WhiteTimeRegex = new(@"wtime (\d+)", RegexOptions.Compiled);
private static readonly Regex BlackTimeRegex = new(@"btime (\d+)", RegexOptions.Compiled);
private static readonly Regex WhiteTimeRegex = new(@"wtime (-?\d+)", RegexOptions.Compiled);
private static readonly Regex BlackTimeRegex = new(@"btime (-?\d+)", RegexOptions.Compiled);
private static readonly Regex MovesToGoRegex = new(@"movestogo (\d+)", RegexOptions.Compiled);
private static readonly Regex MovetimeRegex = new(@"movetime (\d+)", RegexOptions.Compiled);
private static readonly Regex PerftRegex = new(@"perft (\d+)", RegexOptions.Compiled);
Expand Down Expand Up @@ -260,4 +260,4 @@ private void Go(string command)
}
}
}
}
}
2 changes: 1 addition & 1 deletion Woodpusher/Woodpusher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Nullable>enable</Nullable>
<RootNamespace>SicTransit.Woodpusher</RootNamespace>
<Authors>Mikael Fredriksson &lt;[email protected]&gt;</Authors>
<Version>1.4.0</Version>
<Version>1.4.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit f0c5175

Please sign in to comment.