Skip to content

Conversation

@mtrich
Copy link
Owner

@mtrich mtrich commented Dec 4, 2018

No description provided.

return true;
}
}
//if selected piece is white check if move is legal
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your isLegalWhite and isLegalBlack are very similar. Could you have had 1 method and just passed in a variable that indicated if it was white or black?

{
//checks if piece is moving left
bool movingLeft = MovingLeft(columnStart, columnTo);
if(//columnTo and rowTo is empty and piece is not moving to same row and column
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that if condition is a little hard to read. maybe using variable to hold each "thing" you are testing, or having multiple if statements?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants