Ça trolle…
/
troll.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
e1ae33c
)
Randomize defeated avatar rotation direction
author
JBM
<jbm@codingame.com>
Sat, 23 May 2020 00:06:33 +0000
(
02:06
+0200)
committer
JBM
<jbm@codingame.com>
Wed, 27 May 2020 14:53:54 +0000
(16:53 +0200)
src/main/java/com/codingame/game/View.java
patch
|
blob
|
history
diff --git
a/src/main/java/com/codingame/game/View.java
b/src/main/java/com/codingame/game/View.java
index
db7584c
..
b8d42c4
100644
(file)
--- a/
src/main/java/com/codingame/game/View.java
+++ b/
src/main/java/com/codingame/game/View.java
@@
-167,7
+167,8
@@
class View {
void destroy() {
graphicEntityModule.commitEntityState(0.5, avatar);
- avatar.setRotation(170*Math.PI/180, Curve.ELASTIC);
+ int dir = random.nextInt(2) == 1 ? 1 : -1;
+ avatar.setRotation(dir * 170 * Math.PI / 180, Curve.ELASTIC);
graphicEntityModule.commitEntityState(0.5, castle);
castle.setX(castle.getX(), Curve.ELASTIC);