Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(6) | Call(6) | Derive(0) | Import(0)
Adds the given solution to the board. See add_word() for a description of the returned value.
src/s/c/scrabble-HEAD/scrabble.py scrabble(Download)
# Play the winning solution. board.add_solution(solution) winners.append((rack, solution))
src/s/c/scrabble-HEAD/test1.py scrabble(Download)
if solution: print "Winner: %s" % solution board.add_solution(solution) print board
src/s/c/scrabble-HEAD/score_test.py scrabble(Download)
solution.determine_score(board, dictionary) assert solution.score == 10 board.add_solution(solution) solution = Solution(Board.MID_ROW, Board.MID_COL - 1, HORIZONTAL, "DOGS") solution.determine_score(board, dictionary)
src/s/c/scrabble-HEAD/blank_test.py scrabble(Download)
print rack print solution board.add_solution(solution) print board assert solution and solution.word == "HELLO" and solution.score == 22
print rack print solution board.add_solution(solution) print board assert solution and solution.word == "HELLO" and solution.score == 20
src/s/c/scrabble-HEAD/test2.py scrabble(Download)
if solution: print "Winner: %s" % solution board.add_solution(solution) print board assert solution and solution.score == 32