else do the recursive call to getpotentialmoves( results getpotentialmoves(dupeboard tilelookahead potentialmoves[firstmove+(sum(resultsboardwidthboardwidth return potentialmoves def getlowestemptyspace(boardcolumn) return the row number of the lowest empty row in the given column for in range(boardheight- - - ) if board[column][ =empty return return - def isvalidmove(boardcolumn) returns true if there is an empty space in the given column otherwise returns false if column (boardwidthor board[column][ !empty return false return true def isboardfull(board) returns true if there are no empty spaces anywhere on the board for in range(boardwidth) for in range(boardheight) if board[ ][ =empty return false return true def iswinner(boardtile) check horizontal spaces for in range(boardwidth ) for in range(boardheight) if board[ ][ =tile and board[ + ][ =tile and board[ + ][ =tile and board[ + ][ =tile return true check vertical spaces for in range(boardwidth) for in range(boardheight ) if board[ ][ =tile and board[ ][ + =tile and board[ ][ + =tile and board[ ][ + =tile