Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bgoodman/minesweeper-game

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bgoodman/minesweeper-game

The popular game 'minesweeper' made available as a custom element.

  • 1.1.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

minesweeper-game

The popular game 'minesweeper' made available as a custom element.

Installation

yarn add @bgoodman/minesweeper-game

npm install @bgoodman/minesweeper-game

Usage

<!DOCTYPE html>
<html>
<head>
    <title>Minesweeper</title>
    <script type="module" src="./dist/index.js"></script>
</head>

<body>

    <minesweeper-game width=5 height=10></minesweeper-game>

</body>

</html>

Attributes

width (number)

The width (in cells) of the game grid.

height (number)

The height (in cells) of the game grid.

mines (number)

Override the default amount of mines placed in the game. Otherwise calculated as Math.floor(Math.sqrt(height * width)).

scale (number)

Override the game's default scale in multiples of 1. Values less(greater) than 1 will result in a smaller(larger) width and height of the game grid. Default scale (1) renders each cell in the game grid as 30px x 30px.


Methods

newGame(): void

Resets the current game using existing values of width, height and (optionally) mines.

Keywords

FAQs

Package last updated on 13 Jan 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc