Browse Source

Unselect the tube after it has been poured

pull/1/head
demisel 11 months ago
parent
commit
f4053effa8
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      js/game.js

+ 3
- 1
js/game.js View File

@@ -53,8 +53,10 @@ class Game {
53 53
 		
54 54
 		if (this.selectedTube == newSelectedTube)
55 55
 			this.selectedTube = null;
56
-		else if (this.canPourInto(this.selectedTube, newSelectedTube))
56
+		else if (this.canPourInto(this.selectedTube, newSelectedTube)){
57 57
 			this.pourColorInto(this.selectedTube, newSelectedTube);
58
+			this.selectedTube = null;
59
+		}
58 60
 		else if (!newSelectedTube.isEmpty())
59 61
 			this.selectedTube = newSelectedTube;
60 62
 	}

Loading…
Cancel
Save