public GameState GetCurrentState()
        {
            var validator = new GameActionValidator();
            var state = Game.GetLastValidState(LastAction, validator);

            if (validator.IsValid == false)
                throw new Exception(validator.GetSummary());

            return state;
        }
Exemple #2
0
 private static void PrintError(GameActionValidator validator)
 {
     Console.ForegroundColor = ConsoleColor.Red;
     Console.WriteLine(validator.GetSummary());
     Console.ResetColor();
     Console.ReadLine();
 }