Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

bs-ball

jeremyfourna1MIT0.1.0

Allow you to define the ball holder inside a game to place the ball on the svg

readme

bs-ball

NPM

Installation

npm i bs-ball

Usage

const { addBallToGame, generateBallPosition } = require('bs-ball');

// Add the class 'ball' to the ball holder
addBallToGame(player, listOfPlayers);

// Display the ball inside the svg
generateBallPosition(svgZoom, ballPosition, svgElement);

All functions are curried.