Skip to content

sdhoat/Snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

I coded this game in a Java platform called Greenfoot and used some GitHub code to initiate the world and counter. I wrote the rest of the code myself in the Snake method, which defined its movement characteristics. Code: #The snake moves around and turns after implementing the checkKeyPress() method.

#The game ends if Snake is crashing into a wall after implementing the atWorldEdge() method.

#Snake should eat food when it reaches the food after implementing the eat() method.

#A new food object is created when the current is eaten after implementing the newFood() method.

#Tail objects should be created behind the Snake head after implementing the addTailBehindHead() method.

#The oldest tail objects should be removed after implementing the eraseEndOfTail() method.

#The game should end if Snake is crashing into its tail after implementing the tailAhead() method.

Screenshot_20230102_122409

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published