示例#1
0
        public Bomb GetBomb()
        {
            for (int i = 0; i < movableCells.Count; ++i)
            {
                MovableCell cell = movableCells[i];
                if (cell.IsBomb())
                {
                    return(cell.AsBomb());
                }
            }

            return(null);
        }
示例#2
0
        protected override bool HandleCollision(MovableCell other)
        {
            if (other.IsBomb())
            {
                return(HandleCollision(other.AsBomb()));
            }

            if (other.IsPlayer())
            {
                return(HandleCollision(other.AsPlayer()));
            }

            return(false);
        }