Code Monkey home page Code Monkey logo

thuongtruong1009 / snake-game-oop Goto Github PK

View Code? Open in Web Editor NEW
24.0 3.0 12.0 86.11 MB

๐ŸŽ› The mini snake game support for my OOP final lab at university. They were designed by Java OOP and Java Swing GUI.

Home Page: https://thuongtruong1009.github.io/Snake-Game-OOP/

License: Educational Community License v2.0

Java 95.61% Python 4.16% Shell 0.24%
java oop oops-in-java javafx javaswing hacktoberfest snake-game object-oriented-programming github-config github-actions

snake-game-oop's Introduction

All Contributors

CircleCI Codacy Badge CI CodeFactor GitHub commit checks state GitHub code size in bytes

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)
|                                    |
โ”œโ”€โ”€ media (folder)                   โ”œโ”€โ”€ root
โ”œโ”€โ”€ docs                             โ”‚    โ”œโ”€โ”€ ArrowKey
โ”œโ”€โ”€ UML Diagram                      โ”‚    โ”œโ”€โ”€ ISnake
โ”œโ”€โ”€ dockerfile                       โ”‚    โ””โ”€โ”€ Root
โ”œโ”€โ”€ VISITOR                          |
โ””โ”€โ”€ README.MD                        โ”œโ”€โ”€ files
                                     โ”‚    โ”œโ”€โ”€ Read
                                     โ”‚    โ”œโ”€โ”€ Write
                                     โ”‚    โ”œโ”€โ”€ Item
                                     โ”‚    โ”œโ”€โ”€ DownLoad
                                     โ”‚    โ”œโ”€โ”€ licenseText
                                     โ”‚    โ”œโ”€โ”€ writeData
                                     โ”‚    โ””โ”€โ”€ dataScore
                                     |
                                     โ”œโ”€โ”€ testing
                                     โ”‚    โ”œโ”€โ”€ testPanel
                                     โ”‚    โ”œโ”€โ”€ testCustomerPane
                                     โ”‚    โ””โ”€โ”€ testMediaLoader
                                     |
                                     โ””โ”€โ”€ container
                                          โ”œโ”€โ”€ build.sh
                                          โ”œโ”€โ”€ GamePanel
                                          โ”œโ”€โ”€ CustomerPane
                                          โ”œโ”€โ”€ mediaLoader
                                          โ”œโ”€โ”€ SetupData
                                          โ”œโ”€โ”€ Frame
                                          โ””โ”€โ”€ Main
                                           

๐Ÿ›ขBuild with Docker

docker pull thuongtruong1009/snake-game-oop

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

snake-game-oop's People

Contributors

allcontributors[bot] avatar codacy-badger avatar imgbotapp avatar lequocphong avatar raydelto avatar sanjulata19 avatar thinh-sine-nix avatar thuongtruong1009 avatar thuongtruong109 avatar tung01673641696 avatar wpolanco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

snake-game-oop's Issues

@thuongtruong1009

@thuongtruong1009
You should fix the link of sound and image, which should get in the internal source code. Because itn't be changed when you change on the device.
It shoud put in .('./link-directed/....');

Originally posted by @font-end-pro in #5 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.