Showing 30 of 115 total issues
Function citizenFunction
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function citizenFunction (citizenName:string, options:citizenFunctionOptions) {
switch (citizenName) {
case 'farmer':
farmerFunction(options.resources, options.amount, options.citizens.get('farmer'));
break;
Function createMenuScreen
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createMenuScreen() {
let menuScreen = `
<section class='screen menu-screen' id='menu'>
<section class='menu-screen-inner'>
<h3>menu</h3>
Avoid deeply nested control flow statements. Open
Open
if (playerCiv.faithBonusPantheonTotal >= playerCiv.faithBonusPantheonLimit) {
console.log('disability/ability check for religion');
disableBonuses(FaithTier.Pantheon);
enableBonuses(FaithTier.Organized);
}
Function philosophy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function (citizens:Collection<Citizen>, resources:Collection<Resource>, playerCiv:Civilization, buildings:Collection<Building>, wonders:Collection<Wonder>) {
Function mysticism
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function (citizens:Collection<Citizen>, resources:Collection<Resource>, playerCiv:Civilization, buildings:Collection<Building>, wonders:Collection<Wonder>) {
Function masonry
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function (citizens:Collection<Citizen>, resources:Collection<Resource>, playerCiv:Civilization, buildings:Collection<Building>, wonders:Collection<Wonder>) {
Function calendar
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function (citizens:Collection<Citizen>, resources:Collection<Resource>, playerCiv:Civilization, buildings:Collection<Building>, wonders:Collection<Wonder>) {
Function construction
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function (citizens:Collection<Citizen>, resources:Collection<Resource>, playerCiv:Civilization, buildings:Collection<Building>, wonders:Collection<Wonder>) {
Function warStrategy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function (citizens:Collection<Citizen>, resources:Collection<Resource>, playerCiv:Civilization, buildings:Collection<Building>, wonders:Collection<Wonder>) {
Function updatePopulation
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export function updatePopulation(pop:number, playerCiv:Civilization, game:Game, citizens:Collection<Citizen>, options) {