本人开发的js版本扫雷游戏
Minesweeper game
Sponsors
Install and use
npm i minesweeper-game
js
import {Map} from 'minesweeper-game';
const map = new Map();
Reset Map
js
map.reset();
TS Statement
ts
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;
}