Giter Club home page Giter Club logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 5, 2024
Yes, thanks for spotting this question up -- it also requires some 
clarification. In the beginning it was only the sequential approach elaborated, 
i.e. it is obvious here what's happening:
CmdLineOptions c = new CmdLineOptions(); //all documented defatuls
c.setEnemies("g:10"); // 10 goombas
c.setInvulnerable(true); // defaults, but 10 goombas and Mario is invulnerable 
to creatures.

WOuld you say that c.setArgs("...") should be invariant w.r.t. place it appears 
and c.setEnemies("g:10") should drop 

In this case the cumulative changes are a bit harder to "collect". Now, the 
class does it for you, and by keeping track what's there, one can tweak the 
levels in a desired way. Otherwise in GamePlay it will be necessary to spot 
each additional parameter explicitly as CmdLineOptions class will not store all 
the changes step-by-step. Yet the initial idea of using hash map was also this 
one: to keep track of previous changes.

I came up with this idea: CmdLineOptions.reset() method, that drops all options 
to defaults and is called whenever required. This will keep current behaviour 
and would allow to have invariants of set of options that uniquely define the 
level.

Original comment by [email protected] on 29 Oct 2010 at 9:45

from marioai.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 5, 2024
[deleted comment]

from marioai.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 5, 2024
[deleted comment]

from marioai.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 5, 2024
I can definitely see the convenience of being able to build up options, and 
like your solution of adding a reset().  This way if someone was worried about 
it and wanted to set everything explicitly they could call reset() and not have 
to worry.

Thanks.

Original comment by [email protected] on 29 Oct 2010 at 9:56

from marioai.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 5, 2024
This issue was closed by revision r642.

Original comment by [email protected] on 10 Nov 2010 at 7:20

  • Changed state: Fixed

from marioai.

Related Issues (18)

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.