Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analysis Board - Set moves with url parameter #11401

Open
labbeast89 opened this issue Aug 18, 2022 · 5 comments
Open

Analysis Board - Set moves with url parameter #11401

labbeast89 opened this issue Aug 18, 2022 · 5 comments

Comments

@labbeast89
Copy link

We can already define in the URL what is the

  • FEN
  • Side of the board
  • Color of the board
    And so on

It would be really handy to have a parameter moves (or line) as someone expressed on reddit:https://www.reddit.com/r/lichess/comments/kollls/is_it_possible_to_pass_a_pgn_line_to_lichess_via/

Let me know if this is possible!

Keep up the good work!

@labbeast89
Copy link
Author

@ornicar I saw your recent commit, can it be used with a FEN starting position? If so how? Thanks!

@brollin
Copy link
Collaborator

brollin commented Aug 18, 2022

This feels like a duplicate of #10205, so closing it for now. Feel free to comment/thumbs-up that issue.

As for how to use the current endpoint, you can do something like this:

https://lichess.org/analysis/pgn/1. e4 c5 2. Nf3 d6 3. d4 cxd4 4. Nxd4 Nf6

@brollin brollin closed this as completed Aug 18, 2022
@ornicar
Copy link
Collaborator

ornicar commented Aug 29, 2022

@ornicar I saw your recent commit, can it be used with a FEN starting position? If so how? Thanks!

https://lichess.org/analysis/4B3/2K5/3P4/2k5/8/7b/8/8_w_-_-_0_1

@labbeast89
Copy link
Author

labbeast89 commented Aug 29, 2022

@ornicar I saw your recent commit, can it be used with a FEN starting position? If so how? Thanks!

https://lichess.org/analysis/4B3/2K5/3P4/2k5/8/7b/8/8_w_-_-_0_1

I meant using both FEN and moves at the same time. Something like:

https://lichess.org/analysis/6k1/p5r1/8/3p1q2/2pP2P1/2P1PN2/PP4P1/R1BR2K1_b_-_-?pgn=1..._Qxg4_2._Rd2_Qxf3

So we use the following FEN as starting position:
6k1/p5r1/8/3p1q2/2pP2P1/2P1PN2/PP4P1/R1BR2K1

And the following pgn as moves:
1... Qxg4 2. Rd2 Qxf3

@ornicar ornicar reopened this Aug 30, 2022
@olleeriksson
Copy link

If all you want to do is specify color in combination with the PGN then you can do this:
https://lichess.org/analysis/pgn/{PGN}?color=black
For example: https://lichess.org/analysis/pgn/1.%20d4%20d5%202.%20c4?color=black

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants