Thanks danpost. I got that.
More question:
1. In this game we can see that the snake always move forward (even when no key is pressed). Which method is used for that and where are the codes for those exactly?
Hi malmotri! Thanks it's clear to me now. Okay, one more thing I want to ask. In your "Board" class, inside the constructor Board, you have written a line- [ snake[0] = new Snake("head",color1);]
Well, I clearly undersatand that the term "head" is snake's head and the "color1" is the corresponded color that you have chosen for the head. But my question is that (1)HOW THE GREENFOOT PROGRAM KNOWS(OR IDENTIFY THE TERM) THAT IT'S THE HEAD OF THE SNAKE? (2) IS IT ACTUALLY IMPORTED FROM GREENFOOT?
Recent Comments | Show All
2012/11/24
Lab 6 – Snake
2012/11/24
Lab 6 – Snake