bhazzard / stoneage

1 stars 0 forks source link

Current player indicator sometimes wrong #46

Closed mdellanoce closed 12 years ago

mdellanoce commented 12 years ago

It was player 1's turn, but the current player indicator showed it as player 2's turn... not totally sure how I got into that state, though.

mdellanoce commented 12 years ago

Steps to reproduce:

  1. Put 5 red on a workspace
  2. Put 5 green on a workspace
  3. Resolve red
  4. Resolve green
  5. Put 5 green on a workspace
  6. Put 4 red on a workspace

At this point, it is still be red's turn (because green has no remaining workers), but it shows as green's turn.

mdellanoce commented 12 years ago

The problem was that the turn skipping logic was actually taking place during the start of a placement phase. So basically, player 1 would place, then it would be player 2's turn, so you click to place but player 2 has nothing left to place, so at this point the game decides it is actually player 1 placing. I just moved the turn skipping logic to right after the end of a placement (rather than just before it) and that resolves the issue

bhazzard commented 12 years ago

I think it happens when placing workers and one player has none left to place. So that players turn should be skipped.

On Jan 21, 2012, at 9:08 AM, Michael Dellanocereply@reply.github.com wrote:

It was player 1's turn, but the current player indicator showed it as player 2's turn... not totally sure how I got into that state, though.


Reply to this email directly or view it on GitHub: https://github.com/mdellanoce/stoneage/issues/46

mdellanoce commented 12 years ago

Yep fixed it

Sent from my iPhone

On Jan 21, 2012, at 2:38 PM, Brian Hazzardreply@reply.github.com wrote:

I think it happens when placing workers and one player has none left to place. So that players turn should be skipped.

On Jan 21, 2012, at 9:08 AM, Michael Dellanocereply@reply.github.com wrote:

It was player 1's turn, but the current player indicator showed it as player 2's turn... not totally sure how I got into that state, though.


Reply to this email directly or view it on GitHub: https://github.com/mdellanoce/stoneage/issues/46


Reply to this email directly or view it on GitHub: https://github.com/mdellanoce/stoneage/issues/46#issuecomment-3598472