/** * 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); }
/** * 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); }
/** * 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); }