Skip to content

Commit

Permalink
Remove 'if possible' since all moves are conditional on eligibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeybohm committed Aug 28, 2023
1 parent 7c36b26 commit 4a728b9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ui/console/play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ namespace wisdom::ui::console
<< " exit Quit a game\n"
<< " a2c3 Move the piece at a2 to c3 (example)\n"
<< " a2xc3 Take the piece at c3 with the piece on a2 (example)\n"
<< " o-o Castle kingside if possible\n"
<< " o-o-o Castle queenside if possible\n"
<< " o-o Castle kingside\n"
<< " o-o-o Castle queenside\n"
<< " a7a8(q) Promote pawn to queen (example)\n"
<< " a7xa8(q) Capture the piece on a8 and promote the pawn to a Queen\n"
<< " a7a8(r) Promote pawn to rook (example)\n"
Expand All @@ -298,12 +298,7 @@ namespace wisdom::ui::console

input = chomp (input);

if (input == "help")
{
printHelp();
return result;
}
else if (input == "moves")
if (input == "moves")
{
printAvailableMoves (game, move_generator);
return result;
Expand Down Expand Up @@ -389,6 +384,11 @@ namespace wisdom::ui::console
result.command = PlayCommand::StopGame;
return result;
}
else
{
printHelp();
return result;
}

result.move = moveParseOptional (input, game.getCurrentTurn());
result.command = PlayCommand::ShowError;
Expand Down

0 comments on commit 4a728b9

Please sign in to comment.