public BoardFrame(Map map) { _board = new ColoredPillar[map.Height, map.Width]; for (int x = 0; x < map.Width; x++) { for (int y = 0; y < map.Height; y++) { _board[y, x] = ColoredPillar.Parse(map.GetField(x, y)); } } }
/// <summary> /// Change values on the frame at a specific position. /// </summary> /// <param name="position">Can be a non reference <see cref="ColoredPillar"/>.</param> public void SetInPosition(ColoredPillar position) { _board[position.Y, position.X] = position; Log.Debug($"BoardFrame.SetInPosition({position.X}; {position.Y}) Height: {position.Height}", -1); }
/// <summary> /// Initialize a new instance with the default /// FontColor and BackGroundColor properties. /// </summary> public ColoredPillar(ColoredPillar pillar) : this(pillar.X, pillar.Y, pillar.Height, ConsoleColor.White, ConsoleColor.Black) { }