Example #1
0
        /// <summary>
        /// Default check whether a Unit can or not move to destination
        /// </summary>
        /// <param name="destination"></param>
        /// <returns></returns>
        public virtual bool CheckMove(ITile destination)
        {
            // Minimum verifications before allowing a move,
            // every Unit extension should add up their own limitations
            bool possibleMove = (this.Mvt > 0)
                && GameMaster.GM.CurrentGame.CurrentPlayerIsMe
                && (!destination.IsOccupiedByEnnemy(this))
                && (destination != this.Position);

            return possibleMove;
        }