Skip to content

Updating version....The mini snake game support for my final lab at university. They were designed by Java OOP and Java Swing GUI.

License

Notifications You must be signed in to change notification settings

tinderzone/Snake-Game-OOP

 
 

Repository files navigation

All Contributors

CircleCI Codacy Badge CI CodeFactor GitHub commit checks state GitHub code size in bytes Lines of code Open Source

SNAKE GAME OOP

snake_image

🎴 What's the snake game

  • 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.

📌 First require

  • 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.

📁 Management folder structure

  • Benefits: Scope, Clarity, Collaboration, Consistency.
  • General overview folder of a project.
  • With proposing that everyone can quickly to understand the logic behind which they need.
  • Easily for manage the project progression.
root
├────────────────────────────────── src
├── .circleci                        ├───────────────────────────────|
│    └── config.yml                  ├── utils                       ├── icons (folder)
|                                    │    ├── deviceInfo             ├── background (folder)
├── .github                          │    ├── refer                  ├── buttons (folder)
|    ├── workflows (folder)          │    ├── ImageResizer           ├── images (folder)
|    └── FUNDING.yml                 │    └── DataType               └── musics (folder)
|                                    |
├── ScreenShots (folder)             ├── root
├── Reported Speech                  │    ├── ArrowKey
├── UML Diagram                      │    ├── ISnake
├── Slide PowerPoint                 │    └── Root
├── CONTRIBUTING                     |
└── README.MD                        ├── files
                                     │    ├── Read
                                     │    ├── Write
                                     │    ├── Item
                                     │    ├── DownLoad
                                     │    ├── licenseText
                                     │    ├── writeData
                                     │    └── dataScore
                                     |
                                     ├── testing
                                     │    ├── testPanel
                                     │    ├── testCustomerPane
                                     │    └── testMediaLoader
                                     |
                                     └── thuongtruong1009
                                          ├── version
                                          ├── GamePanel
                                          ├── CustomerPane
                                          ├── mediaLoader
                                          ├── SetupData
                                          ├── Frame
                                          └── Main
                                           

Want to add your project to the repo?

Don't worry... there is no need to know any programming language-related knowledge. You only have to know the Git and GitHub, and that's it... You can contribute to this project very easily by following a few guidelines. Now we are let's start.

a) Commit from local

  • Star this repository (Click the star button in the top right of this page).
  • Fork this repository (Click the Fork button in the top right of this page, after click to your profile image).
  • Clone your forked copy down to your local machine.
git clone https://github.com/<your_username>/Snake-Game-OOP.git
  • Navigate to the project directory
cd Snake-Game-OOP
  • Add a reference(remote) to the original repository.
git remote add upstream https://github.com/thuongtruong1009/Snake-Game-OOP.git
  • Check the remotes for this repository.
git remote -v
  • Always take a pull from the upstream repository to your master branch to keep it at par with the main project(updated repository).
git pull upstream main
  • Create a new branch
git checkout -b <your_branch-name>
  • Track your changes ✔. (The task is described below)
git add .

Commit your changes .

git commit -m "Commit message"
  • Push the committed changes in your feature branch to your remote repo.
git push -u origin <your_branch_name>

• Step 1 (star this repo):


Step 1

• Step 2 (Add your information at CONTRIBUTING.md file):


Step 2

• Step 3 (Add your information at CONTRIBUTING.md file):

(After open this file you have a interface like the below image).


Step 3

There are 4 table-field, you must added in the correct format of them. (First one is for order, the second one is for your Github display name, the third one is for your link to github username & the fourth is for your activity for this project)

• Step 4 (Create a pull request):

(After propose commit, you must create new Pull request to be approvaled)


Step 4
  • To create a pull request, click on Create Pull Request (Click the New Pull Request button located at the top of your repo).

  • Add appropriate title and description to your pull request explaining your changes and efforts done.

  • --> You have made a PR to this projects-showcase 💥 .

  • --> 💌 Wait a few times for your submission to be accepted, if your PR will be reviewed and merged approval, then you will be added on list contributors. See at CONTRIBUTING.

  • Visit the CODE_OF_CONDUCT to see more about guidelines...

  • Stay safe & keep contributing.

🤝 Join with me

  • Code together in the development to build perfect products.

  • You can fork/download/star/discuss/make issues/create PRs in them to develop. It can save it on release history.

  • Any problem, should contact me via email.

💻 References

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Codev TA

🤔

Tran Nguyen Thuong Truong

💻 🤔

Imgbot

🔣 🔧

Phát Đỗ

🤔

tung01673641696

🤔

Codacy Badger

⚠️ 🐛 🔣

Raydelto Hernandez

🐛 🧑‍🏫

wpolanco

🤔 ️️️️♿️

Sanjulata19

🤔 🧑‍🏫

Oop-team-project

📖 💡

This project follows the all-contributors specification. Contributions of any kind welcome!


❤️ Support me

We are looking for sponsors to join us to have better community reach and impact.

MOMO Buy Me a Coffee at ko-fi.com

📰 License

About

Updating version....The mini snake game support for my final lab at university. They were designed by Java OOP and Java Swing GUI.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 88.6%
  • Python 11.4%