Ça trolle…
/
troll.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FIX: IT belongs in a MODEL!
[troll.git]
/
src
/
main
/
java
/
com
/
codingame
/
game
/
Model.java
diff --git
a/src/main/java/com/codingame/game/Model.java
b/src/main/java/com/codingame/game/Model.java
index
96140f5
..
beff100
100644
(file)
--- a/
src/main/java/com/codingame/game/Model.java
+++ b/
src/main/java/com/codingame/game/Model.java
@@
-192,6
+192,14
@@
class Model {
p1.adjustScore(trollPosition);
}
p1.adjustScore(trollPosition);
}
+ boolean FIX_IT() {
+ switch (league.fixLevel) {
+ case SOMETIMES: return random.nextInt(10) > 0;
+ case NEVER: return false;
+ default: throw new JavaLimitationError();
+ }
+ }
+
private Integer winner;
boolean haveWinner() {
return winner != null;
private Integer winner;
boolean haveWinner() {
return winner != null;