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
V

link[] places;
link place;
link character;
import random from 'random-world';
restore {
if(this.places.empty)
this.createPlaces();
this.character ??= create('')
}
async render() {
}
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);
}
}