//private Core core; // private Core() public static void Init() { uint[] size = null; while (true) { PrintOut.PrintMenu(); try { string initAns = Console.ReadLine(); user = new UserInputController(); FieldType = (FieldType)(user.ChooseFieldType(initAns)); break; } catch (InvalidInputException e) { CatchActions(e); } } while (size == null) { try { PrintOut.CustomizeSizeW(); string w = Console.ReadLine(); PrintOut.CustomizeSizeL(); string l = Console.ReadLine(); size = user.ChooseFieldSize(w, l); } catch (Exception e) { CatchActions(e); } } Switch(FieldType, size[0], size[1]); history = new HistoryCareTaker(); undoCommand = new UndoCommand(history); Console.Clear(); }
public UndoCommand(HistoryCareTaker _history) { history = _history; }
public MoveTagCommand(FromToCoords _fromTo, Field _field, HistoryCareTaker _history) { field = _field; history = _history; fromTo = _fromTo; }