Skip to content

[WIP] Turn base logic#62

Open
Se7enB2st wants to merge 7 commits into
masterfrom
Turn_Base_Logic
Open

[WIP] Turn base logic#62
Se7enB2st wants to merge 7 commits into
masterfrom
Turn_Base_Logic

Conversation

@Se7enB2st

@Se7enB2st Se7enB2st commented Aug 11, 2016

Copy link
Copy Markdown
Contributor

Add:
First Turn:
At the start of the game, set turn number to 1 and color to white.

Turn Base Logic:
Increment turn number at the end of turn.
Alternate color at the end of turn (black or white).

Integrate turn-base logic into move!

It will return false if a moving piece's color doesn't match the game color.
This prevents player moving on a wrong turn, moving in a continuous multiple turns, etc.

@chadbaum

chadbaum commented Aug 15, 2016

Copy link
Copy Markdown
Contributor

As mentioned, no need for color property for game -- turn.even? is black and turn.odd? is white.

@chadbaum

Copy link
Copy Markdown
Contributor

Can you explain what is in this PR vs the En Passant one? You indicate that you already implemented turn-based logic in En Passant. Is the other PR dependent on this one? I think it would be easiest if you instead made 1 PR for turn-based logic, and then 1 PR for en passant based on that.

Also, neither PR is ready to be merged.

@chadbaum chadbaum changed the title Turn base logic [WIP] Turn base logic Aug 16, 2016
@Se7enB2st

Copy link
Copy Markdown
Contributor Author

Yes, En Passant PR is dependent on this PR. After This PR is done, I can merge and refractor the En Passant PR.

@chadbaum

Copy link
Copy Markdown
Contributor

So all turn-based logic is in this PR? None is in the other PR? If you want us to merge this one first, please note that the other one is dependent with the normal [] syntax in header.

Also please remove the extra column as mentioned above.

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.

2 participants