[Solved]Checking what is on the screen by position

Is there any way to check which sprite is in X, Y position on the screen? For example, in tic-tac-toe to know if it is “x” or “o” or nothing?

You could do this either by:

Using variables to keep track of what is in each cell (this is what I would do). In the simple case of tic-tac-toe, you could just have nine variables cell1, cell2, cell3 etc… An arrays extension has been made that would be good for doing this for larger board sizes.


Testing with a collision what is in a square (make a little 5x5 sprite or something and generate it in the middle of the game square and if it’s in collision with x, then it’s an x in the square, if in collision with nothing etc…).