Beispiel #1
0
        public bool ContainsObstacle()
        {
            if (staticCell != null)
            {
                return(staticCell.IsObstacle());
            }

            for (int i = 0; i < movableCells.Count; ++i)
            {
                MovableCell cell = movableCells[i];
                if (cell.IsObstacle())
                {
                    return(true);
                }
            }

            return(false);
        }
        /* Not movable cell */
        protected virtual bool HandleStaticCollision(FieldCell other)
        {
            if (other.IsObstacle())
            {
                MoveFromOverlap(other);
                return true;
            }

            return false;
        }