Hungry Snake

Empfohlener LevelLevel
5+
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!
Kommentare (114)
  • Beliebt
  • Neu
  • Alt
Du musst angemeldet sein, um einen Kommentar schreiben zu können
Shivam yadav Android Developer
2 April, 06:47
package com.codegym.games.snake; import com.codegym.engine.cell.*; public class SnakeGame extends Game { public static final int WIDTH = 15; public static final int HEIGHT = 15; @Override public void initialize() { setScreenSize(WIDTH, HEIGHT); } }
Guest
Level 1 , India
2 April, 06:19
i love you arti
Anonymous #11623460
Level 0 , Friedrichshafen, Germany
12 Februar, 08:55
😮
Anonymous #11623460
Level 0 , Friedrichshafen, Germany
12 Februar, 08:54
😎
Anonymous #11606130
Level 0 , Heidelberg, Germany
20 Dezember 2024, 08:48
O, du Fröhliche!
Anonymous #11606130
Level 0 , Heidelberg, Germany
20 Dezember 2024, 08:49
bester mann
Morel
Level 0 , France
13 Juli 2024, 16:44
tete de neuille frrrrrrrrr
Anonymous #11516985
Level 2 , -, France
16 Mai 2024, 09:28
thanks
Anonymous #11502613
Level 1 , Spain
14 April 2024, 09:14
🖕
Anonymous #11502613
Level 1 , Spain
14 April 2024, 09:06
Fuck you
Anonymous #11594043
Level 1 , San Antonio, United States
15 November 2024, 16:12
you tell em
Fohli
Level 2 , Germany, Germany
6 März 2024, 10:11
Dauernd 'falsch' weil Rechtschreibung verkehrt xD Und ich noch was aber die Methode hab ich doch 🤣