🚀 Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

koishi-plugin-guess-number

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koishi-plugin-guess-number

Number guessing game in Koishi

latest
Source
npmnpm
Version
1.2.1
Version published
Weekly downloads
30
-23.08%
Maintainers
1
Weekly downloads
 
Created
Source

koishi-plugin-guess-number

Codecov npm

猜数字游戏。

基本玩法

系统将随机生成一个 4 位 10 进制数,各位数字可以是 0 且互不相同,玩家的目标是猜出这个数字。

每一轮中玩家输入要猜测的数字,并得到一个形如 xAyB 的匹配结果:

  • x 为本次猜测的四位数字中,答案包含的且所处位置正确的数字个数;
  • y 为本次猜测的四位数字中,答案包含的但所处位置不正确的数字个数。

例如:生成的数字为 0637,猜测 2730,则返回 1A2B。这是因为 3 在答案中包含且位置正确,7 和 0 在答案中包含但位置不正确。

配置项

base

  • 类型: number
  • 默认值: 10

标准开局下的进制数。

length

  • 类型: number
  • 默认值: 4

标准开局下的答案长度。

chances

  • 类型: number
  • 默认值: 10

标准开局下的最大猜测次数。

Keywords

chatbot

FAQs

Package last updated on 15 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts