Skip to content

Commit

Permalink
Add remove-all-building feature
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Jul 1, 2019
1 parent 20d1b7f commit edb848f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
|B|Rebirth|
|Blank|Fire|
|R|Reload the page|
|C|Remove all buildings|
3 changes: 3 additions & 0 deletions javascript/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ document.onkeyup = function (e) {
case "KeyS":
game.tanks[0].moving = false;
break;
case "KeyC":
game.buildings = [];
break;
default:
break;
}
Expand Down
6 changes: 3 additions & 3 deletions javascript/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class Tank {
case PLAYER_TANK:
this.blood = 10;
this.armor = 0.6;
this.speed = 2.5;
this.attackInterval = 30;
this.speed = 3;
this.attackInterval = 20;
this.bullet.damage = 5;
this.bullet.speed = 15;
break;
Expand All @@ -43,7 +43,7 @@ class Tank {
case HEAVY_TANK:
this.blood = 20;
this.armor = 0.7;
this.speed = 1.5;
this.speed = 1;
this.attackInterval = 60;
this.bullet.damage = 7;
this.bullet.speed = 7;
Expand Down

0 comments on commit edb848f

Please sign in to comment.