npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

minesweeperjs

v1.0.0

Published

Free and easy to use minesweeper javascript library.

Downloads

5

Readme

npm GitHub release (latest by date) GitHub issues

MinesweeperJS

MinesweeperJS is a free 'Minesweeper' game javascript library. It is efficent and easy to install and use. Ideal to start a basic web game, for junior web developpers.

This is an open source library, so can you can use it for free. You can also contribute, suggest improvements, or report a bug. If you like this project, please Star it, so that we can reach

Installation

Client-side : In the browser (in HTML page)

CDN (jsdelivr)

We can use a link to the NPM package lib file to import the script in the client-side (where you can set whatever version you want in the file name, since v0.6.0). Import it in your web page :

<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/client.min.js"></script>

Now you can play with the library in the console or in a script.

Download and use as local file

You can also download the last version in the lib folder, and then import it in your project. Then, link it as a script in the head of your HTML file.

Server-side: With NPM

For the moment, the package is called minesweeperjs. You can install it in a Node project with the following command :

npm install minesweeperjs

Then, import it in your project (in a Javascript file)

// Just what you need
const { Grid } = require('minesweeperjs')

// Or all fonctions and classes
const { Grid, Cell, Checker, MsInstalled } = require('minesweeperjs')

Now, you can use Grid as a class in Node.

Get started

Build your first grid

// Build a default 9x9 grid
var g = new Grid(); 

// Build a custom 15x20 grid
var g = new Grid({
    width: 15,
    height: 20
}); 

// All the options
var g = new Grid({
    width: 10,
    height: 10,
    name: "An easy grid",
    nbbombs: 10
}); 

Learn how to play

See the Get started guide to learn how to play and use this library. See the Methods list available and optional parameters to see the complete guide.

Contributing

Want to contribute ?

You want to suggest new features ? Please open an issue (on GitHub).

You are a developer ? Take a look at the to do list to see if you can help me improving this repo. If you want to add something that is not in the To Do List, you can also make a Pull Request.

Contributors Z

Found a bug / Need help ?

Please open an issue (on GitHub) to request a change or report an issue.

License

MinesweeperJS is licensed under the MIT License.