cards/parse.js

19 lines
430 B
JavaScript

const data = require("./data/cah-cards-full.json");
let whites = [];
let blacks = [];
for (pack of data) {
console.log(pack.name);
console.log("white cards: " + pack.white.length);
if (pack.white) {
whites.concat(pack.white);
}
console.log("black cards: " + pack.black.length);
if (pack.white) {
blacks.concat(pack.black);
}
}
console.log(whites.length);
console.log(blacks.length);