CodeGym | Game Tasks ~ Hungry Snake
Description (from CodeGym | Game Tasks ~ Mine Picker)
A long serpentine creature slithers across a limited field, obeying the player's orders (moving right, left, down, and up). And there's no way to stop it from moving. Just don't touch the boundaries or you'll die! And don't bite yourself or... well, you get the idea. Along the way, the creature encounters food that makes it even longer. As it grows, it gets more and more cramped... Stop the madness!
You probably recognize this comedic storyline from the famous game "Snake". This game originated in the 1970s. That's when it first appeared on arcade machines. In the 21st century, it was popularized by Nokia, which pre-installed Snake on almost all their mobile phones.
Between these two milestones, there were versions for the Commodore VIC-20, MS-DOS, ZX Spectrum, Windows, Mac OS… If you go to Google Play or the App Store, you'll probably find a couple dozen different versions of Snake. It's hard to imagine a platform that doesn't have its own version of Snake. Why? On the one hand, it's an interesting game that is perfect for passing the time. On the other hand, Snake is simple enough to create on your own. See for yourself! Use Java to write your own version of this game about the adventures of a growing reptile. On CodeGym, we've already described every step, which will help a novice player handle this task without problems. Carry on!
- Java
This project has been made from scratch following specific instructions.
Several elements (such as the game engine) have been provided by the related course.
V1.01
- Colors have been modified.
- Size of the grid has been extended to 20 X 20.
- A special type of apple has been added: Slow Apple. It reduces the speed of the game.
V1.02
- The Slow Apple has been renamed: Slow Green Apple. It uses a different unicode character.
V1.03
- Pressing a direction key should not remove the dialog message (at the end of a game) anymore.
You can try the game on CodeGym.
V1.03 - Completed
20/07/2020
(README | 20/07/2020)