Comments (3)
You are right, there is no API to do something like that. I checked the API again, at the moment, you can only do manual moves from one position to the next.
So let me write down the requirement: The user should be able to jump to any position in the game denoted by the move number. The move number is denoted by the array index of the half moves done. In the game e4 e5 Nf3 Nc6
the move numbers are: 1 e4 2 e5 3 Nf3 4 Nc6
.
What about variants? We cannot say which move number will be which move in which variant (at least not so simple). For the moment, this would only work for the main line.
from pgn-viewer.
There is a similar functionality already implemented, see #171 The ideas from that implementation could be moved.
Requirements would be:
- This works only to repeat moves already done.
- The moves are the moves of the main line (only). Later on, we may find a way to address moves from the variant (like in the 5th move, the 1st variant, the 3rd move == 5.v1.3. Too complicated at the moment.
- The moves are counted from 0 onward, so the moves of the notation
1. e4 e5 2. Nf3 Nc6
will be:0 e4 1 e5 2 Nf3 3 Nc6
.
from pgn-viewer.
Did a quick hack, there are many things missing (yet). But demonstrates that jumping to a move is not a big deal ..
from pgn-viewer.
Related Issues (20)
- Wrong notation same-line-rooks related to #436 HOT 1
- Player name and coordinates overlap HOT 4
- PGN crashes viewer HOT 9
- Add badges to all READMEs HOT 3
- getGame(index) and getGames() not returning the real games pgn HOT 5
- Switching between games in a multigame PGN does not work HOT 4
- Display the PGN viewer on a responsive website HOT 3
- Make a PGN move given a FEN string HOT 1
- Split repository into pgn-reader (new one) and pgn-viewer (existing one)
- Unable to `npm install` on Windows OS HOT 7
- Define what has to be done on a release HOT 1
- Ugly display of many games
- Correct HTML warnings/errors on docs html files
- ManyMany games example results in error
- pgnPuzzle not playing the whole line HOT 4
- Have a dark mode for the viewer
- Latest version 1.6.7 does not seem to work in React HOT 4
- Switch to typesafe-i18n library
- Switch from webpack to rollup
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgn-viewer.