Skip to content

"Remove Threats" button clickable in wrong situation #159

@ChristophNiehoff

Description

@ChristophNiehoff

After every player has passed, but before a new card has been drawn, the "Remove Threat" button is still clickable.
The UI suggests that everything is ok, but the threat does not get removed in this corner case.

I believe it is due to

if (hasPlayerPassed(G, ctx) || (threat.owner !== ctx.playerID)) {
  return INVALID_MOVE;
}

in deleteThreats() in moves.js. One is still at a point, where hasPlayerPassed() returns true.

We should disable the Remove Threats button in this case, like done e.g. with the Add Threat button.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions