EmmaRamirez/Clickopolis

View on GitHub

Showing 30 of 115 total issues

Function citizenFunction has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function citizenFunction (citizenName:string, options:citizenFunctionOptions) {
    switch (citizenName) {
        case 'farmer':
            farmerFunction(options.resources, options.amount, options.citizens.get('farmer'));
            break;
Severity: Minor
Found in src/data/citizen-function.ts - About 1 hr to fix

    Function createMenuScreen has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      createMenuScreen() {
        let menuScreen = `
          <section class='screen menu-screen' id='menu'>
            <section class='menu-screen-inner'>
              <h3>menu</h3>
    Severity: Minor
    Found in src/components/template.ts - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                    if (playerCiv.faithBonusPantheonTotal >= playerCiv.faithBonusPantheonLimit) {
                      console.log('disability/ability check for religion');
                      disableBonuses(FaithTier.Pantheon);
                      enableBonuses(FaithTier.Organized);
                    }
      Severity: Major
      Found in src/utils/faith.ts - About 45 mins to fix

        Function philosophy has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          function (citizens:Collection<Citizen>, resources:Collection<Resource>, playerCiv:Civilization, buildings:Collection<Building>, wonders:Collection<Wonder>) {
        Severity: Minor
        Found in src/data/tech.ts - About 35 mins to fix

          Function mysticism has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            function (citizens:Collection<Citizen>, resources:Collection<Resource>, playerCiv:Civilization, buildings:Collection<Building>, wonders:Collection<Wonder>) {
          Severity: Minor
          Found in src/data/tech.ts - About 35 mins to fix

            Function masonry has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              function (citizens:Collection<Citizen>, resources:Collection<Resource>, playerCiv:Civilization, buildings:Collection<Building>, wonders:Collection<Wonder>) {
            Severity: Minor
            Found in src/data/tech.ts - About 35 mins to fix

              Function calendar has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                function (citizens:Collection<Citizen>, resources:Collection<Resource>, playerCiv:Civilization, buildings:Collection<Building>, wonders:Collection<Wonder>) {
              Severity: Minor
              Found in src/data/tech.ts - About 35 mins to fix

                Function construction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  function (citizens:Collection<Citizen>, resources:Collection<Resource>, playerCiv:Civilization, buildings:Collection<Building>, wonders:Collection<Wonder>) {
                Severity: Minor
                Found in src/data/tech.ts - About 35 mins to fix

                  Function warStrategy has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    function (citizens:Collection<Citizen>, resources:Collection<Resource>, playerCiv:Civilization, buildings:Collection<Building>, wonders:Collection<Wonder>) {
                  Severity: Minor
                  Found in src/data/tech.ts - About 35 mins to fix

                    Function updatePopulation has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    export function updatePopulation(pop:number, playerCiv:Civilization, game:Game, citizens:Collection<Citizen>, options) {
                    Severity: Minor
                    Found in src/utils/population.ts - About 35 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language