private void ensureTilesSize(int x, int y){
		Tile[][] oldTiles = this.tiles;
		int maxX = x > oldTiles.length ? x : oldTiles.length;
		int maxY = oldTiles.length == 0 || y > oldTiles[0].length ? y : oldTiles[0].length;
		this.tiles = new Tile[maxX+1][maxY+1];
		for (int lx = 0; lx < oldTiles.length; lx++){
			for (int ly = 0; ly < oldTiles[lx].length; ly++){
					this.tiles[lx][ly] = oldTiles[lx][ly];
			}
		}
	}