Skip to content
This repository has been archived by the owner on Sep 28, 2020. It is now read-only.

Commit

Permalink
Merge branch 'exp_gershuk' of https://github.com/Andru1999/IWBD.git i…
Browse files Browse the repository at this point in the history
…nto experemental_dev
  • Loading branch information
Alkonior committed Jul 22, 2018
2 parents 03106b0 + 71b5e8f commit ab68f9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions GameEngine/Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ class GameMap {
this._cells = getVector3(width, height, depth);
this.generateMap();
}

getMapSize(){
return {width:this._width,height:this._height,depth:this._depth}
}

generateMap() {
let variant = getRandomInt(0, 3);
Expand Down
4 changes: 4 additions & 0 deletions GameEngine/Space_World.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ class SpaceWorld {
else return "empty";
}

getWorldSize (){
return this._world._map.getMapSize();
}

doAction(x, y, mouseButton) {
if (x<0 || y<0 || x>this._world._map._width || y>this._world._map._height) return "not in map"
if (mouseButton === 2) {
Expand Down

0 comments on commit ab68f9e

Please sign in to comment.