public GameState GetCurrentState() { var validator = new GameActionValidator(); var state = Game.GetLastValidState(LastAction, validator); if (validator.IsValid == false) throw new Exception(validator.GetSummary()); return state; }
private static void PrintError(GameActionValidator validator) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine(validator.GetSummary()); Console.ResetColor(); Console.ReadLine(); }