private bool AddObjectivesToFill() { for (int x = 0; x < model.Width; x++) { for (int y = 0; y < model.Height; y++) { IBallController ball = model.GetBrick(x, y); TileController tile = model.GetTile(x, y); if (ball.GetObjectiveType() != ObjectiveType.NONE && ball.GetObjectiveType() == tile.GetObjectiveType()) { BallFillObjectiveCommand command = new BallFillObjectiveCommand(this, ball, tile); PrepareBrickFillObjective(command); } } } return(objectiveCommands.Count > 0); }
private void PrepareBrickFillObjective(BallFillObjectiveCommand command) { PrepareCommand(command); objectiveCommands.Push(command); }