Dec-05-2022, 01:48 AM
Hello. What I trying to do is a sequence of nodes that will be connected to each other and pass power if they are on.
I tried doing it as if I was doing the battleship game but it kinda did not work.
I want to create a 10x10 grid that will randomly turn each of the outside dots into a 1 or a 0 in a sequence and when one of them turns into a 0 all the other dots should turn into a 0.
It should look like this:
Anyone who can point me in the right direction, I appreciate it.
I tried doing it as if I was doing the battleship game but it kinda did not work.
board = [] for i in range(1): board.append([]) for j in range(10): board[i].append([]) for k in range(10): board[i][j].append('-') for level in board: for row in level: print(row)above is the grid i was using.
I want to create a 10x10 grid that will randomly turn each of the outside dots into a 1 or a 0 in a sequence and when one of them turns into a 0 all the other dots should turn into a 0.
It should look like this:
Anyone who can point me in the right direction, I appreciate it.