New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

snekjs

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snekjs - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

8

package.json
{
"name": "snekjs",
"version": "1.0.2",
"version": "1.0.3",
"description": "A terminal-based Snake implementation written in JavaScript (Node.js) 🐍",

@@ -17,3 +17,9 @@ "author": {

},
"licence": "MIT",
"keywords": [
"snake",
"javascript",
"node"
],
"private": false
}

@@ -9,2 +9,6 @@ # 🐍 Snek.js [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![snekjs on NPM](https://img.shields.io/npm/v/snekjs.svg?color=green&label=snekjs)](https://www.npmjs.com/package/snekjs)

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
### Clone from repository

@@ -11,0 +15,0 @@

2

src/Game.js

@@ -115,3 +115,3 @@ const {

this.snake.forEach(segment => {
if (segment.x === this.x && segment.y === this.y) {
if (segment.x === this.dot.x && segment.y === this.dot.y) {
this.generateDot()

@@ -118,0 +118,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc