jacksonjunelee / pokemon_app

Project Three -pokemon_app
0 stars 0 forks source link

Missing parameters in Main Game Object #8

Closed jacksonjunelee closed 9 years ago

jacksonjunelee commented 9 years ago

@harimohanraj89 @DrRobotmck @htella The problem is similar to yesterday where I have game.start() and loadGameDiv. Yesterday, game.start() takes time to finish, since it has to make ajax calls to fetch pokemon and trainer information. The problem was resolved by loading loadGameDiv before game.start().

The functions I created today(assign,checkMoveFirst,attackPhase) heavily uses the parameters from game.start().No matter the order,if game.start() and any one of these functions are executed in the same block the parameters are always null. I solved the problem by creating a new function that I type in the console after game.start().

I was wondering if there were alternative options.

htella commented 9 years ago

reading