private void DrawTile(Tile cell, Graphics g) { g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; var dy = cell.location.X % 2 * 0.5f; var x = (cell.location.X + 4); var y = (cell.location.Y + 4); var voffset = mapSize + 2; var hoffset = mapSize + 2; var brush = new SolidBrush(GetColor(cell.tileObject, cell.tileTerrain, true, true, true)); g.FillEllipse(brush, x * diameter, (y + dy) * diameter, diameter, diameter); brush = new SolidBrush(GetColor(cell.tileObject, cell.tileTerrain, false, true, false)); g.FillEllipse(brush, (x + hoffset) * diameter, (y + dy) * diameter, diameter, diameter); brush = new SolidBrush(GetColor(cell.tileObject, cell.tileTerrain, false, false, true)); g.FillEllipse(brush, (x + 2 * hoffset) * diameter, (y + dy) * diameter, diameter, diameter); brush = new SolidBrush(GetColor(cell.tileObject, cell.tileTerrain, true, false, true)); g.FillRectangle(brush, x * diameter, (y + voffset) * diameter, diameter, diameter); var ind = new SigmaIndex(cell.location.Y, cell.location.X); var size = new MapSize(mapSize, mapSize); brush = new SolidBrush(ind.IsBelowDiagonal(size) ? Color.Red : (ind.IsAboveDiagonal(size) ? Color.Green : Color.Gray)); g.FillEllipse(brush, (x + hoffset) * diameter, (y + dy + voffset) * diameter, diameter, diameter); }
public ModifiedMapWrapper(ISigmaMap <TCell> parent, SigmaIndex modLocation, TCell modCell) { ParentMaze = parent; ModifiedLocation = modLocation; ModifiedCell = modCell; }
public override TCell this[SigmaIndex index] { get { return(ModifiedLocation.Equals(index) ? ModifiedCell : ParentMaze[index]); } }