Giter Site home page Giter Site logo

Comments (5)

mliebelt avatar mliebelt commented on July 29, 2024

I will try to reproduce your problem in an example, and then try to find the reason for it. FEN has the information which color has to move, I don't remember, if I have used that information.

from pgn-viewer.

calvicius avatar calvicius commented on July 29, 2024

thanks for your interest.
I think to remember that chessboardjs didn't ocupate about the sides to play and castles, so it only treats (i believe it) with fen shorted like "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR" type, nor about w or b, nor KQkq. The real FEN is treated by chess.js

I detail below a short code made for my own use in wich var game : new Chess() receives a FEN from an input form, and then it will be treated for emscripten stockfish :
regards y thanks in advance.

pd: the system does not permit me to paste the original code - if you are interested, please tell me ando sure I will send it.

from pgn-viewer.

mliebelt avatar mliebelt commented on July 29, 2024

I have reproduced your problem, but I have no fix yet. I have added the gist https://gist.github.com/mliebelt/139d3cdff816160e1e0c that contains two examples that should both work, one with only viewing games, the other for editing games. As you can see there, starting not from the initial position is currently not supported at all, but should be. It is possible to create a board (pgnBoard) with a different position, and this works equally well with setting up pgnView and pgnEdit. However, making moves not from the initial position (where white should start) is not supported. So I have to fix that first ...

from pgn-viewer.

mliebelt avatar mliebelt commented on July 29, 2024

See the example as part of the documentation how to use it. When you hover withe the mouse over the black pieces, you see that only the black pieces are allowed to move here.

from pgn-viewer.

mliebelt avatar mliebelt commented on July 29, 2024

Seems to be a bug again, have to have a look, what the problem is. The symptom is the following:

  • Have a FEN string with black to move.
  • Use edit mode.
  • Then you are able to play the defined moves, but are not able to start new ones.

from pgn-viewer.

Related Issues (20)

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.