Example #1
0
        /// <summary>
        /// </summary>
        /// <param name="tileIndex"></param>
        /// <param name="unitID"></param>
        /// <param name="postiveORnegative"></param>
        /// <param name="XYZ"></param>
        public void MoveUnit(int unitID, tile tileAt, tile tileTo, unitLib uLib)
        {
            if (tileAt.unitExists(unitID) && Tile_IsAdjacentTo(tileAt, tileTo) && uLib.unitList[uLib.FindIndexOfUnit_AtUnitID(unitID)].CurrentMovePoints > 0)
            {
                tileAt.removeUnit(unitID);
                tileTo.addUnit(unitID);

                uLib.unitList[uLib.FindIndexOfUnit_AtUnitID(unitID)].CurrentMovePoints--;
            }
        }