src/components/template.ts
File template.ts
has 818 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Achievement, Biome, BiomeType, Building, Citizen, Civilization,
Collection, Economy, Era, FaithBonus, FaithTier, Game, Leader, Legacy,
log, Nation, notify, Queue, Resource, Robot, Settings, SocialPolicy,
Soldier, Tech, generateTooltips, updateTooltip, betterUpdateTooltip,
Trait, Wonder
Function createResourcesScreen
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createResourcesScreen(playerCiv:Civilization, resources:Collection<Resource>) {
let resourcesScreen = `
<section class='screen resources-screen' id='resources'>
<h2 data-tooltip='Resources are nice.'><img src='img/resources.png'> Resources</h2>
<section class='resources-screen-inner'>
Function createCivilizationScreen
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createCivilizationScreen(playerCiv:Civilization):string {
let civilizationScreen = `
<section class='screen civilization-screen' id='civilization'>
<h2><img src='img/empire.png'> Civilization</h2>
<section class='civilization-screen-inner'>
Templates
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export class Templates {
createStartScreen(playerCiv:Civilization, game:Game) {
let startScreen = `
Function createDiplomacyScreen
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createDiplomacyScreen(playerCiv:Civilization) {
let diplomacyScreen = `
<section class='screen diplomacy-screen' id='diplomacy'>
<h2>
<img src='img/deal.png'> Diplomacy
Function createCultureScreen
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createCultureScreen(playerCiv:Civilization) {
let cultureScreen = `
<section class='screen culture-screen' id='culture'>
<div class='expand culture-expand' title='Expand the screen size.'>
<img src='img/expand.png'>
Function createSettingsScreen
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createSettingsScreen(playerCiv:Civilization, game:Game) {
let settingsScreen = `
<section class='screen settings-screen' id='settings'>
<h2>
<img src='img/gear.png'> Settings
Function createEconomyScreen
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createEconomyScreen(playerCiv:Civilization) {
let economyScreen = `
<section class='screen economy-screen' id='economy'>
<h2><img src='img/money.png'> Economy</h2>
<section class='economy-screen-inner'>
Function createScreenHeader
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createScreenHeader(playerCiv:Civilization, game:Game):string {
let screenHeader = `
<header class='screen-header'>
<div class='player-info'>
<img src='img/${u.dasherize(playerCiv.leader.name)}.jpg'>
Function createTechnologyScreen
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createTechnologyScreen(playerCiv:Civilization) {
let technologyScreen = `
<section class='screen technology-screen' id='technology'>
<h2><img src='img/research.png'> Technology</h2>
<section class='technology-screen-inner'>
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>