Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A simple snake game in java - Well documented

License

NotificationsYou must be signed in to change notification settings

hexadeciman/Snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple snake game in java .Using Threads and Java Swing to display the game.The code is well commented, if you have any questions or want to continue this project feel free to do so 👌

How it looks:

alt tag

How you can support me:

Buy Me A Coffee

How to run the project:

Requirements:

  • Java runtime installed
  • Alternatively: Docker

How to play the game:

  • Just download the SnakeGame.jar file
  • Run it
  • Start playing with the arrows keys
  • If you lose, just close it and re-open it (I will add a restart button possibly)

How to run on Mac OSX with Docker:

  • InstallXquartz
  • Launch XQuartz. Under the XQuartz menu, select Preferences
  • Go to the security tab and ensure "Allow connections from network clients" is checked.
  • In XQuartz terminal: Run xhost + ${hostname} to allow connections to the macOS host *
  • runsudo docker-compose up --build

Troubleshooting (No X11 DISPLAY variable was set):

  • If on linux make sure you don't have a headless version of Java installed
  • Otherwise check to make sure display environment variable is set
export DISPLAY=:0.0

Mentions

Blog Posts:

Academia:

About

A simple snake game in java - Well documented

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp