One of my students is making a 2 player snake game. the goal is to box your opponent in. the ships should be destroyed when they hit the other player’s line but not when they hit their own. Right now the sprites aren’t destroyed when hitting either line. We’ve both worked hard to solve this problem, but I can’t figure it out.
I suspect part of the problem is coming from how he is creating the lines themselves. I was able to adjust the code so the original l1 and l2 (single dots) destroyed the player sprites, but the other instances of l1 and l2 did not.