mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 02:21:24 +01:00
refactor: generate historical conflicts
This commit is contained in:
parent
a2192fb984
commit
9b3a3f2e48
11 changed files with 81 additions and 28 deletions
|
|
@ -16,7 +16,7 @@ export function specifyStates(
|
|||
diplomacy: TDiplomacy,
|
||||
cultures: TCultures,
|
||||
burgs: TBurgs
|
||||
): TStates {
|
||||
): {states: TStates; conflicts: IConflict[]} {
|
||||
TIME && console.time("specifyStates");
|
||||
|
||||
const colors = defineStateColors(statistics);
|
||||
|
|
@ -56,10 +56,8 @@ export function specifyStates(
|
|||
};
|
||||
});
|
||||
|
||||
const wars = generateConflicts(states); // mutates states
|
||||
console.log(wars);
|
||||
console.log(states);
|
||||
const conflicts = generateConflicts(states, cultures); // mutates states
|
||||
|
||||
TIME && console.timeEnd("specifyStates");
|
||||
return [NEUTRALS, ...states];
|
||||
return {states: [NEUTRALS, ...states], conflicts};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue