Skip to content

Commit 4a43c49

Browse files
committed
Added test line for chess learning app
1 parent a3354e1 commit 4a43c49

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

js/game.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,9 @@ function Game(savedGame) {
800800
}
801801

802802
// Place pieces
803-
gameState = gameState || {1: {1: "♖", 2: "♙", 7: "♟", 8: "♜"}, 2: {1: "♘", 2: "♙", 7: "♟", 8: "♞"}, 3: {1: "♗", 2: "♙", 7: "♟", 8: "♝"}, 4: {1: "♕", 2: "♙", 7: "♟", 8: "♛"}, 5: {1: "♔", 2: "♙", 7: "♟", 8: "♚"}, 6: {1: "♗", 2: "♙", 7: "♟", 8: "♝"}, 7: {1: "♘", 2: "♙", 7: "♟", 8: "♞"}, 8: {1: "♖", 2: "♙", 7: "♟", 8: "♜"}};
803+
//gameState = gameState || {1: {1: "♖", 2: "♙", 7: "♟", 8: "♜"}, 2: {1: "♘", 2: "♙", 7: "♟", 8: "♞"}, 3: {1: "♗", 2: "♙", 7: "♟", 8: "♝"}, 4: {1: "♕", 2: "♙", 7: "♟", 8: "♛"}, 5: {1: "♔", 2: "♙", 7: "♟", 8: "♚"}, 6: {1: "♗", 2: "♙", 7: "♟", 8: "♝"}, 7: {1: "♘", 2: "♙", 7: "♟", 8: "♞"}, 8: {1: "♖", 2: "♙", 7: "♟", 8: "♜"}};
804+
// let's try pawns only!
805+
gameState = gameState || {1: {2: "♙", 7: "♟"}, 2: {2: "♙", 7: "♟"}, 3: {2: "♙", 7: "♟"}, 4: {2: "♙", 7: "♟"}, 5: {1: "♔", 2: "♙", 7: "♟", 8: "♚"}, 6: {2: "♙", 7: "♟"}, 7: {2: "♙", 7: "♟"}, 8: {2: "♙", 7: "♟"}};
804806
$.each(field, function (columnIndex, column) {
805807
$.each(column, function (rowIndex, fld) {
806808
if (gameState[columnIndex] && gameState[columnIndex][rowIndex]) {
@@ -1525,4 +1527,4 @@ controller = (function () {
15251527
}
15261528
}
15271529
};
1528-
}());
1530+
}());

0 commit comments

Comments
 (0)