-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Javascript issues #54
Comments
The elements of new position has the following property names : |
The following events are added: // mouse enter / leave square |
If opponent wrong move click a different button! |
The first piece marked bN |
The following calls in chessboard.js: and a new function to check available positions for an opponent piece. At present it also highlights player's pieces. |
Touches a piece on the board: start ready! with piece pp oldpos p newpos p chessboard.js:360 n.fn.init [div#board2, context: div#board2] chessboard.js:396 checkDeps: ChessBoard ok with container chessboard.js:397 n.fn.init [div#board2, context: div#board2] chessboard.js:570 buildBoardContainer: chessboard.js:1772 initDom playerMove y chessboard.js:1776 initDom sparepieces set xxx chessboard.js:1779 initDom playermove set chessboard.js:1795 initDom draws the board chessboard.js:996 Inside drawboard chessboard.js:1761 Events added on chessboard.js:1762 n.fn.init [div.board-b72b1, prevObject: n.fn.init(1), context: div#board2, selector: '.board-b72b1'] chessboard.js:1806 checkOpponentpiece(), opponentMove is true chessboard.js:1808 checkOpponentpiece() There is no move from opponent pp chessboard.js:1810 The available moves are xx chessboard.js:1833 The window document [object HTMLDocument] chessboard.js:1835 The widget: clear,destroy,fen,flip,move,orientation,position,resize,start (index):262 start chessboard now rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR (index):287 {clear: ƒ, destroy: ƒ, fen: ƒ, flip: ƒ, move: ƒ, …} (index):288 end ready!!! favicon.ico:1
Event functions: Etter form submit: start ready! with piece bN oldpos p newpos p chessboard.js:360 n.fn.init [div#board2, context: div#board2] chessboard.js:396 checkDeps: ChessBoard ok with container chessboard.js:397 n.fn.init [div#board2, context: div#board2] chessboard.js:570 buildBoardContainer: chessboard.js:1772 initDom playerMove y chessboard.js:1776 initDom sparepieces set xxx chessboard.js:1782 initDom playermove not set chessboard.js:1795 initDom draws the board chessboard.js:996 Inside drawboard chessboard.js:1736 Add player move chessboard.js:1761 Events added on chessboard.js:1762 n.fn.init [div.board-b72b1, prevObject: n.fn.init(1), context: div#board2, selector: '.board-b72b1'] chessboard.js:1806 checkOpponentpiece(), opponentMove is true chessboard.js:1808 checkOpponentpiece() There is no move from opponent bN chessboard.js:1810 The available moves are yy chessboard.js:1833 The window document [object HTMLDocument] chessboard.js:1835 The widget: clear,destroy,fen,flip,move,orientation,position,resize,start ?method=PUT:262 start chessboard now rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR ?method=PUT:270 Player has made a move! ?method=PUT:275 Tegnet brettet på nytt ?method=PUT:287 {clear: ƒ, destroy: ƒ, fen: ƒ, flip: ƒ, move: ƒ, …} ?method=PUT:288 end ready!!! Output from RapporterChessStartServerResourceHTML: posisjon=b8 Piece name: |
The console log after opponent move:
ChessBoardstopDraggedPiece cfg ondrop true type function
chessboard.js:1285 ChessBoard tester d7 og true og d5 og true
chessboard.js:1292 ChessBoard brikke flyttet på brettet bP
?method=PUT:175 The onDrop function
chessboard.js:1300 Result is none bP new position [object Object] old position [object Object] orientation white
chessboard.js:1314 ChessBoard brikke på brettet bP
newPosition is result of call to deepCopy.
The deepCopy function:
return JSON.parse(JSON.stringify(thing));
See example:
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_parse_json
The text was updated successfully, but these errors were encountered: