示例#1
0
def drawBoard(board):
    # This function prints out the board that it was passed.

    # "board" is a list of 10 strings representing the board (ignore index 0)
    turn_all_off()
    for i, b in enumerate(board[1:10]):
        if b.lower() == 'x':
            blink_on(i)
        elif b.lower() == 'o':
            switch_on(i)
        else:
            switch_off(i)
            blink_off(i)
示例#2
0
def steady_on_serial():
    for led in LED_INDICES:
        switch_on(led)
        time.sleep(TOGGLE_INTERVAL)
        switch_off(led)
        pass