本人开发的js版本扫雷游戏
体验地址 | Github
Minesweeper game
Sponsors
Install and use
npm i minesweeper-game
import {Map} from 'minesweeper-game';
const map = new Map();
Reset Map
map.reset();
TS Statement
interface IMapOptions {
width?: number; // Map size
height?: number;
tileSize?: number; // Tile size
minesCount?: number;
container?: HTMLElement | string;
}
declare class Map {
constructor(options?: IMapOptions);
config({ width, height, tileSize, minesCount, container, }?: IMapOptions, reset?: boolean): void;
reset(): void;
}