Untitled

mail@pastecode.io avatar
unknown
plain_text
20 days ago
491 B
4
Indexable
Never
#!/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)
Leave a Comment