Program 4: Snake

  • Assigned On: 11/18/2005
  • Due On: 11/28/2005
  • Description:

    Write the game Snake. The game should listen to the key board; the user indicates the direction she wants the snake to travel with the keypad. Over time, the snake should both 1) grow longer and 2) move faster. When the snake hits the boundary, or collides with itself, the game is over; you should then display the score on the screen. The score should be proportional to the distance that the snake has traveled.

    Post the applet on your website so that people can come by and play it.

    Here is an example of how your program should behave and what it could look like: Click on the applet to start the game.

    Above applete not working for you? Are you using InternetExplorer? Check out this page.

    Current High Score: Brian, 11238

    Mail me a screenshot of your high score (disclaimer: you gain nothing by having the high score)

    Type the honor pledge at the top of your .java file(s) in a comment block.

    Zip 1) your .java file(s), 2) your .class file(s), and 3) a text file with the URL of your webpage where I can view your program into a single file. Name that file <your onion> That's the name it should have on your computer. Use blackboard to SEND your .zip file.