Giter Club home page Giter Club logo

jchess's People

Contributors

corlaez avatar corlaez2 avatar ctabin avatar joeydp avatar lgtm-migrator avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jchess's Issues

Parsing ongoing PGN game where no move was made yet throws `java.lang.IllegalArgumentException: Invalid moves: *`

This line assumes the move list always starts with 1.:

if(!moves.startsWith("1.")) { throw new IllegalArgumentException("Invalid moves: "+moves); }

Unfortunately when no move was played yet, this is not the case (only the result is repeated, typically * for a game that was just started, but can be anything technically). Can this be fixed?

I am using this library to store chess games played in Minecraft and this requires storing metadata of the game (players, date, etc.) while no move was made yet.

Pawn when black go first

Hello, do you think it is a good idea to subclass pawnDisplacementRule and Pawn and override direction inside pawnDisplaymentRule so you have 2 new classes that you can use when black go first ? Because i believe currently the pawn only moves in direction for white.

FEN Support

Is there interest in supporting FEN? I think it would be a convenient way to store state (with the tradeoff of loosing the history). I like how compact FEN can be.

I was thinking in writing my own but I couldn't find a way to flip castling rights in jchess API. Any thoughts or comments on this?

Captured Pieces Support

I think it would be useful to be able to query the captured pieces in the game and I believe there is no support for this at the moment.

Jchess could hold captured pieces in memory. I think that a single list of pieces could hold the data for both players.
Alternatively, jchess could avoid storing that extra state and just offer a way to subscribe to captured events. The client would then be responsible of storing the captured piece when an event fires.

I would do it outside of jchess, but it seems that it would be reimplementing parts of jchess to do it.

It is not a blocker for me yet but I thought it would be a good idea to document this here.

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.