This site requires JavaScript, please enable it in your browser!
Greenfoot back
Al3xTheKing
Al3xTheKing wrote ...

2020/12/18

Help with spawning objects at random places (tictactoe)

Al3xTheKing Al3xTheKing

2020/12/18

#
im working on a tictactoe game and its going pretty well, but i need to make the game place the rounds at random places and not in the crosses. can someone help me a bit?
rocket770 rocket770

2020/12/19

#
I think you're trying to find a spot on the board that has not been already used and since I don't know your code something similar to this might work? Pick a random Spot on the grid While the chosen spot on the grid is marked as a cross pick another spot Place Circle on the chosen spot
You need to login to post a reply.