herzbube / littlego

Little Go. An iOS application that lets you play the game of Go on the iPhone or iPad.
https://littlego.herzbube.ch/
Apache License 2.0
138 stars 53 forks source link

Resigning player is lost when non-alternating play is used #341

Closed herzbube closed 3 years ago

herzbube commented 3 years ago
  1. Start new game with "Little Go" ruleset, but change "Dispute resolution" to non-alternating play.
  2. Play two pass moves. The game ends.
  3. Resume play.
  4. When the app asks you which side should play first: Select white.
  5. Resign. The status area correctly shows "White resigned".
  6. Go back one board position.
  7. Go forward one board position.

Expected:The status areay shows "White resigned". Actual: The status areay shows "Black resigned".

herzbube commented 3 years ago

The problem is that the information who resigned is not properly registered - there is only one enum value GoGameHasEndedReasonResigned which must evaluated together with the nextMoveColor property in GoGame. But that property is volatile and is not preserved when the board position is changed.