Untitled

 avatar
unknown
plain_text
9 months ago
491 B
8
Indexable
#!/usr/bin/python3

# Create a function or class to print a matrix of size x * x.
# Fill it with y mines.
# Mark mines as 'x' and mark empty cells as '0'.
#
# e.g. a possible result of generator(size=4, mines=5) would be:
# ['0', '0', 'x', 'x']
# ['x', '0', '0', '0']
# ['0', '0', '0', '0']
# ['0', 'x', '0', 'x']


def minesweeper_generator(size, mines):
    print("Implement me!")
    return []


if __name__ == "__main__":
    for line in minesweeper_generator(4, 5):
        print(line)
Editor is loading...
Leave a Comment