cleanup
This commit is contained in:
@@ -23,15 +23,13 @@ public class Water : Solid {
|
||||
if (randomDirection.Y != 0)
|
||||
randomDirection *= Vector2I.Left * (int)(GD.Randi() % MAX_VERTICAL_SPREAD);
|
||||
|
||||
if (Level.IsEmpty(Position + Vector2I.Down)) {
|
||||
if (Level.IsEmpty(Position + Vector2I.Down))
|
||||
Level.Swap(this, Position + Vector2I.Down);
|
||||
|
||||
} else if (Level.IsEmpty(Position + randomDirection)) {
|
||||
else if (Level.IsEmpty(Position + randomDirection))
|
||||
Level.Swap(this, Position + Vector2I.Right * randomDirection);
|
||||
|
||||
} else if (Level.IsEmpty(Position + randomDirection)) {
|
||||
else if (Level.IsEmpty(Position + randomDirection))
|
||||
Level.Swap(this, Position + Vector2I.Right * randomDirection * VERTICAL_OPPOSITE);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user