This repository has been archived on 2023-11-14. You can view files and clone it, but cannot push or open issues/pull-requests.
vogue/test/world.v

28 lines
383 B
Coq
Raw Normal View History

2021-05-02 17:42:04 -04:00
link[] places;
link place;
link character;
2021-05-18 07:56:57 -04:00
import random from 'random-world';
2021-05-06 23:05:36 -04:00
restore {
2021-05-18 10:51:53 -04:00
if(this.places.empty)
this.createPlaces();
2021-05-06 09:33:28 -04:00
2021-05-18 10:51:53 -04:00
this.character ??= create('')
2021-05-18 07:56:57 -04:00
}
async render() {
2021-05-18 10:51:53 -04:00
}
createPlaces() {
for(let i = 0; i < 10; i ++) {
const name = random.city();
const valid = !!name.match(/^[A-Za-z ]*$/);
if(!valid) {
i --;
continue;
}
console.log(name);
}
2021-05-06 23:05:36 -04:00
}