Exemplo n.º 1
0
def main():
    scratch.init()
    scratch.newGame()
    scratch.printAll()

    scratch.simulateGame()
    scratch.postGameToTumblr()
Exemplo n.º 2
0
def main():
    scratch.init()
    scratch.newGame()
    scratch.printAll()

    scratch.simulateGame()
    scratch.postGameToTumblr()
Exemplo n.º 3
0
def main():
    scratch.init()

    server = WordsServer()
    while True:
        server.act()
        time.sleep(1)
        server.save_image()
Exemplo n.º 4
0
def main():
    scratch.init()

    server = WordsServer()
    while True:
        server.act()
        time.sleep(1)
        server.save_image()
Exemplo n.º 5
0
def runBot():

    scratch.init()

    while (True):
        im = getImage()
        if selectOpenGame(im):
            time.sleep(2)
            clickImage(wwfAccept)
            shuffleOrRecall()
            im = getImage()
            rack = {}
            board = {}
            for i in range(7):
                rack[i] = getRackTile(im, i)
                print(rack[i],)
            print
            print
            for i in range(15):
                board[i] = {}
                for j in range(15):
                    board[i][j] = getBoardTile(im, i, j)
                    print(board[i][j],)
                    if board[i][j] == ' ':
                        board[i][j] = None
                print

            scratch.newGame()
            scratch.setBoard(board)
            scratch.setCurrentRack(rack)
            move = scratch.bestMove()
            print(move)
            playMove(board, rack, move)

        else:
            print("Not my turn %d" % (int(time.time())))

        time.sleep(5)
Exemplo n.º 6
0
def runBot():

    scratch.init()

    while (True):
        im = getImage()
        if selectOpenGame(im):
            time.sleep(2)
            clickImage(wwfAccept)
            shuffleOrRecall()
            im = getImage()
            rack = {}
            board = {}
            for i in range(7):
                rack[i] = getRackTile(im, i)
                print(rack[i], )
            print
            print
            for i in range(15):
                board[i] = {}
                for j in range(15):
                    board[i][j] = getBoardTile(im, i, j)
                    print(board[i][j], )
                    if board[i][j] == ' ':
                        board[i][j] = None
                print

            scratch.newGame()
            scratch.setBoard(board)
            scratch.setCurrentRack(rack)
            move = scratch.bestMove()
            print(move)
            playMove(board, rack, move)

        else:
            print("Not my turn %d" % (int(time.time())))

        time.sleep(5)
Exemplo n.º 7
0
 def __init__(self, options):
     # XXX: is this correct?
     scratch.init()
     pass
Exemplo n.º 8
0
 def __init__(self, options):
     # XXX: is this correct?
     scratch.init()
     pass