fix syntax
This commit is contained in:
@@ -10,9 +10,9 @@ var MovementSystem_prototype = {
|
||||
tryMove: function (piece, to) {
|
||||
if (piece.colour != this.turn) return false;
|
||||
|
||||
// normalise ‘to’ into our hybrid coord
|
||||
var dest = [to.x ?? t[0],
|
||||
to.y ?? to[1]];
|
||||
// normalise 'to' into our hybrid coord
|
||||
var dest = [!is_null(to.x) ? to.x : to[0],
|
||||
!is_null(to.y) ? to.y : to[1]];
|
||||
|
||||
if (!this.grid.inBounds(dest)) return false;
|
||||
if (!this.rules.canMove(piece, piece.coord, dest, this.grid)) return false;
|
||||
|
||||
Reference in New Issue
Block a user