taniarascia / Snek
Licence: mit
🐍 A terminal-based Snake implementation written in JavaScript.
Stars: ✭ 210
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Snek
Snake
🐍🎮 Snake game made with Expo & PIXI.js 👾 iOS, Android, and Web
Stars: ✭ 67 (-68.1%)
Mutual labels: game, snake
Snake
Artificial intelligence for the Snake game.
Stars: ✭ 1,241 (+490.95%)
Mutual labels: game, snake
Dotnet Console Games
Game examples implemented in .NET console applications primarily for educational purposes.
Stars: ✭ 157 (-25.24%)
Mutual labels: game, snake
Vcmi
Open-source engine for Heroes of Might and Magic III
Stars: ✭ 2,514 (+1097.14%)
Mutual labels: game
Dustracing2d
Dust Racing 2D is a traditional top-down car racing game including a level editor.
Stars: ✭ 199 (-5.24%)
Mutual labels: game
Chunkstories
Somewhat fancy blocky game engine written in Kotlin
Stars: ✭ 199 (-5.24%)
Mutual labels: game
Game Of Life
A browser extension to play Conway's Game of Life on GitHub contribution board
Stars: ✭ 202 (-3.81%)
Mutual labels: game
One Html Page Challenge
Can you create something cool without modern tools?
Stars: ✭ 205 (-2.38%)
Mutual labels: game
Csharpgameframework
基于unity3d引擎与c#语言的游戏框架/架构(包括客户端与服务器)。使用ServerPlatform作为服务端通信基础设施。
Stars: ✭ 208 (-0.95%)
Mutual labels: game
Asm Space Invaders
A small, bootable game written in x86 Assembly inspired by Space Invaders
Stars: ✭ 202 (-3.81%)
Mutual labels: game
Civitas
Civitas is an empire-building game written in Javascript with the help of the jQuery library.
Stars: ✭ 207 (-1.43%)
Mutual labels: game
🐍 Snek.js
A terminal-based Snake implementation written in JavaScript (Node.js).
Read the tutorial
Instructions
Use the arrow keys (↑
, ↓
, ←
, →
) or W
A
S
D
to navigate the snake up, down, left, or right. Eat the red dot to gain points. If the snake collides with the wall or its own tail, it's game over. Press ENTER
to restart, and Q
, ESCAPE
or CTRL
+ C
to quit the game.
Installation
Run without installing
The easiest way to play the game is to just run it in the terminal without installing anything!
npx taniarascia/snek
Clone from repository
git clone https://github.com/taniarascia/snek
cd snek
# install and run via npm or yarn
npm i && npm run play
npm module
Add the snekjs
module.
npm i snekjs
Create the game.
// index.js
const { UserInterface, Game } = require('snekjs')
const game = new Game(new UserInterface())
// Begin game
game.start()
Run the game.
node index.js
Acknowledgements
- Vanya Sergeev for pointing out my snake collision bug, for advising me to make a single, reusable draw method, for showing me how to properly bind methods between classes, and for overall guidance and inspiration.
- Devin McIntyre for general advice.
- Panayiotis Nicolaou's JavaScript Snake for Web for initial logic.
Author
License
This project is open source and available under the MIT License.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].