Browse Source

Unselect the tube after it has been poured

pull/1/head
demisel 9 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
 		
53
 		
54
 		if (this.selectedTube == newSelectedTube)
54
 		if (this.selectedTube == newSelectedTube)
55
 			this.selectedTube = null;
55
 			this.selectedTube = null;
56
-		else if (this.canPourInto(this.selectedTube, newSelectedTube))
56
+		else if (this.canPourInto(this.selectedTube, newSelectedTube)){
57
 			this.pourColorInto(this.selectedTube, newSelectedTube);
57
 			this.pourColorInto(this.selectedTube, newSelectedTube);
58
+			this.selectedTube = null;
59
+		}
58
 		else if (!newSelectedTube.isEmpty())
60
 		else if (!newSelectedTube.isEmpty())
59
 			this.selectedTube = newSelectedTube;
61
 			this.selectedTube = newSelectedTube;
60
 	}
62
 	}

Loading…
Cancel
Save