A Snake implementation that works for JS, JVM & Native targets.
Find the full blog here, with explanations and TODOs for implementing this from the bottom up yourself!
Download Zip here or clone project from github.
Open with IntelliJ Community or VS Code or online via GitPod.
Run JS: ./gradlew jsBrowserDevelopmentRun
Run JVM: ./gradlew run
Run Native: ./gradlew runDebugExecutableNative
But it's way easier to run through IntelliJ.
Requires Linux or MacOS.
First of, grab ncurses!
// sudo apt install libncurses5-dev
// sudo apt install libncursesw5-dev
// sudo apt install gcc-multilib
// Snake sprite sheet is 64x64 px per item!