public static void Draw() { //Self path draw if (DrawMap.ThisCase.State != ARX.State.Void) { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathInside()); } //Externals paths draw if (DrawMap.Map.CanGoUp(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathUp()); } if (DrawMap.Map.CanGoRight(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathRight()); } if (DrawMap.Map.CanGoDown(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathDown()); } if (DrawMap.Map.CanGoLeft(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathLeft()); } }
public static void Draw() { //Create internal angles if (!DrawMap.Map.CanGoUp(DrawMap.ThisCase.Coord) && !DrawMap.Map.CanGoRight(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillPie(DrawMap.PathBrush, DrawMap.PathInside(), 270, 90); } else { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, InUpRight()); } if (!DrawMap.Map.CanGoRight(DrawMap.ThisCase.Coord) && !DrawMap.Map.CanGoDown(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillPie(DrawMap.PathBrush, DrawMap.PathInside(), 0, 90); } else { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, InDownRight()); } if (!DrawMap.Map.CanGoDown(DrawMap.ThisCase.Coord) && !DrawMap.Map.CanGoLeft(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillPie(DrawMap.PathBrush, DrawMap.PathInside(), 90, 90); } else { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, InDownLeft()); } if (!DrawMap.Map.CanGoLeft(DrawMap.ThisCase.Coord) && !DrawMap.Map.CanGoUp(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillPie(DrawMap.PathBrush, DrawMap.PathInside(), 180, 90); } else { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, InUpLeft()); } //Create path between cases if (DrawMap.Map.CanGoUp(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathUp()); } if (DrawMap.Map.CanGoRight(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathRight()); } if (DrawMap.Map.CanGoDown(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathDown()); } if (DrawMap.Map.CanGoLeft(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DrawMap.PathLeft()); } //Create externals angles if (DrawMap.Map.CanGoUp(DrawMap.ThisCase.Coord) && DrawMap.Map.CanGoRight(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, UpRightArc()); } if (DrawMap.Map.CanGoRight(DrawMap.ThisCase.Coord) && DrawMap.Map.CanGoDown(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DownRightArc()); } if (DrawMap.Map.CanGoDown(DrawMap.ThisCase.Coord) && DrawMap.Map.CanGoLeft(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, DownLeftArc()); } if (DrawMap.Map.CanGoLeft(DrawMap.ThisCase.Coord) && DrawMap.Map.CanGoUp(DrawMap.ThisCase.Coord)) { DrawMap.PictureElement.Graphics.FillRectangle(DrawMap.PathBrush, UpLeftArc()); } DrawMap.PictureElement.Graphics.FillEllipse(DrawMap.BackBrush, OutsideArc()); }