예제 #1
0
    private depthInfo getTypeAndDepth(BoardWar board, int x)
    {
        int topy  = board.GetHighestYAtX(x);
        int type  = board.GetTopValueAtX(x);
        int depth = 1;

        for (int y = topy - 1; y >= 0; y--)
        {
            Tile val = board.GetValueAtXY(x, y);
            if (!val.IsDead() && val.GetColorVal() != type)
            {
                break;
            }
            depth++;
        }
        return(new depthInfo(x, type, depth, 0, topy));
    }
예제 #2
0
 private bool StillHasTypeAtPos(BoardWar board, int x, int type)
 {
     return(board.GetTopValueAtX(x) == type);
 }