MCPcopy Index your code
hub / github.com/Card-Forge/forge / percentTrue

Method percentTrue

forge-core/src/main/java/forge/util/MyRandom.java:45–47  ·  view source on GitHub ↗

percentTrue. If percent is like 30, then 30% of the time it will be true. @param percent an int. @return a boolean.

(final int percent)

Source from the content-addressed store, hash-verified

43 * @return a boolean.
44 */
45 public static boolean percentTrue(final int percent) {
46 return percent > MyRandom.getRandom().nextInt(100);
47 }
48
49 /**
50 * Gets the random.

Callers 15

preparePlayerZoneMethod · 0.95
startRoundMethod · 0.95
chooseMethod · 0.95
shouldPumpCardMethod · 0.95
declareAttackersMethod · 0.95
considerMethod · 0.95
attemptToAssistMethod · 0.95

Calls 1

getRandomMethod · 0.95

Tested by

no test coverage detected