Skip to content
项目

关于

A simple snake game in java - Well documented

游戏与模拟器

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

The Snake

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:

  • Install Xquartz
  • 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 *
  • run sudo 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:

探索相关项目

加载中…