コード例 #1
0
 /**
  * Create a new SOCBuildingSpeedEstimate, calculating the rollsPerResource and resourcesPerRoll
  * based on the player's dice numbers (settlement/city hexes).
  *
  * @param numbers the numbers that the player's pieces are touching
  */
 public SOCBuildingSpeedEstimate(SOCPlayerNumbers numbers) {
   estimatesFromNothing = new int[MAXPLUSONE];
   estimatesFromNow = new int[MAXPLUSONE];
   rollsPerResource = new int[SOCResourceConstants.WOOD + 1];
   recalculateRollsPerResource(numbers, -1);
   resourcesForRoll = new SOCResourceSet[13];
   recalculateResourcesForRoll(numbers, -1);
 }
コード例 #2
0
 /**
  * Recalculate both rollsPerResource and resourcesPerRoll, optionally considering the robber's
  * location.
  *
  * @param numbers the numbers that the player is touching
  * @param robberHex Robber location from {@link SOCBoard#getRobberHex()}, or -1 to ignore the
  *     robber
  * @see #recalculateEstimates(SOCPlayerNumbers)
  */
 public void recalculateEstimates(SOCPlayerNumbers numbers, int robberHex) {
   recalculateRollsPerResource(numbers, robberHex);
   recalculateResourcesForRoll(numbers, robberHex);
 }
コード例 #3
0
 /**
  * recalculate both rollsPerResource and resourcesPerRoll
  *
  * @param numbers the numbers that the player is touching
  * @see #recalculateEstimates(SOCPlayerNumbers, int)
  */
 public void recalculateEstimates(SOCPlayerNumbers numbers) {
   recalculateRollsPerResource(numbers, -1);
   recalculateResourcesForRoll(numbers, -1);
 }