I’m trying to create a game. I have a list. I want to take the items in this list and randomly append them to indexes in a list matrix. Think about a grid and an item moving around randomly through this grid.
import random
fishlist = ["salmon", "carp", "bass", "catfish"]
grid = [
[1,2,3],
[4,5,6],
[7,8,9],
]
I want to replace each of those numbers with a random fish. From there I want the fish to be able to move around the grid. What is the best way to go about this? Thanks for the help.
Try this
To Move the fish try this
Using Loop