Skip to content

Commit

Permalink
game core Bomb, Fire class draft
Browse files Browse the repository at this point in the history
  • Loading branch information
killalau committed May 23, 2013
1 parent 16c654e commit 7db97cb
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
16 changes: 16 additions & 0 deletions csci4140/game_core/Bomb.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var Element = require('./Element');

Bomb.prototype = new Element.Element();
Bomb.prototype.constructor = Bomb;
function Bomb(grid){
Element.Element.call(this, grid);
this.classname = "Bomb";

this.isBlockable = true;
}

Bomb.prototype.vanish = function(){
this.grid.removeElement(this);
}

exports.Bomb = Bomb;
1 change: 0 additions & 1 deletion csci4140/game_core/Element.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ Element.prototype.moveStart = function(){
self.move(gy,gx);
};
}(), 30);
this.gClient.sendData();
}

Element.prototype.moveStop = function(){
Expand Down
14 changes: 14 additions & 0 deletions csci4140/game_core/Fire.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var Element = require('./Element');

Fire.prototype = new Element.Element();
Fire.prototype.constructor = Fire;
function Fire(grid){
Element.Element.call(this, grid);
this.classname = "Fire";
}

Fire.prototype.vanish = function(){
this.grid.removeElement(this);
}

exports.Fire = Fire;

0 comments on commit 7db97cb

Please sign in to comment.