npm.io
1.0.1 • Published 6 years ago

duck-hunt

Licence
MIT
Version
1.0.1
Deps
0
Size
90 kB
Vulns
0
Weekly
0

duck-hunt

A duck hunt game to play on your url

Demo

You can play it here

Use your arrow keys to aim and spacebar to shoot!

Installation

Using npm:

$ npm install duck-hunt

Using jsDelivr CND:

<script src="https://cdn.jsdelivr.net/npm/duck-hunt/dist/duck-hunt.min.js"></script>

Usage

Basic usage:

import DuckHunt from 'duck-hunt'

const game = new DuckHunt()
game.start()

You can also configure some game parameters when creating the instance

const game = new DuckHunt({
  mapLength: 100,
  numDucks: 5,
  duckRespawnTurns: 100
})

License

MIT

Keywords