diff options
author | Stephen Enders <smenders@gmail.com> | 2021-01-29 13:43:20 -0500 |
---|---|---|
committer | Stephen Enders <smenders@gmail.com> | 2021-01-29 13:43:27 -0500 |
commit | 6f3e64619980c87cf5d4cceff0b4546fb0aa6ae7 (patch) | |
tree | a82cb31a314cc45c0e7cf7cdaee652da6458541a | |
parent | 91c91b2a6e3b8694988e7f81c99230ec019ecbd8 (diff) |
Don't clear all pieces upon capture
Bug setting assignment instead of comparison. Classic
-rw-r--r-- | src/ur.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -337,7 +337,7 @@ main() // did we take a piece if (takenPieceId >= 0) { for (auto& ep : (*enemyPieces)) { - if (ep.id = takenPieceId) { + if (ep.id == takenPieceId) { ep.sprite.setPosition(ep.origin); ep.position = -1; } |