🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

GitHub Contributions Snake

turn github contribs to snake game

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey to install this script.

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

ผู้เขียน
gv3.dev
จำนวนติดตั้งประจำวัน
0
จำนวนติดตั้งทั้งหมด
3
คะแนน
0 0 0
เวอร์ชัน
2024-07-19
สร้างเมื่อ
19-08-2024
อัปเดตเมื่อ
19-08-2024
Size
4.68 กิโลไบต์
สัญญาอนุญาต
MIT
ปรับใช้กับ

GitHub Contributions Snake 🐍🍎

Please note that this script is not finished & requires more work. It was just a quick little project cuz I was bored. However, it is usable & fully functional, it just isn't at it's best. (yet) :)

This repository contains a JavaScript implementation of a Snake game that can be played on the GitHub contributions grid. The script automatically sets up the game, and the snake can be controlled using the arrow keys. The snake aims to eat the food that appears on the grid, growing in length with each piece of food consumed.

Features

  • Snake Movement: Control the snake using the arrow keys.
  • Food Generation: Randomly places food on the grid that the snake aims to eat.
  • Collision Handling: Prevents the snake from running into itself.

How It Works

The script continuously executes the following steps:

  1. Initialize Game: Sets up the grid, snake, and food.
  2. Handle Input: Listens for arrow key presses to control the snake's direction.
  3. Move Snake: Moves the snake in the specified direction, handles food consumption, and grows the snake.

Installation

To use this script with Tampermonkey:

  1. Install Tampermonkey: Install the Tampermonkey extension for your browser.
  2. Create a New Script: Open Tampermonkey, create a new script, and paste the code below into it.
  3. Save and Enable: Save the script and ensure it is enabled.
  4. Play the Game: Open GitHub and navigate to your contributions grid. Use the arrow keys to control the snake.