From 6f3e64619980c87cf5d4cceff0b4546fb0aa6ae7 Mon Sep 17 00:00:00 2001 From: Stephen Enders Date: Fri, 29 Jan 2021 13:43:20 -0500 Subject: Don't clear all pieces upon capture Bug setting assignment instead of comparison. Classic --- src/ur.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ur.cpp b/src/ur.cpp index f0b2cd0..a1d88e8 100644 --- a/src/ur.cpp +++ b/src/ur.cpp @@ -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; } -- cgit v1.2.3-54-g00ecf