Coder Social home page Coder Social logo

Civil War Attrition bug? about awakening HOT 2 CLOSED

MrSkinny avatar MrSkinny commented on August 24, 2024
Civil War Attrition bug?

from awakening.

Comments (2)

sellmerfud avatar sellmerfud commented on August 24, 2024 1

The problem is that the list of countries in Civil War is not reevaluated after adding the militia for Advisors.

All of the data structures are immutable. I have calculated the 'civilWars' variable as first line of the civilWarAttrition function, but then later I add a militia to Syria due to the presence of the Advisors.

When iterating through the list of countries in CivilWar, we still have the 'old' copy of Syria from before the militia was added.

I changed the 'val' declaration to a 'def' so that we now reevaluate the civil war countries each time we need to use them to ensure we get the latest copy of the data.

Thanks for reporting the problem. I have checked in a fix. Version 3.3 is now available.

from awakening.

MrSkinny avatar MrSkinny commented on August 24, 2024

https://github.com/sellmerfud/awakening/blob/master/src/main/scala/awakening/LabyrinthAwakening.scala#L3184

Is m.totalTroopsAndMilitia a calculated prop? I'm not sure if it's updated after game.updateCountry() is invoked, which is where the militia gets added.

from awakening.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.