chesslablab / spablab Goto Github PK
View Code? Open in Web Editor NEWA single-page app (SPA) to learn and play chess online.
License: MIT License
A single-page app (SPA) to learn and play chess online.
License: MIT License
This will allow a chess instructor to send an invitation token to a student to play a game of chess.
At this moment, nothing is displayed after clicking on the Play button, which is a little confusing for the user sending the invite.
Figure 1. Invite a friend to play
Figure 2. This is the screen displayed after clicking on the Play button
However, an informative message should be displayed:
At this moment, redux-chess
can only be tested if a chess server is running on localhost. For further information on testing the package, please visit:
This new functionality should be similar to Lichess's Board editor.
The new method is intended to convert a FEN string into its ASCII representation counterpart.
The chessboard gets displayed on Chrome but the following ones will throw an error instead:
×
TypeError: b is undefined
compose/</<
node_modules/redux/es/redux.js:621
618 |
619 | return funcs.reduce(function (a, b) {
620 | return function () {
> 621 | return a(b.apply(void 0, arguments));
622 | };
623 | });
624 | }
createStore
http://localhost:3000/static/js/vendors~main.chunk.js:39696:12
39693 | throw new Error( false ? undefined : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'");
39694 | }
39695 |
> 39696 | return enhancer(createStore)(reducer, preloadedState);
| ^ 39697 | }
39698 |
39699 | if (typeof reducer !== 'function') {
./node_modules/redux-chess/dist/store.js
node_modules/redux-chess/dist/store.js:19
16 |
17 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18 |
> 19 | var store = (0, _redux.createStore)(_rootReducer2.default, (0, _redux.compose)((0, _redux.applyMiddleware)(_reduxThunk2.default), window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()));
20 |
21 | // const store = createStore(rootReducer, applyMiddleware(thunk));
22 |
__webpack_require__
/home/standard/projects/testing-redux-chess/webpack/bootstrap:851
848 |
849 | __webpack_require__.$Refresh$.init();
850 | try {
> 851 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
| ^ 852 | } finally {
853 | __webpack_require__.$Refresh$.cleanup(moduleId);
854 | }
fn
/home/standard/projects/testing-redux-chess/webpack/bootstrap:150
147 | );
148 | hotCurrentParents = [];
149 | }
> 150 | return __webpack_require__(request);
| ^ 151 | };
152 | var ObjectFactory = function ObjectFactory(name) {
153 | return {
./node_modules/redux-chess/dist/components/Chess.js
node_modules/redux-chess/dist/components/Chess.js:13
__webpack_require__
/home/standard/projects/testing-redux-chess/webpack/bootstrap:851
848 |
849 | __webpack_require__.$Refresh$.init();
850 | try {
> 851 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
| ^ 852 | } finally {
853 | __webpack_require__.$Refresh$.cleanup(moduleId);
854 | }
fn
/home/standard/projects/testing-redux-chess/webpack/bootstrap:150
147 | );
148 | hotCurrentParents = [];
149 | }
> 150 | return __webpack_require__(request);
| ^ 151 | };
152 | var ObjectFactory = function ObjectFactory(name) {
153 | return {
./node_modules/redux-chess/dist/index.js
node_modules/redux-chess/dist/index.js:8
__webpack_require__
/home/standard/projects/testing-redux-chess/webpack/bootstrap:851
848 |
849 | __webpack_require__.$Refresh$.init();
850 | try {
> 851 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
| ^ 852 | } finally {
853 | __webpack_require__.$Refresh$.cleanup(moduleId);
854 | }
fn
/home/standard/projects/testing-redux-chess/webpack/bootstrap:150
147 | );
148 | hotCurrentParents = [];
149 | }
> 150 | return __webpack_require__(request);
| ^ 151 | };
152 | var ObjectFactory = function ObjectFactory(name) {
153 | return {
__webpack_require__
/home/standard/projects/testing-redux-chess/webpack/bootstrap:851
848 |
849 | __webpack_require__.$Refresh$.init();
850 | try {
> 851 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
| ^ 852 | } finally {
853 | __webpack_require__.$Refresh$.cleanup(moduleId);
854 | }
fn
/home/standard/projects/testing-redux-chess/webpack/bootstrap:150
147 | );
148 | hotCurrentParents = [];
149 | }
> 150 | return __webpack_require__(request);
| ^ 151 | };
152 | var ObjectFactory = function ObjectFactory(name) {
153 | return {
1
http://localhost:3000/static/js/main.chunk.js:127:18
__webpack_require__
/home/standard/projects/testing-redux-chess/webpack/bootstrap:851
848 |
849 | __webpack_require__.$Refresh$.init();
850 | try {
> 851 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
| ^ 852 | } finally {
853 | __webpack_require__.$Refresh$.cleanup(moduleId);
854 | }
checkDeferredModules
/home/standard/projects/testing-redux-chess/webpack/bootstrap:45
42 | }
43 | if(fulfilled) {
44 | deferredModules.splice(i--, 1);
> 45 | result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
| ^ 46 | }
47 | }
48 |
webpackJsonpCallback
/home/standard/projects/testing-redux-chess/webpack/bootstrap:32
29 | deferredModules.push.apply(deferredModules, executeModules || []);
30 |
31 | // run deferred modules when all chunks ready
> 32 | return checkDeferredModules();
| ^ 33 | };
34 | function checkDeferredModules() {
35 | var result;
(anonymous function)
http://localhost:3000/static/js/main.chunk.js:1:91
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error. Click the 'X' or hit ESC to dismiss this message.
The start time should be read from state.mode.playfriend.jwt_decoded.min
and displayed once the invitation has been accepted.
A new button group is intended to provide functionality such as 'Flip board', 'Download PGN' as well as a few more impressive features, so the SecondaryButtons component was added to the Chess component.
Probably a Material-UI Grid should be used now to create this layout.
The chessboard should connect to the server automatically after loading.
Instead, display the 'Connect' button if the connection is lost -- or alternatively display an informative message asking the user to reload the page.
There's a bug that prevents a knight from moving to a square when the two knights can occupy that same square, as it is shown in the example attached.
This bug will require some fine tuning on the server. See chesslablab/php-chess#20
Add some necessary options to the 'Invite a friend' dialog such as color and time, and send a request to the chess server accordingly to display the invitation link.
The prot
property should be added to the props
of the Chess
component as shown in the examples below.
ws
protocol:
import React from 'react';
import ReactDOM from 'react-dom';
import { Chess } from 'redux-chess';
const props = {
server: {
prot: 'ws',
host: '127.0.0.1',
port: '8080'
}
};
ReactDOM.render(
<Chess props={props} />,
document.getElementById('redux-chess')
);
wss
protocol:
import React from 'react';
import ReactDOM from 'react-dom';
import { Chess } from 'redux-chess';
const props = {
server: {
prot: 'wss',
host: 'pchess.net',
port: '8443'
}
};
ReactDOM.render(
<Chess props={props} />,
document.getElementById('redux-chess')
);
At this moment the chessboard squares can be clicked when browsing the history, which seems quite confusing.
Also, the chessboard should be styled accordingly with CSS.
When clicking the button, a popup should be displayed showing the user a link to be shared with a friend.
For further information please visit:
At this moment the demo is not being displayed properly on mobile devices.
At this moment a timer is just being displayed, however it should also be synced.
After all it won't make a lot of sense to use this chessboard with no chess server.
if
statements like these ones should be removed:
if (props.server) {
...
}
Atm the browser is not storing the JWT token, so no session management is actually being used.
So for example, until now time has been hard-coded throughout the entire app as shown in the following WebSocket message listener.
export const onPlayfriend = (data) => dispatch => {
dispatch({
type: createInvitationDialogActionTypes.CREATE_CODE,
payload: {
color: data['/start'].color,
time: 10, // TODO
code: data['/start'].hash
}
});
};
Session tokens should be reviewed.
Now that a sandbox chess server has been setup for testing purposes, it seems as if the WebSocket connections should be secured in order for this demo to run without security issues.
Chrome:
Mixed Content: The page at 'https://programarivm.com/demo-redux-chess/' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://3.121.169.246:8080/'. This request has been blocked; this endpoint must be available over WSS.
Firefox:
Uncaught (in promise) DOMException: The operation is insecure.
Also, a simple test should be written and run in order to test the framework set up.
For further information please visit:
Even though the test pass in __tests__/components/Chess.test.js
, the following warnings are displayed when running npm test
PASS src/__tests__/utils/Ascii.test.js
PASS src/__tests__/utils/Piece.test.js
PASS src/__tests__/components/Chess.test.js
● Console
console.error
Warning: Failed prop type: Invalid prop `variant` of value `text` supplied to `ForwardRef(Menu)`, expected one of ["menu","selectedMenu"].
at Menu (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Menu/Menu.js:67:32)
at WithStyles(ForwardRef(Menu)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at div
at ButtonGroup (/home/standard/projects/redux-chess/node_modules/@material-ui/core/ButtonGroup/ButtonGroup.js:207:24)
at WithStyles(ForwardRef(ButtonGroup)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at Settings (/home/standard/projects/redux-chess/src/components/Buttons.js:14:20)
at Provider (/home/standard/projects/redux-chess/node_modules/react-redux/lib/components/Provider.js:21:20)
at Chess (/home/standard/projects/redux-chess/src/components/Chess.js:12:17)
at WrapperComponent (/home/standard/projects/redux-chess/node_modules/enzyme-adapter-utils/src/createMountWrapper.jsx:49:26)
at printWarning (node_modules/react/cjs/react.development.js:220:30)
at error (node_modules/react/cjs/react.development.js:196:5)
at checkPropTypes (node_modules/react/cjs/react.development.js:1935:11)
at validatePropTypes (node_modules/react/cjs/react.development.js:2136:7)
at Object.createElementWithValidation [as createElement] (node_modules/react/cjs/react.development.js:2240:5)
at WithStyles(ForwardRef(Menu)) (node_modules/@material-ui/styles/withStyles/withStyles.js:97:42)
at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:14985:18)
at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:17044:20)
console.error
Warning: Failed prop type: Invalid prop `variant` of value `text` supplied to `ForwardRef(MenuList)`, expected one of ["menu","selectedMenu"].
at MenuList (/home/standard/projects/redux-chess/node_modules/@material-ui/core/MenuList/MenuList.js:117:23)
at Menu (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Menu/Menu.js:67:32)
at WithStyles(ForwardRef(Menu)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at div
at ButtonGroup (/home/standard/projects/redux-chess/node_modules/@material-ui/core/ButtonGroup/ButtonGroup.js:207:24)
at WithStyles(ForwardRef(ButtonGroup)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at Settings (/home/standard/projects/redux-chess/src/components/Buttons.js:14:20)
at Provider (/home/standard/projects/redux-chess/node_modules/react-redux/lib/components/Provider.js:21:20)
at Chess (/home/standard/projects/redux-chess/src/components/Chess.js:12:17)
at WrapperComponent (/home/standard/projects/redux-chess/node_modules/enzyme-adapter-utils/src/createMountWrapper.jsx:49:26)
at printWarning (node_modules/react/cjs/react.development.js:220:30)
at error (node_modules/react/cjs/react.development.js:196:5)
at checkPropTypes (node_modules/react/cjs/react.development.js:1935:11)
at validatePropTypes (node_modules/react/cjs/react.development.js:2136:7)
at Object.createElementWithValidation [as createElement] (node_modules/react/cjs/react.development.js:2240:5)
at Menu (node_modules/@material-ui/core/Menu/Menu.js:182:33)
at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:14985:18)
at updateForwardRef (node_modules/react-dom/cjs/react-dom.development.js:17044:20)
console.error
Warning: Invalid DOM property `tabindex`. Did you mean `tabIndex`?
at span
at div
at div
at div
at div
at Board (/home/standard/projects/redux-chess/src/components/Board.js:13:17)
at Provider (/home/standard/projects/redux-chess/node_modules/react-redux/lib/components/Provider.js:21:20)
at Chess (/home/standard/projects/redux-chess/src/components/Chess.js:12:17)
at WrapperComponent (/home/standard/projects/redux-chess/node_modules/enzyme-adapter-utils/src/createMountWrapper.jsx:49:26)
at printWarning (node_modules/react-dom/cjs/react-dom.development.js:67:30)
at error (node_modules/react-dom/cjs/react-dom.development.js:43:5)
at validateProperty$1 (node_modules/react-dom/cjs/react-dom.development.js:3505:9)
at warnUnknownProperties (node_modules/react-dom/cjs/react-dom.development.js:3559:21)
at validateProperties$2 (node_modules/react-dom/cjs/react-dom.development.js:3583:3)
at validatePropertiesInDevelopment (node_modules/react-dom/cjs/react-dom.development.js:8765:5)
at setInitialProperties (node_modules/react-dom/cjs/react-dom.development.js:9041:5)
at finalizeInitialChildren (node_modules/react-dom/cjs/react-dom.development.js:10201:3)
console.error
Warning: React does not recognize the `disableElevation` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `disableelevation` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
at div
at Portal (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Portal/Portal.js:39:24)
at Modal (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Modal/Modal.js:94:36)
at Popover (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Popover/Popover.js:118:22)
at WithStyles(ForwardRef(Popover)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at Menu (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Menu/Menu.js:67:32)
at WithStyles(ForwardRef(Menu)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at div
at ButtonGroup (/home/standard/projects/redux-chess/node_modules/@material-ui/core/ButtonGroup/ButtonGroup.js:207:24)
at WithStyles(ForwardRef(ButtonGroup)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at Settings (/home/standard/projects/redux-chess/src/components/Buttons.js:14:20)
at Provider (/home/standard/projects/redux-chess/node_modules/react-redux/lib/components/Provider.js:21:20)
at Chess (/home/standard/projects/redux-chess/src/components/Chess.js:12:17)
at WrapperComponent (/home/standard/projects/redux-chess/node_modules/enzyme-adapter-utils/src/createMountWrapper.jsx:49:26)
at printWarning (node_modules/react-dom/cjs/react-dom.development.js:67:30)
at error (node_modules/react-dom/cjs/react-dom.development.js:43:5)
at validateProperty$1 (node_modules/react-dom/cjs/react-dom.development.js:3513:7)
at warnUnknownProperties (node_modules/react-dom/cjs/react-dom.development.js:3559:21)
at validateProperties$2 (node_modules/react-dom/cjs/react-dom.development.js:3583:3)
at validatePropertiesInDevelopment (node_modules/react-dom/cjs/react-dom.development.js:8765:5)
at setInitialProperties (node_modules/react-dom/cjs/react-dom.development.js:9041:5)
at finalizeInitialChildren (node_modules/react-dom/cjs/react-dom.development.js:10201:3)
console.error
Warning: React does not recognize the `disableFocusRipple` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `disablefocusripple` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
at div
at Portal (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Portal/Portal.js:39:24)
at Modal (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Modal/Modal.js:94:36)
at Popover (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Popover/Popover.js:118:22)
at WithStyles(ForwardRef(Popover)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at Menu (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Menu/Menu.js:67:32)
at WithStyles(ForwardRef(Menu)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at div
at ButtonGroup (/home/standard/projects/redux-chess/node_modules/@material-ui/core/ButtonGroup/ButtonGroup.js:207:24)
at WithStyles(ForwardRef(ButtonGroup)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at Settings (/home/standard/projects/redux-chess/src/components/Buttons.js:14:20)
at Provider (/home/standard/projects/redux-chess/node_modules/react-redux/lib/components/Provider.js:21:20)
at Chess (/home/standard/projects/redux-chess/src/components/Chess.js:12:17)
at WrapperComponent (/home/standard/projects/redux-chess/node_modules/enzyme-adapter-utils/src/createMountWrapper.jsx:49:26)
at printWarning (node_modules/react-dom/cjs/react-dom.development.js:67:30)
at error (node_modules/react-dom/cjs/react-dom.development.js:43:5)
at validateProperty$1 (node_modules/react-dom/cjs/react-dom.development.js:3513:7)
at warnUnknownProperties (node_modules/react-dom/cjs/react-dom.development.js:3559:21)
at validateProperties$2 (node_modules/react-dom/cjs/react-dom.development.js:3583:3)
at validatePropertiesInDevelopment (node_modules/react-dom/cjs/react-dom.development.js:8765:5)
at setInitialProperties (node_modules/react-dom/cjs/react-dom.development.js:9041:5)
at finalizeInitialChildren (node_modules/react-dom/cjs/react-dom.development.js:10201:3)
console.error
Warning: React does not recognize the `disableRipple` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `disableripple` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
at div
at Portal (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Portal/Portal.js:39:24)
at Modal (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Modal/Modal.js:94:36)
at Popover (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Popover/Popover.js:118:22)
at WithStyles(ForwardRef(Popover)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at Menu (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Menu/Menu.js:67:32)
at WithStyles(ForwardRef(Menu)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at div
at ButtonGroup (/home/standard/projects/redux-chess/node_modules/@material-ui/core/ButtonGroup/ButtonGroup.js:207:24)
at WithStyles(ForwardRef(ButtonGroup)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at Settings (/home/standard/projects/redux-chess/src/components/Buttons.js:14:20)
at Provider (/home/standard/projects/redux-chess/node_modules/react-redux/lib/components/Provider.js:21:20)
at Chess (/home/standard/projects/redux-chess/src/components/Chess.js:12:17)
at WrapperComponent (/home/standard/projects/redux-chess/node_modules/enzyme-adapter-utils/src/createMountWrapper.jsx:49:26)
at printWarning (node_modules/react-dom/cjs/react-dom.development.js:67:30)
at error (node_modules/react-dom/cjs/react-dom.development.js:43:5)
at validateProperty$1 (node_modules/react-dom/cjs/react-dom.development.js:3513:7)
at warnUnknownProperties (node_modules/react-dom/cjs/react-dom.development.js:3559:21)
at validateProperties$2 (node_modules/react-dom/cjs/react-dom.development.js:3583:3)
at validatePropertiesInDevelopment (node_modules/react-dom/cjs/react-dom.development.js:8765:5)
at setInitialProperties (node_modules/react-dom/cjs/react-dom.development.js:9041:5)
at finalizeInitialChildren (node_modules/react-dom/cjs/react-dom.development.js:10201:3)
console.error
Warning: React does not recognize the `fullWidth` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `fullwidth` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
at div
at Portal (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Portal/Portal.js:39:24)
at Modal (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Modal/Modal.js:94:36)
at Popover (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Popover/Popover.js:118:22)
at WithStyles(ForwardRef(Popover)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at Menu (/home/standard/projects/redux-chess/node_modules/@material-ui/core/Menu/Menu.js:67:32)
at WithStyles(ForwardRef(Menu)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at div
at ButtonGroup (/home/standard/projects/redux-chess/node_modules/@material-ui/core/ButtonGroup/ButtonGroup.js:207:24)
at WithStyles(ForwardRef(ButtonGroup)) (/home/standard/projects/redux-chess/node_modules/@material-ui/styles/withStyles/withStyles.js:67:31)
at Settings (/home/standard/projects/redux-chess/src/components/Buttons.js:14:20)
at Provider (/home/standard/projects/redux-chess/node_modules/react-redux/lib/components/Provider.js:21:20)
at Chess (/home/standard/projects/redux-chess/src/components/Chess.js:12:17)
at WrapperComponent (/home/standard/projects/redux-chess/node_modules/enzyme-adapter-utils/src/createMountWrapper.jsx:49:26)
at printWarning (node_modules/react-dom/cjs/react-dom.development.js:67:30)
at error (node_modules/react-dom/cjs/react-dom.development.js:43:5)
at validateProperty$1 (node_modules/react-dom/cjs/react-dom.development.js:3513:7)
at warnUnknownProperties (node_modules/react-dom/cjs/react-dom.development.js:3559:21)
at validateProperties$2 (node_modules/react-dom/cjs/react-dom.development.js:3583:3)
at validatePropertiesInDevelopment (node_modules/react-dom/cjs/react-dom.development.js:8765:5)
at setInitialProperties (node_modules/react-dom/cjs/react-dom.development.js:9041:5)
at finalizeInitialChildren (node_modules/react-dom/cjs/react-dom.development.js:10201:3)
Test Suites: 3 passed, 3 total
Tests: 20 passed, 20 total
Snapshots: 0 total
Time: 5.249 s
Ran all test suites.
Watch Usage: Press w to show more.
The existing WSS connection, if any, should be closed when selecting the Connect option from the Settings menu in order to open a new one. Please note that at this moment, a web browser can open multiple connections as it is shown in the example attached.
Here is how a storage/pchess.log
file would look like in the chess server when a browser is opening multiple connections.
...
[2021-07-30T09:23:48.140937+00:00] pchess.net.INFO: New connection {"id":309} []
[2021-07-30T09:23:48.314296+00:00] pchess.net.INFO: Sent message {"id":309,"res":{"/start":{"mode":"analysis"}}} []
[2021-07-30T09:23:50.282301+00:00] pchess.net.INFO: New connection {"id":313} []
[2021-07-30T09:23:50.442348+00:00] pchess.net.INFO: Sent message {"id":313,"res":{"/start":{"mode":"analysis"}}} []
[2021-07-30T09:24:58.076394+00:00] pchess.net.INFO: New connection {"id":317} []
[2021-07-30T09:24:58.267724+00:00] pchess.net.INFO: Sent message {"id":317,"res":{"/start":{"mode":"analysis"}}} []
[2021-07-30T09:24:59.943299+00:00] pchess.net.INFO: New connection {"id":321} []
[2021-07-30T09:25:00.107025+00:00] pchess.net.INFO: Sent message {"id":321,"res":{"/start":{"mode":"analysis"}}} []
[2021-07-30T09:25:01.498512+00:00] pchess.net.INFO: New connection {"id":325} []
[2021-07-30T09:25:01.660591+00:00] pchess.net.INFO: Sent message {"id":325,"res":{"/start":{"mode":"analysis"}}} []
[2021-07-30T09:25:02.934983+00:00] pchess.net.INFO: New connection {"id":329} []
[2021-07-30T09:25:03.093671+00:00] pchess.net.INFO: Sent message {"id":329,"res":{"/start":{"mode":"analysis"}}} []
[2021-07-30T09:25:44.930207+00:00] pchess.net.INFO: New connection {"id":333} []
[2021-07-30T09:25:45.118214+00:00] pchess.net.INFO: Sent message {"id":333,"res":{"/start":{"mode":"analysis"}}} []
[2021-07-30T09:25:46.847560+00:00] pchess.net.INFO: New connection {"id":337} []
[2021-07-30T09:25:47.009816+00:00] pchess.net.INFO: Sent message {"id":337,"res":{"/start":{"mode":"analysis"}}} []
[2021-07-30T09:26:00.435722+00:00] pchess.net.INFO: Closed connection {"id":325} []
[2021-07-30T09:26:00.436104+00:00] pchess.net.INFO: Closed connection {"id":317} []
[2021-07-30T09:26:00.436279+00:00] pchess.net.INFO: Closed connection {"id":329} []
[2021-07-30T09:26:00.436602+00:00] pchess.net.INFO: Closed connection {"id":333} []
[2021-07-30T09:26:00.436903+00:00] pchess.net.INFO: Closed connection {"id":153} []
[2021-07-30T09:26:00.437068+00:00] pchess.net.INFO: Closed connection {"id":321} []
[2021-07-30T09:26:00.437325+00:00] pchess.net.INFO: Closed connection {"id":337} []
At this moment a selected piece cannot be deselected, so players are forced to move the current piece that has been clicked on. Instead, players should be allowed to deselect the piece by clicking on it again.
After fixing this bug on the server, now all PGN moves look like disambiguated when displayed on the frontend, as it is shown in the image attached.
This would need some fine-tuning: 1.Ng1f3 Ng8f6 2.d3 d6 3.Nf3d2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.