[*] wrapping for flatXY

This commit is contained in:
Gavin McDonald
2018-12-15 11:35:17 -05:00
parent ad4a16b796
commit 9b4f2e92ad
5 changed files with 61 additions and 14 deletions

View File

@@ -130,9 +130,15 @@ class Demo {
const key = `${ x },${ z != null ? z : y }`;
const pipMax = this.settings.tile === Tessellate.TILE_STYLES.HEX ? 7 : 9;
this.map[key].pips = Tessellate.utils.random(1, pipMax);
console.log({x, y, z});
if (this.map[key]) {
this.map[key].pips = Tessellate.utils.random(1, pipMax);
console.log(key);
}
else {
console.log('ERROR - no tile', key);
}
}
pressStart(tap) {