govariantsteam / govariants

A place to play Go variants
https://www.govariants.com
GNU Affero General Public License v3.0
5 stars 1 forks source link

[quantum] Wrong player given the win for resignation #333

Closed benjaminpjones closed 1 day ago

benjaminpjones commented 1 week ago

https://www.govariants.com/game/673a1ad0ac18ee7204eab931

The UI says B+R, but the last move is {"0": "resign"}

SameerDalal commented 1 day ago

Found the issue in the playMove function in quantum.ts

Instead of this.result = player === 0 ? "B+R" : "W+R"; it should be this.result = player === 0 ? "W+R" : "B+R";

If move is "resign" and player is 0 (black), then the result should be "W+R"

Also, I think the same issue is happening with timeout. The B+T and W+T should be swapped

benjaminpjones commented 1 day ago

Correct!