This commit is contained in:
Vick Scarlet
2021-08-17 17:07:14 +08:00
parent 776bc33de1
commit dd194c899a
20 changed files with 2660 additions and 573 deletions

View File

@@ -1,7 +1,7 @@
import { readFile } from 'fs/promises';
import Life from '../src/life.js'
global.json = filePath => readFile(filePath);
global.json = async fileName => JSON.parse(await readFile(`data/${fileName}.json`));
async function debug() {
@@ -28,9 +28,9 @@ async function debug() {
}
lifeTrajectory.push(lifeTrajectory);
const { age, content } = trajectory;
console.debug(`---------------------------------`);
console.debug(`-- ${age}`);
console.debug(' ',
console.debug(
`---------------------------------`,
`\n-- ${age}\n `,
content.map(
({type, description, rate, name, postEvent}) => {
switch(type) {