def main(): scratch.init() scratch.newGame() scratch.printAll() scratch.simulateGame() scratch.postGameToTumblr()
def get_best_move(self, board, rack): print 'get_best_move' scratch.newGame() scratch.setBoard(board) scratch.setCurrentRack(rack) scratch.printAll() results = scratch.bestMove() pos = scratch.DirectedPosition(results[2][0], results[2][1], results[2][2]) move = {} scratch.placeWord(move, pos.row, pos.col, pos.vert, results[1].upper()) return move