public AiMap(Map.Map map) { Height = map.Height; Width = map.Width; _cells = new AiMapCell[map.Width, map.Height]; // Copy the map into the AI map for (int y = 0; y < map.Height; y++) { for (int x = 0; x < map.Width; x++) { _cells[x, y] = new AiMapCell(this, x, y, map.Cell(x, y)); } } // Add the possible moves from every cell for (int y = 0; y < map.Height; y++) { for (int x = 0; x < map.Width; x++) { _cells[x, y].UpdatePossibleDirections(); } } }
public void DrawMap(Map.Map map, bool white) { _display.Fill(_spriteSet.Blank); for (int y = 0; y < map.Height; y++) { for (int x = 0; x < map.Width; x++) { _display.Update(_spriteSet.Map(map.Cell(x, y).Piece, white), x, y + BoardYOffset); } } }