Counting the number of functions an Object does

I have created this program/scenario. Multiple Robots are created and then "escape" from the room that has been created. I have also created a counter to count the moves that the robots make and then form an average. I have created all this it only wants to return 0 for some reason. It's throwing up no errors or the like so I feel like I'm missing something obvious. Here are both parts of the code: public static double countingMoves; . . . public void move() { super.move(); countingMoves++; } public int getRobotMoves() { return countingMoves; } int Counter = EscapeBot.countingMoves/10;

以上就是Counting the number of functions an Object does的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏