#251 [Marauroa] Initialization of zones in RPWorld constructor

None
closed
nobody
None
5
2013-08-14
2012-09-13
No

I believe the zones variable initialization should be within the initialize() method instead. If for some reason super() is called twice the zones will be rest. Also protecting the initialize() method with a flag to prevent this from happening more than once would be good.

Discussion

  • Hendrik Brummermann

    • status: open --> closed
    • Group: -->
     
  • Hendrik Brummermann

    I think the constructor is the right place for the initialisation. super() cannot be called twice, the compiler prevents that. And unlike in initialized(), the subclass cannot forget to call super() in a constructor. Therefore it is ensured that the variable is initialized.

    I am not sure why playerContainer is created in initialized().

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks