Skip to content

🐍 The mini snake game support for my object-oriented programming final lab at university

License

Notifications You must be signed in to change notification settings

thuongtruong109/snake-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CI CodeFactor GitHub commit checks state GitHub code size in bytes

SNAKE GAME

snake_image

🎴 Description

  • Snake is a game in which the players need to think about controlling snake to explore an map and catch the appples and handle the situation to avoid hitting with the any obstacle or itself. They will compete against each other with points and time after each match.

πŸ“Œ Context

  • The final project on labory in my school. It request is use any language programming to make a game or application. My team have 2 student and we try hard to complete them in 3 week.
  • Make report speech format in docx or pdf.
  • Have PowperPoint presentation slides.
  • Show detail diagram of project structure.
  • I sometimes make refer on the internet but they seem like very difficult.
  • Now, i am enhancing update code for better. Let wait...

🎨 We used

  • Java Core 8 and Java Swing basic.
  • Buffer, Builder and Socket I/O in Java API.
  • Function, loop, algorithms, implement, extend, Thread in Java.
  • UML diagram in programming.
  • Design pattern (although it hasn't really been applied completely, but overall I'm trying to make it happen).
  • Refferent on StackOverflow and Youtube BroCode chanel.
  • Thank you @TP-O supported us in this project.

πŸš€ Some of our core summaries

  • Explore and learn how the Java language works through libraries and methods.
  • Familiarize yourself with object oriented programming and its working principle.
  • Introduce the Java Swing and java.awt libraries through implementation and method inheritance its.
  • An overview of Design patterns and their operation diagrams.
  • Using the UML diagram to analys codes and information processing.
  • Understand how multithreading works and manage it.
  • Take advantage of the I/O mechanism to download files to local and open URL on broswer.
  • Learn about system manipulation with Buffer and Builder in Java.
  • Get familiar with Socket I/O by displaying source device address information.
  • Manipulating arrays, strings, and algorithm structures.
  • Skills in selecting, processing images and sounds to suit the project.
  • Expanding programming thinking and improve your skills to resolve the problems through the game.
  • Practice writing reports and summarizing project issues.
  • Good for programmers who are new to the Java language.
  • Practice and complete assignment Java OOP projects in a university lab.

πŸ“Έ How it looks

intro playing about donate history download alert

βš” How to play this game

  • Fork and clone this project to local destop.
  • Run it by IDE for Java which JRE and JDK installed.
  • Choose level at level button and click new game button to play new.
  • Start playing and control the snake with the arrows keys "UP", "DOWN", "LEFT" and "RIGHT", simulating a user interaction with the game.
↑ ↓ ← β†’
UP DOWN LEFT RIGHT
  • Every time the snake catches an apple, its size increases and score of user will also be added 1 point.
  • If the snake hits its tail or a wall, the game will be ended.
Action Reward
Catch the apple + 1
Hits bomb - 1
Hits tail or wall game-over
  • Experience the beautiful interface and attractive sound.
  • If you over the game. Please press the start new button to start playing again or press the red x button to exit.

πŸ“ Structure

root
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ src
β”œβ”€β”€ .github                          β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€|
|    β”œβ”€β”€ workflows (folder)          β”œβ”€β”€ utils                       β”œβ”€β”€ icons (folder)
|    └── FUNDING.yml                 β”‚    β”œβ”€β”€ deviceInfo             β”œβ”€β”€ background (folder)
|                                    β”‚    β”œβ”€β”€ refer                  β”œβ”€β”€ buttons (folder)
β”œβ”€β”€ media (folder)                   β”‚    β”œβ”€β”€ ImageResizer           β”œβ”€β”€ images (folder)
β”œβ”€β”€ docs                             β”‚    └── DataType               └── musics (folder)
β”œβ”€β”€ UML Diagram                      |
β”œβ”€β”€ Dockerfile                       β”œβ”€β”€ root
└── README.MD                        β”‚    β”œβ”€β”€ ArrowKey
                                     β”‚    β”œβ”€β”€ ISnake
                                     β”‚    └── Root
                                     |
                                     β”œβ”€β”€ files
                                     β”‚    β”œβ”€β”€ Read
                                     β”‚    β”œβ”€β”€ Write
                                     β”‚    β”œβ”€β”€ Item
                                     β”‚    β”œβ”€β”€ DownLoad
                                     β”‚    β”œβ”€β”€ licenseText
                                     β”‚    β”œβ”€β”€ writeData
                                     β”‚    └── dataScore
                                     |
                                     β”œβ”€β”€ testing
                                     β”‚    β”œβ”€β”€ testPanel
                                     β”‚    β”œβ”€β”€ testCustomerPane
                                     β”‚    └── testMediaLoader
                                     |
                                     └── container
                                          β”œβ”€β”€ GamePanel
                                          β”œβ”€β”€ CustomerPane
                                          β”œβ”€β”€ mediaLoader
                                          β”œβ”€β”€ SetupData
                                          β”œβ”€β”€ Frame
                                          └── Main

πŸ›’Build with Docker

docker pull thuongtruong1009/snake-game-oop

πŸ“° License

About

🐍 The mini snake game support for my object-oriented programming final lab at university

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published