public Map(int width, int height) { Width = width; Height = height; _matrix = new Colors[Width, Height]; Ant = new Ant(); Ant.Coordinate = Point.Construct(Width / 2, Height / 2); var random = new Random(); for (int i = 0; i < Width; i++) { for (int j = 0; j < Height; j++) { _matrix[i, j] = random.Next(2) == 0 ? Colors.Black : Colors.White; } } }
public Colors GetColor(Ant ant) { return(_matrix[ant.Coordinate.X, ant.Coordinate.Y]); }
public void SetAnt(Ant ant) { this.Ant = ant; }