Closed huihuifan closed 10 years ago
fixed 1 and 2.
Ideas for what to do with recipes? @BenjyLevin @rkgibson2
did #3 and #5.
sliding seems difficult.
need scale on item percent bar chart @BenjyLevin how did you do this for your bonus problem?
New Thing: @huihuifan Hero sunburst transition.
New thing @rkgibson2
I don't think we want to throw errors during the linear search in the d2 library. For instance, if I want hero info with ID 110, the linear search will throw error at ID 105 since that hero doesnt exist, and wont continue searching through the array.
I commented out the throw error and just returned 0. This may be an issue with some of the other search functions
@BenjyLevin What do you mean? The search iterates over all the heroes and checks whether that id is equal to the id we're looking up. It doesn't care what order the heroes are in in heroes.json. If it reaches the end, it knows it hasn't found anything and the hero doesn't exist in the json file
The problem is that it indexes into "heroData[i].id" but for example, heroData[25].id does not exist, so it throws an exception, instead of carrying on the linear search.
I suppose we can have a quick check like: if(heroData[i].id)..
closed. new updated to fix file anyway