Closed raquelhortab closed 5 years ago
At this time is not possible. I can add this feature on the weekend!
That would be amazing!
For instance, I am using chessboard.js with chess.js, and I was intending to check in the server whether the moves were legal with chess gem before saving the state of the game.
PGN in chess.js is in the standard format: strings like "1. d3 e6 2. d4 e5 3. dxe5 g6". It would be interesting that pgn.rb load and to_s functions followed the standard format.
Thanks for the amazing and quick support!
I've just added this new method to the class Chess::Pgn
http://blog.pioz.it/chess/Chess/Pgn.html#load_from_string-instance_method and a couple of tests. Here the commit.
Let me know if this can resolve your problem!
Hi there! Well... actually it does not... I need to use it with ruby 1.9 and I cannot find the workaround, I've been trying to unpack, modify, and rebuild the gem but since I am a noob in this, I cannot get it to work...
Thank you very much for your help though!! Magnificent support!!!
@raquelhortab, unfortunately, Ruby 1.9 is no more supported by this gem.
Hi there!
I was wondering if there is a way to load the pgn to create the game in string format instead of having to create a file.
Thanks!