Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #251 (Handicap stones do not appear) #270

Merged
merged 1 commit into from Jun 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/java/featurecat/lizzie/analysis/Leelaz.java
Expand Up @@ -216,7 +216,7 @@ private void parseLine(String line) {


if (isSettingHandicap) {
for (int i = 2; i < params.length; i++) {
for (int i = 1; i < params.length; i++) {
int[] coordinates = Lizzie.board.convertNameToCoordinates(params[i]);
Lizzie.board.getHistory().setStone(coordinates, Stone.BLACK);
}
Expand Down Expand Up @@ -289,13 +289,13 @@ private void read() {
* @param command a GTP command containing no newline characters
*/
public void sendCommand(String command) {
if (command.startsWith("fixed_handicap"))
isSettingHandicap = true;
command = cmdNumber + " " + command;
cmdNumber++;
if (printCommunication) {
System.out.printf("> %s\n", command);
}
if (command.startsWith("fixed_handicap"))
isSettingHandicap = true;
try {
outputStream.write((command + "\n").getBytes());
outputStream.flush();
Expand Down