Skip to content

Commit

Permalink
todo done. just highlightOff on same square click
Browse files Browse the repository at this point in the history
  • Loading branch information
pkrumins committed Aug 29, 2010
1 parent ca703f1 commit 7055f9d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/render/viewer.js
Expand Up @@ -148,7 +148,6 @@ function Viewer (board, topside, players, mode, moveMakerF) {

function highlightOnOffFull(sq,x,y) {
highlightOnOff(sq);
// TODO: game state!!
var moves = MoveGenerator(board, gameState, board.at(x,y), true);
moves.forEach(function (move) {
highlightOnOff(cells[move.x][move.y]);
Expand All @@ -161,7 +160,7 @@ function Viewer (board, topside, players, mode, moveMakerF) {
if (srcMove) {
var piece = board.pieceAt(srcMove.x, srcMove.y);
if (srcMove.x == x && srcMove.y == y) { // cancel selected move
highlightOnOffFull(cell,x,y);
highlightOffFull(cell,x,y);
srcMove = null;
return;
}
Expand Down

0 comments on commit 7055f9d

Please sign in to comment.