// I might need this code later!
//
1/12/13
python3 -m http.server
1/12/13
Dear David,
Thanks for your message the other day
1/12/13
License Key
12345678-91234567-78912345-67891234-56789123
1/12/13
67 ./configure --prefix=/usr/local && make && make install
68 history
1/12/13
www.youtube.com/watch?v=dQw4w9WgXcQ
1/12/13
// I might need this code later!
//
// I could comment it out and leave it, or create
// a new document and copy it there... but
// SourceNote is quicker, easier, and searchable.
export function availableMove(puzzle, square) {
const { size, empty } = puzzle;
const squareIndex = getIndex(puzzle, square);
const emptyIndex = getIndex(puzzle, empty);
const canMove = movableSquares(puzzle).includes(square);
if (canMove && squareIndex - size === emptyIndex) return 'up';
if (canMove && squareIndex + size === emptyIndex) return 'down';
if (canMove && squareIndex - 1 === emptyIndex) return 'left';
if (canMove && squareIndex + 1 === emptyIndex) return 'right';
return 'none';
}