public void PutInHolder(GrabbableScribbler scribbler, ScribblerHolder targetHolder) { targetHolder.AddScribbler(scribbler); bool isPuzzleSolved = false; if (NumScribblersInHolders() == allScribblers.Count) { isPuzzleSolved = true; // Flip bool before this for-loop foreach (ScribblerHolder holder in allHolders) { if (!holder.AreAllScribblersOfTheSameType()) { isPuzzleSolved = false; break; } } } if (isPuzzleSolved) { Debug.Log("Scribbler sorting puzzle is solved!"); CompletePuzzle(); } }
public void PutInHolder(GrabbableScribbler scribbler, ScribblerHolder targetHolder) { targetHolder.AddScribbler(scribbler); bool isPuzzleSolved = false; if (NumScribblersInHolders() == allScribblers.Count) { isPuzzleSolved = true; // Flip bool before this for-loop foreach (ScribblerHolder holder in allHolders) { if (!holder.AreAllScribblersOfTheSameType()) { isPuzzleSolved = false; break; } } } if (isPuzzleSolved) { Debug.Log("Scribbler sorting puzzle is solved!"); } }