public void Draw(int[,] Map, PositionStruct playerPositin) { Console.Clear(); Console.CursorVisible = false; DrawMargin(); DrawMap(Map); DrawAtPosition(playerPositin, ConsoleColor.Yellow, PlayerChar); }
/// <summary> /// draw text at position with specific color /// </summary> /// <param name="position"></param> /// <param name="color"></param> /// <param name="text"></param> private void DrawAtPosition(PositionStruct position, ConsoleColor color, char text) { Console.CursorVisible = false; var previousColor = Console.ForegroundColor; Console.ForegroundColor = color; SetCursore(position.Width, position.Height); Console.Write(text); Console.ForegroundColor = previousColor; }