shougi
v1.1.9
Published
``` const {viewer, ruleEngine} = require("shougi"); var gameData = ruleEngine.getStartGameData(); let onMoved = (movedGameData) => { console.info('Moved GameData', movedGameData); ... }; let player = 0; // 0 or 1 viewer.draw("#ban", 10, 10, 10
Downloads
28
Readme
Shougi
const {viewer, ruleEngine} = require("shougi");
var gameData = ruleEngine.getStartGameData();
let onMoved = (movedGameData) => {
console.info('Moved GameData', movedGameData);
...
};
let player = 0; // 0 or 1
viewer.draw("#ban", 10, 10, 10, shogiRuleEngineGameData, player, onMoved);
ruleEngine.getStartGameData()
初期ゲームデータを取得する
viewer.draw(element, top, left, gap, gameData, player, onMovedCallback)
描画する