public void PrintErrorMessage(string errorMessage) { ConsoleFeatures.ClearRow(ConsoleConstants.ConsoleRowForMessageOutput); Console.Write(new string(' ', Console.WindowWidth)); Console.SetCursorPosition(Console.WindowWidth / 2 - 12, ConsoleConstants.ConsoleRowForMessageOutput); Console.Write(errorMessage); Thread.Sleep(2000); ConsoleFeatures.ClearRow(ConsoleConstants.ConsoleRowForMessageOutput); }
public Move GetNextPlayerMove(IPlayer player) { ConsoleFeatures.ClearRow(ConsoleConstants.ConsoleRowForMessageOutput); Console.SetCursorPosition(Console.WindowWidth / 2 - 12, ConsoleConstants.ConsoleRowForMessageOutput); Console.BackgroundColor = ConsoleColor.Black; Console.Write($"{player.Name} IS NEXT :"); var positionInputFromUserAsString = Console.ReadLine().Trim().ToLower(); return(ConsoleFeatures.CreateMoveFromCommand(positionInputFromUserAsString)); }