private void DrawCoord(Field sender, MoveArgs e) { Console.SetCursorPosition(e.Col, e.Row); Console.ForegroundColor = GetColor(e); Console.Write(GetChar(e.Value)); }
private static ConsoleColor GetColor(MoveArgs e) { return(e.Value switch { Field.Mine when e.Move == Move.Reveal => ConsoleColor.Yellow, Field.Mine when e.Move != Move.Reveal => ConsoleColor.Red, _ => ConsoleColor.Gray });