MingStar.SimUniversity.Game.Game.IsLegalMove C# (CSharp) Method

IsLegalMove() public method

public IsLegalMove ( IPlayerMove move ) : bool
move IPlayerMove
return bool
        public bool IsLegalMove(IPlayerMove move)
        {
            if (move is RandomMove)
            {
                return true;
            }
            if (CurrentPhase == GamePhase.Play && !CurrentUniversity.HasStudentsFor(move.StudentsNeeded))
            {
                return false;
            }
            var updateMove = move as IPlayerMoveForUpdate;
            Debug.Assert(updateMove != null);
            return updateMove.IsLegalToApply(this);
        }