Results 1 to 5 of 5
- 03-28-2012, 07:44 PM #1
Member
- Join Date
- Jan 2012
- Posts
- 17
- Rep Power
- 0
want to add BLOCK into snake game
hello world..
i've create a simple snake game..
every level have the same gameplay and the different is only the speed of the snake..
now i want to try adding a BLOCK into the game,so when the snake crash into the BLOCK it will be game over just as if it crash into the wall..
do anybody have any idea how can i add it??
thank you~~
- 03-28-2012, 09:02 PM #2
Re: want to add BLOCK into snake game
Create a class called Block, give it the properties and methods it needs and use it in your program.
If you don't understand my response, don't ignore it, ask a question.
- 03-29-2012, 04:21 AM #3
Member
- Join Date
- Jan 2012
- Posts
- 17
- Rep Power
- 0
- 03-29-2012, 01:18 PM #4
Re: want to add BLOCK into snake game
The Block class could show an image or it could just use the fillRect method to make a solid color for its contents.
Somewhere in your code there would need to be code that detected where the snake and the block were placed to determine when a crash occurred.If you don't understand my response, don't ignore it, ask a question.
- 03-30-2012, 04:39 PM #5
Member
- Join Date
- Mar 2012
- Posts
- 8
- Rep Power
- 0
Similar Threads
-
Snake Game
By LuluMM in forum New To JavaReplies: 0Last Post: 03-08-2012, 06:48 AM -
Snake Game in Java
By Shyamz1 in forum New To JavaReplies: 4Last Post: 02-10-2011, 02:49 PM -
Snake Game Applet
By Growler in forum Java AppletsReplies: 6Last Post: 07-11-2010, 02:47 PM -
Snake game in java
By freaky in forum New To JavaReplies: 5Last Post: 04-20-2010, 06:34 PM -
Snake Game
By mustachMan in forum New To JavaReplies: 2Last Post: 12-10-2009, 10:35 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks