Skip to content

Commit 4a8d3e8

Browse files
committed
Fix bug in snake game
1 parent a79737e commit 4a8d3e8

7 files changed

Lines changed: 10 additions & 5 deletions

File tree

snap-develop/snap-develop.iml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
<orderEntry type="library" name="Maven: org.codehaus.plexus:plexus-component-annotations:1.5.5" level="project" />
3131
<orderEntry type="library" name="Maven: org.apache.maven.wagon:wagon-provider-api:2.10" level="project" />
3232
<orderEntry type="library" name="Maven: org.apache.maven.wagon:wagon-http-lightweight:2.10" level="project" />
33+
<orderEntry type="library" name="Maven: org.apache.maven.wagon:wagon-http-shared:2.10" level="project" />
34+
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.7.2" level="project" />
35+
<orderEntry type="library" name="Maven: commons-io:commons-io:2.2" level="project" />
3336
<orderEntry type="library" name="Maven: org.snapscript:snap-compile:1.0.2" level="project" />
3437
<orderEntry type="library" name="Maven: org.snapscript:snap-tree:1.0.2" level="project" />
3538
<orderEntry type="library" name="Maven: org.snapscript:snap-core:1.0.2" level="project" />
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// https://github.com/uin3566/FlappyBird
1+
22
var panel = new GamePanel(context);
33
game.start(panel);

snap-develop/work/android/flappybird/GamePanel.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import android.graphics.Color;
1616

1717
class GamePanel with Panel {
1818

19-
static const Y_DOWN_ACCELERATE = 7.0f;
19+
static const Y_DOWN_ACCELERATE = 9.0f;
2020

2121
var context;
2222
var gameStatus;
@@ -77,7 +77,7 @@ class GamePanel with Panel {
7777

7878
initResources();
7979

80-
var isSpeedMode = false;
80+
var isSpeedMode = true; // increase the speed
8181
if (isSpeedMode) {
8282
speedX = 20;
8383
scoreIncrease = 2;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://github.com/uin3566/FlappyBird

snap-develop/work/android/snake/Cell.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Cell extends GameElement {
77
}
88

99
new(cell) :super(cell.radius){
10-
this.x = cell.y;
10+
this.x = cell.x;
1111
this.y = cell.y;
1212
}
1313
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// https://github.com/ferrolho/android-snake
1+
22
var panel = new GamePanel(context);
33
game.start(panel);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://github.com/ferrolho/android-snake

0 commit comments

Comments
 (0)