(board, num_items)
return item_positions
Lays all of the items on the board
Lays all of the items on the board
Lays all of the items on the board
def make_items(board, num_items):
    '''Lays all of the items on the board'''
    item_positions = {}
    while num_items > 0:
        row = random.randint(0, len(board) - 1)
        col = random.randint(0, len(board[0]) - 1)
        if board[row, col] != constants.Item.Wood.value:
            continue
        if (row, col) in item_positions:
            continue

        item_positions[(row, col)] = random.choice([
            constants.Item.ExtraBomb, constants.Item.IncrRange,
            constants.Item.Kick
        ]).value
        num_items -= 1
    return item_positions
def make_items ( board , num_items ) : item_positions = { } while num_items > 0 : row = random . randint ( 0 , len ( board ) - 1 ) col = random . randint ( 0 , len ( board [ 0 ] ) - 1 ) if board [ row , col ] != constants . Item . Wood . value : continue if ( row , col ) in item_positions : continue item_positions [ ( row , col ) ] = random . choice ( [ constants . Item . ExtraBomb , constants . Item . IncrRange , constants . Item . Kick ] ) . value num_items -= 1 return item_positions