Does anyone know how I could make an object change into another after another object moves to the same cell as the object?
This is what I've been asked to do:
"If the player moves into a square containing a treasure chest that has already been visited
twice then 10 coins are added to the player’s coin collection and the treasure chest is
replaced by a bandit. The next time the square is visited, it contains a bandit. The number
of bandits is increased by one and the number of treasure chests is decreased by one."

