Skip to content
Gyan987Public

About

in java

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

🐍 Snake Game – by GYAN PRAKASH TIWARI

A personalized Java-based Snake Game built from scratch using JPanel, KeyListener, and Timer. This version includes wrap-around movement, stylized snake and food design, and a score display — all optimized for clarity and learning.

🎮 Game Features

  • ✅ Arrow key controls for movement
  • ✅ Wrap-around board edges
  • ✅ Stylized snake head and body with rounded shapes
  • ✅ Orange circular food
  • ✅ Score display and red "Game Over" message
  • ✅ Slower movement speed for better control
  • ✅ Modular design using inner Tile class and ArrayList for snake body

🧠 Learning Highlights

This project helped reinforce:

  • Object-oriented design with inner classes
  • Real-time game loop using javax.swing.Timer
  • Event handling with KeyListener
  • Collision detection and wrap-around logic
  • Custom rendering with Graphics and Color

📁 Project Structure

🚀 How to Run

  1. Clone the repository:
    git clone https://github.com/Gyan987/SnakeGame.git

About

in java

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages