Questions tagged [chessboard.js]

Chessboard.js is a standalone JavaScript Chess Board by Chris Oakman available under MIT license. It is designed to be "just a board" and expose a powerful API.

Chessboard.js is a standalone JavaScript Chess Board by Chris Oakman.

Following information copied from chessboard.js readme

chessboard.js is a standalone JavaScript Chess Board. It is designed to be "just a board" and expose a powerful API so that it can be used in different ways. Here's a non-exhaustive list of things you can do with chessboard.js:

  • Use chessboard.js to show game positions alongside your expert commentary.
  • Use chessboard.js to have a tactics website where users have to guess the best move.
  • Integrate chessboard.js and chess.js with a PGN database and allow people to search and playback games (see Example 5000)
  • Build a chess server and have users play their games out using the chessboard.js board.

Home - http://chessboardjs.com/

Git - https://github.com/oakmac/chessboardjs

License: chessboard.js is released under the MIT License

78 questions
12
votes
4 answers

Converting a PGN to a list of FEN strings in nodejs (chess notations)

I'm building a chess-related application using nodejs. I've been trying to use chess.js as much as I can but I think I've hit a roadblock in terms of functionality. Before extending that functionality, I wanted to make sure that there wasn't another…
user623990
10
votes
1 answer

How do I use chessboard.js , a javascript chessboard?

I am attempting to use a javascript chessboard here: http://chessboardjs.com/ . Unfortunately, I don't know javascript or CSS, and am rusty in HTML, so I don't understand the documentation, even though this seems to be a standard javascript…
kdog
  • 1,583
  • 16
  • 28
8
votes
2 answers

How to use Chessboard.js with Reactjs?

I've been looking a bit at chessboardjs (https://chessboardjs.com/) as a way to get some practice with some React coding. However, I haven't been able to get the simple example of just showing the board in my app working. the documentation says to…
user3231247
  • 123
  • 1
  • 7
5
votes
3 answers

chessboard.js can't play a game with a set position

When I use the example 'only allow legal moves http://chessboardjs.com/examples#5000, I can move the white and black pieces. When I want to set a fen string in the config, replacing position: 'start' by position:…
4
votes
1 answer

How To Change the turn in chessboard.js?

I am working in chessboard.js for creating a multyplayer chessboard using signalR. but i am having a problem in player movement. what i am doing is sending the FEN string from client1 to client2.and Thus client2 represent that FEN string on…
user3928524
4
votes
2 answers

how to undo and redo chess moves using chessboard.js for analyze mode

I am using the chess.js and chessboard.js for my chess a project. I just want to implement the undo and redo functionality of chess moves. I am creating "Move Recorder" for chess moves using chessboard.js, through which users can undo and redo…
user3767878
  • 189
  • 2
  • 5
3
votes
1 answer

Is it possible to take a FEN aka forsyth-edward notation and flip it from black to play and win to white

Lets say we have a chess fen and the fen is a black to play and win problem. Many times chess puzzle websites want to avoid the confusion of having to keep indicating who's turn it is to move so they rather just put all the puzzles as white to play…
3
votes
0 answers

how i give the square size of the chessboard for calibration?

I am using python 3 and opencv3.6 and i am performing a stereo camera calibration using a chessboard. I was asking me, there is a moment where i have to give the square size? I checked the opencv tutorial but it wasn't very clear. I would like a…
3
votes
2 answers

Trying to build a webpage in Django that displays a chessboard using chessboard.js

I'm trying to build a chess website in Django. Right now I'm just trying to get a page that displays a chessboard using the chessboard.js Javascript library, whose directory structure is: chessboard -css -js -img It seems that typically, in order to…
Vik78
  • 305
  • 1
  • 2
  • 14
2
votes
1 answer

chessboard.js board image is not showing up in browser

I am trying to build a very simple webapp with Flask to play chess against my python chess engines. However, I am new to javascript, html and css and I cannot get the chessboard.js board image to show up in my browser. Here is my html body code…
Tim
  • 81
  • 8
2
votes
1 answer

Drawing a dynamic custom view chess board in Android

I would like to draw an 8 by 8 chess board dynamically in android studio using the canvas and by overriding method onDraw, I almost have succeeded but I am running into a very annoying problem. I already made a custom view, my goal is to make the…
Coder992
  • 248
  • 3
  • 11
2
votes
0 answers

ChessboardJS how to click to pick up and click again to drop off without the need to drag

I'm making some training tools using chessJS and chessboardJS currently I can only drag the piece from the source destination to the landing spot. ( if its not a legal move I have integrated the ChessboardJS code snippet that makes the piece snap…
2
votes
1 answer

Chessboardjs NPM package, not showing images

I am trying to use https://www.npmjs.com/package/chessboardjs package with meteor 1.13. I wrote simple react component to render the board, but it doesn't render images for some reason. The compoent code: import React from 'react' import ChessBoard…
Vincas Stonys
  • 1,125
  • 14
  • 26
2
votes
2 answers

How to carry out promotion (piece replacement )in chessboard.js

I have my own pgn parser which supports n parallel variation and nested variation. I have written a wrapper to use chessboard.js with it. I am facing two issues Removing pawn after en passant move. changing piece after pawn promotion. These two…
amar
  • 4,285
  • 8
  • 40
  • 52
2
votes
1 answer

Integrate chessbord.js with Flask

I'm working with Flask and I'm having problems using chessboard.js with it. My static folder is something like this: /static/ /css/ /img/ /js where I put the files for chessboard.js. My template: {% extends…
Flavio Barros
  • 996
  • 1
  • 11
  • 29
1
2 3 4 5 6