Skip to content

Commit

Permalink
Code optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
chamodshehanka committed Jul 17, 2018
1 parent cab8d2c commit 162eec2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions js/chessController.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,6 @@ function chessPiece(piece,piecePosition) {

KNIGHT_OFFSETS.forEach(function(array2) {
array2.forEach(function (i) {
// console.log();
});
});
}
Expand Down Expand Up @@ -813,13 +812,14 @@ function chessPiece(piece,piecePosition) {

}
function resetMoveSuggestions() {
var i;

for (var i=0;i<squareSuggestions.length;i++){
for (i=0;i<squareSuggestions.length;i++){
setSquareColor(squareSuggestions[i],null);
}

if (attackSuggestions.length !==0){
for (var i=0;i<attackSuggestions.length;i++){
for (i=0;i<attackSuggestions.length;i++){
setSquareColor(attackSuggestions[i],null);
}
}
Expand Down Expand Up @@ -977,7 +977,7 @@ function selectKnight() {
}
}

function moveToAthree() {
function moveToAThree() {
var nId="#wnl";
var nTemp=$(nId).clone();
$(nId).remove();
Expand Down
2 changes: 1 addition & 1 deletion play.html
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ <h5 class="white-text">Follow us on</h5>
},

'A3':function () {
moveToAthree();
moveToAThree();
}
};
annyang.debug();
Expand Down

0 comments on commit 162eec2

Please sign in to comment.