예제 #1
0
파일: Board.cs 프로젝트: beanhome/dev
    public bool IsFree(int x, int y, int w, int h, Piece Ignore)
    {
        for (int i=x ; i<x+w ; ++i)
        {
            for (int j=y ; j<y+h ; ++j)
            {
                if (i < 0 || j < 0 || i >= m_iBlockCountX || j >= m_iBlockCountY
                 || m_aBlock[i,j] && !Ignore.AtPos(i,j))
                    return false;
            }
        }

        return true;
    }