Beispiel #1
0
        public bool ContainsPlayer()
        {
            for (int i = 0; i < movableCells.Count; ++i)
            {
                MovableCell cell = movableCells[i];
                if (cell.IsPlayer())
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #2
0
        protected override bool HandleCollision(MovableCell other)
        {
            if (other.IsBomb())
            {
                return(HandleCollision(other.AsBomb()));
            }

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

            return(false);
        }