Skip to content

Commit

Permalink
Making uci.cpp ligroubd compatible
Browse files Browse the repository at this point in the history
Changed the square indices to be liground compatible, thanks to huynq55
  • Loading branch information
mtaktikos authored Jan 18, 2023
1 parent 4fc3e73 commit e80de53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/uci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,9 @@ string UCI::wdl(Value v, int ply) {
/// UCI::square() converts a Square to a string in algebraic notation (g1, a7, etc.)

std::string UCI::square(Square s) {
return std::string{ char('a' + file_of(s)), char('0' + rank_of(s)) };
if (rank_of(s) < 9)
return std::string{ char('a' + file_of(s)), char('1' + rank_of(s)) };
else return std::string{ char('a' + file_of(s)), char('1'), char('0') };
}


Expand Down

0 comments on commit e80de53

Please sign in to comment.