UNPKG

phaser4-rex-plugins

Version:
10 lines (9 loc) 295 B
var GetSneakTileZ = function (moveTo, tileX, tileY, tileZ) { var board = moveTo.chessData.board; var sneakTileZ = tileZ.toString(); do { sneakTileZ += '.'; } while (board.contains(tileX, tileY, sneakTileZ)) return sneakTileZ; } export default GetSneakTileZ;