Skip to content

Snehajit999/snakecode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

🐍 snake.exe

Classic snake, but the snake is made of code.

Every segment of the snake displays a real code token — fn, =>, {}, let, if, &&... The head is always >_. The food you eat is a $variable. When you eat it, code fragments explode outward. The whole thing runs inside a fake terminal window with scanlines.


Play it live

https://YOUR-USERNAME.github.io/snakecode

How to run locally

git clone https://github.com/YOUR_USERNAME/snakecode.git
cd snakecode
python3 -m http.server 8080
# open http://localhost:8080

Controls

Key Action
↑ ↓ ← → Move
W A S D Move
Space Pause / resume / start
R Restart
Swipe Move (mobile)

Upload to GitHub

git init
git add .
git commit -m "snake.exe — initial commit"
git remote add origin https://github.com/YOUR_USERNAME/snakecode.git
git push -u origin main

Settings → Pages → Branch: main / (root) → Save.


Features

  • Terminal window UI with fake title bar + scanline CRT effect
  • Snake body made of rotating code tokens (fn, =>, {}, let...)
  • Head renders as >_ (terminal cursor)
  • Food renders as blinking $variable
  • Code fragment particle explosion on eat
  • Speed increases every 5 apples (level up)
  • High score saved to localStorage
  • Mobile touch controls + swipe support
  • Monospace font throughout (Fira Code)

File structure

snakecode/
├── index.html   # Terminal UI shell
├── style.css    # CRT / terminal design
├── game.js      # Snake engine + canvas renderer
└── README.md

Zero dependencies. No npm. No build step.


License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors