game over method => when the snake hits itself.set methods (for example: set apple, set snake start position, etc…).a loop method (when you don’t change the direction).Because the snake will consist more than one piece,Ĭoordinates will differ from each other and therefore it will be the same situation as in the example of the sheep. You have to save the snake object in the game in an array. Why three classes? As you can see on the page about classes. You have of course the main game, but you also have 2 other classes. You can find a nice tutorial over there, to start from nothing and build snake.Īlright, the first thing you have to do is to split the assignment into 3 parts. If you don’t have a game interface, go to. Most of the time when you get an assignment like this the school will provide a game interface. If you are a beginning programmer, it is easier to use an already existing game interface. In this game are you using all the things you have learned in the previous chapters.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |