示例#1
0
def main():
    scratch.init()
    scratch.newGame()
    scratch.printAll()

    scratch.simulateGame()
    scratch.postGameToTumblr()
示例#2
0
def main():
    scratch.init()
    scratch.newGame()
    scratch.printAll()

    scratch.simulateGame()
    scratch.postGameToTumblr()
示例#3
0
    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
示例#4
0
    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