Skip to content

asadkhan-786-gb/Game-of-Feeding-the-Snake-using-JAVA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Game of Feeding the Snake using JAVA

Creating a Game of Feeding the Snake using JAVA GUI, Swing

Project Specifications

  • The Player controls a dot, square or object on a bordered plane.
  • As it moves forward it leaves a trial behind resembling a moving snake.
  • The player loses when the snake runs into the screen border, other obstacle or itself.

Project Aim

  • Object Oriented Programming in Java
  • Making an amazing application using core java libraries
  • Core java AWT and Swing tutorial
  • Building such an interesting game of your own from Scratch
  • Classes and Objects in Java with example

Steps of development

  1. Create a new java project in the IDE
  2. Adding images to the project
  3. Started creating frame
  4. Place the images inside the frame
  5. Place the image one behind the other
  6. Locating the apple
  7. Adding action listeners
  8. Implementation of Keyboard events
  9. Handling collision to snake with apple
  10. handle the collision of the snake with walls or with itself
  11. Moving the snake inside the frame
  12. repaint the frame
  13. handle the game over functionality
  14. Running the snake game

Required Tools

  • JDK
  • IDE - (vscode)

Getting Started

Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.

Folder Structure

The workspace contains two folders by default, where:

  • src: the folder to maintain sources
  • lib: the folder to maintain dependencies

Meanwhile, the compiled output files will be generated in the bin folder by default.

If you want to customize the folder structure, open .vscode/settings.json and update the related settings there.

Dependency Management

The JAVA PROJECTS view allows you to manage your dependencies. More details can be found here.

About

Creating a Game of Feeding the Snake using JAVA GUI-Core JAVA, Swing

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages