magic-square-generator
v1.0.1
Published
Magic square generator
Downloads
3
Readme
magic-square-generator
Un module Node.js pour générer un carré magique
Installation
npm install magic-square-generation --save
Usage
Javascript
var generator = require('magic-square-generation').MagicSquare;
var square = new generator(3); // 3 => Dimension du carré 3*3
await square.generate();
Output should be => Magic square : [ [ 2, 7, 6 ], [ 9, 5, 1 ], [ 4, 3, 8 ] ]
TypeScript
import { MagicSquare } from 'magic-square-generation';