GithubHelp home page GithubHelp logo

labinatorsolutions / stockfish-chess-web-gui Goto Github PK

View Code? Open in Web Editor NEW
48.0 4.0 37.0 36.98 MB

Responsive chess web GUI to play against the Stockfish 16 chess engine. Multiple web GUI implementations have also been included.

Home Page: https://labinatorsolutions.github.io/stockfish-chess-web-gui/

License: GNU Affero General Public License v3.0

CSS 9.54% HTML 11.52% JavaScript 78.94%
chess web-gui web-app stockfish stockfish-engine chess-game chess-board chessboard chess-engine chess-engine-gui

stockfish-chess-web-gui's Issues

History not changing well in mobile

History not changing well in mobile. When I try to click in history, the history play doesn't appears well in Mobile. In Desktop it's working well. I recomment this.

In file js/board-init.js, line 62, comment loadBoard:

$('#game-turns-history li span').off().click(function() {
var turnN = parseInt($(this).attr('turn'));
console.log('History: show turn ' + $(this).attr('turn'));
moves = JSON.parse(localStorage.getItem('boardHistory'));
console.log(moves[turnN-1]);
//loadBoard(moves[turnN-1], true);
});

The takeback button does not work after checkmate, stalemate or draw

Taking back a move after a checkmate, stalemate, or a draw is important for absolute beginners since sometimes their game ends without having the ability to "takeback" and change its outcome.

The takeback button after the game ends would only navigate you to the past move rather than actually allowing you to play a different one. A player should be allowed to fully takeback a move to play another one even the game has ended.

Let change of level to Mobile players

Hello, another proposed change. But as I have already openned a pull request, I recommend you to do it in a clean master branch, since the other changes are not accepted yet.

The change is in file js/board-actions-mobile.js line 51:

Add this line, before setTimeout:
updateEngineSkill();

It is to let change of level to Mobile players.

The engine toggle off/on require one extra move before it works again after deactivation

The engine toggle off/on feature allows the player to turn the Stockfish engine on or off depending on his desire. However, after turning the engine off, then on again, the player still needs to play one extra move before the engine can play again regardless of which turn it is.

Despite the label, this is more of an enhancement feature than a bug report.

Cannot start game as Black on touch devices

The user can not start a new game with the black pieces if he/she is on touch devices (tablets and smartphones). The only way for the computer to play as White is if the user has clicked the "Switch Sides" button.

The chess pieces are not moving on touch devices (tablets and smartphones)

@LabinatorSolutions
Hi, I have found solution for the issue.
In the file "chessboard-caustique-min.js", search $(this).context.id, it is trying to get the id of the clicked piece.
It is using "context" but context is depreciated in JQuery version 3.0 and onward.
See https://api.jquery.com/context/
So now it's not able to get id of the clicked piece.
Solution is that simply replace $(this).context.id with this.id or $(this).attr("id")
I am new to GitHub. Please someone update the chessboard-caustique-min.js as i suggested.

Please note that this is a library by https://github.com/caustique/chessboard-js
It would be great if someone fix the bug there also.

The take back button blinks

The take back button blinks when the user moves to any position of any figure.

it is just a second but in my opinion it distract user from game. On the other hand user get attention on the button fast. I think it is not the bug, but it is designed to do this by giving user the information. for instance it cannot undo a move while the computer is making a move. I suggest to disable this blinking . If user click to player vs player option it has no purpose.

category: usability issue

Steps to reproduce:

  1. Open hosted "Web GUI For Stockfish Chess" app
  2. Move any figure in any direction
  3. Click the Engine toggle button ( switch "player" option )
  4. Move any figure in any direction
  5. Click the "take back" button

The "Take back" button background is still disabled after move any figure

I caught one visual bug. I haven't attached any photo, but I record the steps to reproduce the error.

category: visual issue

severity: low

Steps to reproduce:

  1. Open hosted "Web GUI For Stockfish Chess" app
  2. Click the Engine toggle button ( switch "player" option )
  3. Move any figure in any direction
  4. Click the "take back" button

Actual result:

The "Take back" button background is still disabled after moving any figure. The user has switched the engine toggle button to "player" ( off setting). If user click the "Take back" he can still undo any move.

Expected result:

When user click to move any figure the take out button change background from off (dark grey) to on (light grey)

Bug reproduced on Chrome and Edge browser

Ability to toggle the engine off/on so you can move for both sides

A feature to turn on and off the chess engine would be helpful for many reasons.

  1. It would allow two players to play together on the same device.
  2. It would allow the player to move the pieces for both sides, analyze the board, then toggle the engine when required.

Add a visual evaluation meter

A great addition to this web GUI would be a visual responsive evaluation meter to show the player what is the engine's evaluation of the current position. An example of such an evaluation meter can be found in the second example of the "other-implementations" folder of this repository.

The checkmate message does not get displayed if you win a match on touch-based device

If you win a match with White or Black on a touch-based device, the checkmate message does not get displayed but instead, you get only a "check" message. The engine though stops analyzing and you would be able to read the message if you "switch" the board.

How to test or replicate this bug?

  • Open the GUI using any touch-based device like your smartphone or tablet.
  • Tune the engine against level 1 to win easily. If you are a chess beginner, use the "hint" button as much as you can to win. Another faster way would be to tune the engine at the hardest level, make yourself lose fast then "switch" the board before checkmate so that you can deliver it yourself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.