예제 #1
0
        public NaoState GetNext(NaoCommand command)
        {
            NaoStateTransition transition = new NaoStateTransition(CurrentState, command);
            NaoState           nextState;

            if (!this._transitions.TryGetValue(transition, out nextState))
            {
                throw new Exception("Invalid transition: " + this.CurrentState + " -> " + command);
            }
            return(nextState);
        }
예제 #2
0
        public override bool Equals(object obj)
        {
            NaoStateTransition other = obj as NaoStateTransition;

            return(other != null && this._currentState == other._currentState && this._command == other._command);
        }