Generating A List of Possible Moves : I am trying to generate a list of possible moves for a checkers-like game. For example, at the start of the game the board would look like [[1,1,1], [0,0,0], [2,2,2]]. My function would take the color (one for white, or two for black) and move the pieces either one space forward, or one space diagonal to capture another piece. So the first possible list of moves with white going first would be [[0,1,1], [1,0,0], [2,2,2], [1,0,1], [0,1,0, [2,2,2] etc. etc. 

So far I have:

    def generateMoves(color, board):
    
    newboard = []
    subboard = []
    board = [[1, 1, 1], [0, 0, 0], [2, 2, 2]]
    x = 0                    

    for i in board:
        while x < len(board):
            subboard.append(board[x])
            newboard.append(subboard)
            x += 1
    return newboard

but I can't figure out what modifications I need to make to it to calculate the new list of possible moves. 