New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

flash-duel

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

flash-duel

Flash Duel board game

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

flash-duel

Flash Duel board game library with basic game modes.

  • 1v1
  • 2v2

features

  • event based turns
  • extendable

usage

var Game = require('flash-duel').Game;

var game = new Game('1v1', function(err, game) {
	// game initialized
});

// or
game.on('init', function(err, game) {
	// game initialized
});

// Handle start event
game.on('start', function(err, game) {

	game.players[0].on('turn', function(action, game) {
		// Player can perform an action
	});

	game.players[0].on('defend', function(defend, game) {
		// Player can defend from an attack
	});

	game.players[0].on('recover', function(game) {
		// Player is informed when turn is skipped and is recovering
	});

	game.players[0].on('win', function(action, game) {
		// Player has won!
	});

	game.players[0].on('lost', function(action, game) {
		// Player has lost!
	});

});

// Trigger the start of a game
game.start();

entities

  • Game
  • Board
  • Deck
  • Player
  • Game Mode

Keywords

board

FAQs

Package last updated on 07 Apr 2014

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