本人开发的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 sizeheight?: number;tileSize?: number; // Tile sizeminesCount?: number;container?: HTMLElement | string;
}
declare class Map {constructor(options?: IMapOptions);config({ width, height, tileSize, minesCount, container, }?: IMapOptions, reset?: boolean): void;reset(): void;
}