Closed strburst closed 9 years ago
Looks good to me! :+1:
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.
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.
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
.
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.
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.
Also, there will be some merge conflicts with @joshhting's branch to fix.
@MountainRange/peaks hopefully we can merge this and Josh's changes soon so I can get to work on production computations.
Huh, I'll figure out whats going on there
I've done a bunch of refactoring to
GameManager
/WorldMap
/Player
, and made some additions toShop
:WorldMap
Shop
(TODO: calculate usage for all other resources)Race
calculateTurnOrder
inGameManager
just two lines! :smile: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".