// This function got messy. Sorry. public void DigRiver(River river, int size) { SetRiverTile(river); RiverSize = size; if (size == 1) { if (Bottom != null) { Bottom.SetRiverTile(river); if (Bottom.Right != null) { Bottom.Right.SetRiverTile(river); } } if (Right != null) { Right.SetRiverTile(river); } } if (size == 2) { if (Bottom != null) { Bottom.SetRiverTile(river); if (Bottom.Right != null) { Bottom.Right.SetRiverTile(river); } } if (Right != null) { Right.SetRiverTile(river); } if (Top != null) { Top.SetRiverTile(river); if (Top.Left != null) { Top.Left.SetRiverTile(river); } if (Top.Right != null) { Top.Right.SetRiverTile(river); } } if (Left != null) { Left.SetRiverTile(river); if (Left.Bottom != null) { Left.Bottom.SetRiverTile(river); } } } if (size == 3) { if (Bottom != null) { Bottom.SetRiverTile(river); if (Bottom.Right != null) { Bottom.Right.SetRiverTile(river); } if (Bottom.Bottom != null) { Bottom.Bottom.SetRiverTile(river); if (Bottom.Bottom.Right != null) { Bottom.Bottom.Right.SetRiverTile(river); } } } if (Right != null) { Right.SetRiverTile(river); if (Right.Right != null) { Right.Right.SetRiverTile(river); if (Right.Right.Bottom != null) { Right.Right.Bottom.SetRiverTile(river); } } } if (Top != null) { Top.SetRiverTile(river); if (Top.Left != null) { Top.Left.SetRiverTile(river); } if (Top.Right != null) { Top.Right.SetRiverTile(river); } } if (Left != null) { Left.SetRiverTile(river); if (Left.Bottom != null) { Left.Bottom.SetRiverTile(river); } } } if (size == 4) { if (Bottom != null) { Bottom.SetRiverTile(river); if (Bottom.Right != null) { Bottom.Right.SetRiverTile(river); } if (Bottom.Bottom != null) { Bottom.Bottom.SetRiverTile(river); if (Bottom.Bottom.Right != null) { Bottom.Bottom.Right.SetRiverTile(river); } } } if (Right != null) { Right.SetRiverTile(river); if (Right.Right != null) { Right.Right.SetRiverTile(river); if (Right.Right.Bottom != null) { Right.Right.Bottom.SetRiverTile(river); } } } if (Top != null) { Top.SetRiverTile(river); if (Top.Right != null) { Top.Right.SetRiverTile(river); if (Top.Right.Right != null) { Top.Right.Right.SetRiverTile(river); } } if (Top.Top != null) { Top.Top.SetRiverTile(river); if (Top.Top.Right != null) { Top.Top.Right.SetRiverTile(river); } } } if (Left != null) { Left.SetRiverTile(river); if (Left.Bottom != null) { Left.Bottom.SetRiverTile(river); if (Left.Bottom.Bottom != null) { Left.Bottom.Bottom.SetRiverTile(river); } } if (Left.Left != null) { Left.Left.SetRiverTile(river); if (Left.Left.Bottom != null) { Left.Left.Bottom.SetRiverTile(river); } if (Left.Left.Top != null) { Left.Left.Top.SetRiverTile(river); } } if (Left.Top != null) { Left.Top.SetRiverTile(river); if (Left.Top.Top != null) { Left.Top.Top.SetRiverTile(river); } } } } }
public void DigRiver(River river, int width) { SetRiverTile(river); riverSize = width; if (width == 1) { bottom.SetRiverTile(river); right.SetRiverTile(river); bottom.right.SetRiverTile(river); } if (width == 2) { bottom.SetRiverTile(river); right.SetRiverTile(river); bottom.right.SetRiverTile(river); top.SetRiverTile(river); top.left.SetRiverTile(river); top.right.SetRiverTile(river); left.SetRiverTile(river); left.bottom.SetRiverTile(river); } if (width == 3) { bottom.SetRiverTile(river); right.SetRiverTile(river); bottom.right.SetRiverTile(river); top.SetRiverTile(river); top.left.SetRiverTile(river); top.right.SetRiverTile(river); left.SetRiverTile(river); left.bottom.SetRiverTile(river); right.right.SetRiverTile(river); right.right.bottom.SetRiverTile(river); bottom.bottom.SetRiverTile(river); bottom.bottom.right.SetRiverTile(river); } if (width == 4) { bottom.SetRiverTile(river); right.SetRiverTile(river); bottom.right.SetRiverTile(river); top.SetRiverTile(river); top.right.SetRiverTile(river); left.SetRiverTile(river); left.bottom.SetRiverTile(river); right.right.SetRiverTile(river); right.right.bottom.SetRiverTile(river); bottom.bottom.SetRiverTile(river); bottom.bottom.right.SetRiverTile(river); left.bottom.bottom.SetRiverTile(river); left.left.bottom.SetRiverTile(river); left.left.SetRiverTile(river); left.left.top.SetRiverTile(river); left.top.SetRiverTile(river); left.top.top.SetRiverTile(river); top.top.SetRiverTile(river); top.top.right.SetRiverTile(river); top.right.right.SetRiverTile(river); } }
public void DigRiver(River river, int size) { SetRiverTile(river); RiverSize = size; if (size == 1) { Bottom.SetRiverTile(river); Right.SetRiverTile(river); Bottom.Right.SetRiverTile(river); } if (size == 2) { Bottom.SetRiverTile(river); Right.SetRiverTile(river); Bottom.Right.SetRiverTile(river); Top.SetRiverTile(river); Top.Left.SetRiverTile(river); Top.Right.SetRiverTile(river); Left.SetRiverTile(river); Left.Bottom.SetRiverTile(river); } if (size == 3) { Bottom.SetRiverTile(river); Right.SetRiverTile(river); Bottom.Right.SetRiverTile(river); Top.SetRiverTile(river); Top.Left.SetRiverTile(river); Top.Right.SetRiverTile(river); Left.SetRiverTile(river); Left.Bottom.SetRiverTile(river); Right.Right.SetRiverTile(river); Right.Right.Bottom.SetRiverTile(river); Bottom.Bottom.SetRiverTile(river); Bottom.Bottom.Right.SetRiverTile(river); } if (size == 4) { Bottom.SetRiverTile(river); Right.SetRiverTile(river); Bottom.Right.SetRiverTile(river); Top.SetRiverTile(river); Top.Right.SetRiverTile(river); Left.SetRiverTile(river); Left.Bottom.SetRiverTile(river); Right.Right.SetRiverTile(river); Right.Right.Bottom.SetRiverTile(river); Bottom.Bottom.SetRiverTile(river); Bottom.Bottom.Right.SetRiverTile(river); Left.Bottom.Bottom.SetRiverTile(river); Left.Left.Bottom.SetRiverTile(river); Left.Left.SetRiverTile(river); Left.Left.Top.SetRiverTile(river); Left.Top.SetRiverTile(river); Left.Top.Top.SetRiverTile(river); Top.Top.SetRiverTile(river); Top.Top.Right.SetRiverTile(river); Top.Right.Right.SetRiverTile(river); } }