reset password
Author Message
khsu
Posts: 30
Posted 17:40 Mar 05, 2014 |

I am a bit confused on this part of the AI_template.

static int[] calculateMoney(int player, int[] first_moves,
    int[] second_moves) {

}

 

I am aware that we use player, first_moves, second_moves to calculate the money here.

But, I already done this in BiddingGame class which I can easily get what I need by calling out the get method, then put it in the result array. I prefer to do it this way on the actual project as well, since I already coded BiddingGame class beforehand to prep for the AI_template.

If I were to get the variables I need through my methods, the code that you are looking for me to do (for the purpose of grading) won't be here, but on the Bidding Game class.

Never mind that, I couldn't use the method call within the calculate money method.

 

 

On a side note, I think its wise to extend the lab due date. As I recall, the last lab that we had to extend due date even further due to some students having night time classes, it would be unfair to them since they won't have enough time to finish the rest of this lab.

Last edited by khsu at 18:18 Mar 05, 2014.
ladodgersfan
Posts: 13
Posted 20:16 Mar 05, 2014 |

if the bidding game  class has firstmoney and secondmoney as private variables, we can't use that in the AI template on the part that says  We will return an array of integer that assuming my money equals firstmoney
   *    result[0] = my money
   *    result[1] = opponent money
   *    result[2] = tie breaker

never mind

Last edited by ladodgersfan at 20:42 Mar 05, 2014.