software-challenge / backend

Server, Client und Spiel-Plugins der Software-Challenge Germany
https://www.software-challenge.de
11 stars 10 forks source link

BLUE SkipMove sent to server is constructed as YELLOW SkipMove #316

Closed anarchuser closed 3 years ago

anarchuser commented 3 years ago

On first round: Client:

<room roomId="bdeba240-a885-4a6d-b2d4-afbe7e7aa01b">
 <data class="sc.plugin2021.SkipMove">
  <color>BLUE</color>
 </data>
</room>

Server:

<room roomId="bdeba240-a885-4a6d-b2d4-afbe7e7aa01b">
  <data class="error" message="Ungueltiger Zug von &apos;Unknown&apos;.&#xa;Can&apos;t Skip on first round; move was YELLOW skipped">
    <originalRequest class="sc.plugin2021.SkipMove">
      <color>YELLOW</color>
    </originalRequest>
  </data>
</room>
anarchuser commented 3 years ago

Reproduced with GUI 21.0.7 and Backend 21.0.3

anarchuser commented 3 years ago

This behaviour can be seen for BLUE, YELLOW, and RED during the first turn, with the next color each, i.e. BLUE results in YELLOW, YELLOW in RED, RED in GREEN.

During the first turn, if GREEN skips, then the server correctly detects it as GREEN SkipMove, but also doesn't throw.

Note that "first turn" means the first turn of each color, not the first round per se. If the "no skip on first turn" policy is violated and a color skips (like GREEN in the example) Then having the previous color skip results in the same exception. In this case, GREEN used the issue mentioned above to skip the first turn, then in the second round, YELLOW skip succeded, RED skip failed with sc.shared.InvalidMoveException: Can't Skip on first round; move was GREEN skipped

image

anarchuser commented 3 years ago

SkipMoves unrelated to the first round work just fine

anarchuser commented 3 years ago

Issue is fixed and will be released as soon as possible