public AttemptedTransitionDuringTransitionException(TState from, TState to, Transition currentTransition) : base($"Attempted Transition from '{from.ToString()}' to '{to.ToString()}' during Transition '{currentTransition.from.ToString()}' to '{currentTransition.to.ToString()}S'") { this.From = from; this.To = to; this.CurrentTransition = currentTransition; }
public override string ToString() { if (IsDirty) { return("Dirty"); } else if (MultilineToken) { return("Multiline"); } else { return(EndLineState.ToString()); } }
public void MakeMove(IPlayer user, IGridPoint point) { if (user.Assignment.ToString() == TState.ToString()) { //Move permitted, check Location if (GameGrid.CheckOpenLocation(point)) { point.SetOwnership(user); GameGrid.CommitAndUpdateBoard(user); } else { throw new ArgumentException(); } } }
public InvalidTransitionException(TState from, TState to) : base($"Invalid transition from '{from.ToString()}' to '{to.ToString()}'") { From = from; To = to; }
public InvalidStateException(TState state, TState to) : base($"Invalid state '{state.ToString()}'") { State = state; }