private bool SetBoxMovedFlag(Box box) { bool flagAnyBoxWasMoved; lastAction.IsBoxMoved = true; lastAction.BoxID = box.ID; flagAnyBoxWasMoved = true; return flagAnyBoxWasMoved; }
private void BackBox(Box box) { level.SetEmpty(box.Position); box.Position -= lastAction.MoveVector; level.SetEmpty(box.Position, false); }
private bool MoveBox(Box box, Vector2 NextToBox, bool flagAnyBoxWasMoved) { box.Position = NextToBox; level.SetEmpty(NextToBox, false); level.SetEmpty(player.Position); flagAnyBoxWasMoved = SetBoxMovedFlag(box); return flagAnyBoxWasMoved; }