stockfish-chess-web-gui icon indicating copy to clipboard operation
stockfish-chess-web-gui copied to clipboard

Resolving issues with historical and AI to Player

Open rockcesar opened this issue 3 years ago • 6 comments

Deleting the functionality of load the board when click on historical. Only commenting the lines. Issue: https://github.com/LabinatorSolutions/stockfish-chess-web-gui/issues/23

Deleting the functionality of toggle from AI to Player. Only commenting the lines. Issue: https://github.com/LabinatorSolutions/stockfish-chess-web-gui/issues/24

rockcesar avatar Jul 10 '21 13:07 rockcesar

It would be ideal if we can resolve the issue instead of deleting the functionality. We can not delete the functionality without checking first if there are ways to keep the features while addressing the bug.

LabinatorSolutions avatar Jul 11 '21 11:07 LabinatorSolutions

Both functionalities are working in Desktop, but Mobile view isn't working completed.

By now, that's my solution: https://github.com/LabinatorSolutions/stockfish-chess-web-gui/issues/23

rockcesar avatar Jul 11 '21 11:07 rockcesar

With this pull request, I disable both functionalities for Mobile and Desktop. To enable it, we should redefine these libs called in index.html, for mobile:

    `if (isMobile == true) {

        var chess, board;

        loadCss('chessboard-css', 'css/caustique-chessboard.css');

        $.getScript('js/chessboard-caustique-min.js', initGameBoard('mobile'));
        $.getScript('js/board-controls-side.js', initGameBoard('mobile'));
        $.getScript('js/board-controls-bottom.js', initGameBoard('mobile'));
        $.getScript('js/board-sets.js', initGameBoard('mobile'));

        $.getScript('js/board-time.js', initGameBoard('mobile'));
        $.getScript('js/board-actions.js', initGameBoard('mobile'));
        $.getScript('js/board-actions-mobile.js', initGameBoard('mobile'));
        $.getScript('js/board-init.js', initGameBoard('mobile'));

    } else {

        loadCss('chessboard-css', 'css/chessboard.css');

        $.getScript('js/chessboard.min.js', initGameBoard('desktop'));
        $.getScript('js/board-controls-side.js', initGameBoard('desktop'));
        $.getScript('js/board-controls-bottom.js', initGameBoard('desktop'));
        $.getScript('js/board-sets.js', initGameBoard('desktop'));

        $.getScript('js/board-time.js', initGameBoard('desktop'));
        $.getScript('js/board-actions.js', initGameBoard('desktop'));
        $.getScript('js/board-actions-desktop.js', initGameBoard('desktop'));
        $.getScript('js/board-init.js', initGameBoard('desktop'));

    }`

rockcesar avatar Jul 11 '21 11:07 rockcesar

I guess the problem is directly this js/board-actions-mobile.js, but it requires more effort for development, because it's redefine almost all mobile actions, that is not completed.

rockcesar avatar Jul 11 '21 11:07 rockcesar

My two options are do the effort to redefine Mobile or disable those options for playing, by now. Inmediately, I can help disabling it. But I understand it should be working.

rockcesar avatar Jul 11 '21 11:07 rockcesar

Thank you for explaining the bug and suggesting possible solutions. We will keep this issue open until we get time to review this issue more thoroughly. At this point in time, we won't merge it with the main branch since we need to evaluate some possible solutions before removing the feature. All in all, thank you for your contribution.

LabinatorSolutions avatar Jul 12 '21 05:07 LabinatorSolutions