Esempio n. 1
0
def analyzeHorizOfVertical(topMost):
    tileRow=topMost[0]
    tileCol=topMost[1]
    topMost=topMost
    board=canvas.data.tilesOnBoard
    string=""
    #Now we want to sweep down until we hit the bottom
    while (board[tileRow][tileCol]!=False):
        tile = board[tileRow][tileCol]  #col stays constant
        string+=tile.letter
        tileRow+=1
    if len(string)==1:
        return True
    else:
        return isAWord(string)  #if use isAWord function, must set nuance that 1 letter word passes
Esempio n. 2
0
def analyzeVertOfHorizontal(leftMost):
    tileRow=leftMost[0]
    tileCol=leftMost[1]
    leftMost=leftMost
    string=""
    board=canvas.data.tilesOnBoard

    #Now we want to sweep to the right until we hit the edge of the word
    while (board[tileRow][tileCol]!=False):
        tile=board[tileRow][tileCol]
        string+=tile.letter
        tileCol+=1
    if len(string)==1:
            return True
    else:
        return isAWord(string)