tracks/ecmascript/exercises/queen-attack/example.js in trackler-2.2.1.159 vs tracks/ecmascript/exercises/queen-attack/example.js in trackler-2.2.1.160

- old
+ new

@@ -24,11 +24,11 @@ const board = self.board; board[(self.black[0] * W * 2) + (self.black[1] * 2)] = 'B'; board[(self.white[0] * W * 2) + (self.white[1] * 2)] = 'W'; } -const QueenAttack = (params = STARTING) => { +function QueenAttack (params = STARTING) { const self = this instanceof QueenAttack ? this : Object.getPrototypeOf(QueenAttack); if (samePosition(params)) { throw new Error('Queens cannot share the same space'); } @@ -45,8 +45,8 @@ }; self.toString = () => self.board.join(''); return self; -}; +} export default QueenAttack;