MountainRange / MULE

OSS Mule, Built To New Heights :sunrise_over_mountains:
GNU General Public License v3.0
5 stars 0 forks source link

Refactoring and Shop additions #30

Closed strburst closed 9 years ago

strburst commented 9 years ago

I've done a bunch of refactoring to GameManager/WorldMap/Player, and made some additions to Shop:

Please give feedback/merge. Also, @jgkamat and everyone else, could you test this to see if it works on your machine? I'm getting a "Scene hasn't been loaded!" when I try to hit "Start Game".

jgkamat commented 9 years ago

Looks good to me! :+1:

strburst commented 9 years ago

We need to fix that NullPointerException in PlayController somehow, either by not initializing a WorldMap until we know about all the players, or letting players be dynamically added to WorldMap.

The latter is pretty inelegant, but I don't know how to do the former.

jgkamat commented 9 years ago

I'm trying to find any usages of initialize() and I cant find any, so I'm assuming they have to be loaded when the program starts. IMO the playmanger shouldn't contain ANYTHING, if at all, it should be subclasses or alike things.

strburst commented 9 years ago

After poking around, I can see in the start method in MULE, all the fxml files/controllers are loaded when the game starts; there must be an associated call to initialize in the loadScene method in SceneLoader.

jgkamat commented 9 years ago

Hmm, we could possibly add it there, but I still think that this data shouldn't be in the controllers. Controllers are on the view side, while this info should be in the model.

strburst commented 9 years ago

I've fixed some bugs my changes introduced (e.g. in calculateTurnOrder). I'm still getting this annoying issue where some of the tiles don't show up properly; I'm not sure why. See below.

buggytiles

Also, there will be some merge conflicts with @joshhting's branch to fix.

strburst commented 9 years ago

@MountainRange/peaks hopefully we can merge this and Josh's changes soon so I can get to work on production computations.

jgkamat commented 9 years ago

Huh, I'll figure out whats going on there