posted 6 years ago
My goal is to create a simple snake game. I was expecting to get the snake to move around on the screen, but I am getting the error:
I'm not sure what this means but it has to do with private class Key implements @KeyListener at the bottom of the Screen class. I've seen that the problem could be that you have to put it in a different method, but mine already is. So here's my code:
Snake class:
Bodypart class:
Frame class:
Thanks in advance for your help!