Difference between revisions of "Thread:Talk:RoboJogger/Accessing Battle Results/reply"

From Robowiki
Jump to navigation Jump to search
 
(rewrite this now that I see you already mentioned BattleResultHandler =))
 
Line 1: Line 1:
Yep, that makes sense. It' similar to what I have internally from RoboRunner to BattleRunner with the BattleRunner.BattleResultHandler interface. That's a pretty low level interface that BattleRunner calls after every battle, passing just raw scores and elapsed time. Then RoboRunner adds all the score processing / storing / displaying.
+
Yep, that makes sense. I think when you're listening to RoboRunner, you might want some higher level data too, like avg score and number of battles. So I think adding a new / similar listener to the RoboRunner class makes more sense than just letting you add more custom instances of the existing BattleResultHandler. The new interface method could take the raw scores and elapsed time, as now, plus whatever other summary data you want. At the end of RoboRunner's BattleResultHandler.processResults(), we call the higher level listener, if it's been set.
  
I think when you're listening to RoboRunner, you might want some higher level data too, like avg score and number of battles. So I think adding a new / similar listener to the RoboRunner class makes more sense than just letting you add more custom instances of the existing BattleResultHandler. The new interface method could take the raw scores and elapsed time, as now, plus whatever other summary data you want. At the end of RoboRunner's BattleResultHandler.processResults(), we call the higher level listener, if it's been set.
+
Does that sound about right?
 
 
Does that sound reasonable?
 

Latest revision as of 01:41, 6 December 2012

Yep, that makes sense. I think when you're listening to RoboRunner, you might want some higher level data too, like avg score and number of battles. So I think adding a new / similar listener to the RoboRunner class makes more sense than just letting you add more custom instances of the existing BattleResultHandler. The new interface method could take the raw scores and elapsed time, as now, plus whatever other summary data you want. At the end of RoboRunner's BattleResultHandler.processResults(), we call the higher level listener, if it's been set.

Does that sound about right?