Beispiel #1
0
 public void insert(BloodyTile toInsert, int x, int y)
 {
     mGrid[x, y] = toInsert;
 }
Beispiel #2
0
 public void Push(BloodyTile tile)
 {
     Queue.AddLast(tile);
     Debug.WriteLine("Adding to queue: tile=" + tile.GetType().Name);
 }
Beispiel #3
0
        public bool canInsert(BloodyTile toInsert, int x, int y)
        {
            if (isInInnerGrid(x, y) && getTile(x, y).isNullTile())
            {
                int index = -1;
                int traceX = mStartX;
                int traceY = mStartY;
                trace(ref index, ref traceX, ref traceY);

                if (x == traceX && y == traceY)
                {
                    index = toInsert.getNextIndex(index);
                    if (-1 == index)
                        return false;
                    traceX += mAdjacencyLUT[index, 0];
                    traceY += mAdjacencyLUT[index, 1];
                    return canDrawTile(traceX, traceY);
                }

                return true;
            }
            return false;
        }