This repository has been archived on 2022-01-16. You can view files and clone it, but cannot push or open issues or pull requests.
irreligious/src/model/GameConfig.ts

64 lines
2.0 KiB
TypeScript
Raw Normal View History

2021-08-18 15:36:02 -05:00
/// <reference path="./GameState.ts" />
2021-08-20 17:12:32 -05:00
/// <reference path="./resource/Money.ts" />
2021-08-18 10:09:19 -05:00
/// <reference path="./resource/Religion.ts" />
class GameConfig {
public worldPopulation: number = 790000000;
// religion configs
public relChristianityShare: number = 0.325;
public relIslamShare: number = 0.215;
public relHinduismShare: number = 0.16;
public relBuddhismShare: number = 0.06;
public relSikhismShare: number = 0.04;
public relJudaismShare: number = 0.02;
public relOtherShare: number = 0.02;
2021-08-18 10:09:19 -05:00
public relNoneShare: number = 0.16;
public generateState (): GameState {
const state: GameState = new GameState();
2021-08-18 15:36:02 -05:00
2021-08-20 17:12:32 -05:00
// create player organization
state.addResource('plorg', new Religion(
'Player', 'In you they trust.', 0));
2021-08-20 17:12:32 -05:00
2021-08-18 15:36:02 -05:00
// create world religions
state.addResource('xtian', new Religion(
'Christianity', 'God, Jesus, Bible, churches.',
this.relChristianityShare * this.worldPopulation));
state.addResource('islam', new Religion(
'Islam', 'God, Muhammad, Quran, mosques.',
this.relIslamShare * this.worldPopulation));
state.addResource('hindu', new Religion(
'Hinduism', 'Dogma-free spiritualism.',
this.relHinduismShare * this.worldPopulation));
state.addResource('buddh', new Religion(
'Buddhism', 'The minimization of suffering.',
this.relBuddhismShare * this.worldPopulation));
state.addResource('sikhi', new Religion(
'Sikhism', 'Meditation and ten Gurus',
this.relSikhismShare * this.worldPopulation));
state.addResource('judah', new Religion(
'Judaism', 'God, Abraham, Torah, synagogues.',
this.relJudaismShare * this.worldPopulation));
state.addResource('other', new Religion(
'Other', 'A variety of belief systems.',
this.relOtherShare * this.worldPopulation));
state.addResource('agnos', new Religion(
'Non-Religious', 'Atheists and agnostics.',
this.relNoneShare * this.worldPopulation));
// add purchasable resources
2021-08-21 12:45:58 -05:00
state.addResource('money', new Money(100));
2021-08-20 17:12:32 -05:00
2021-08-18 15:36:02 -05:00
return state;
}
2021-08-18 10:09:19 -05:00
}