alecho / chex Goto Github PK
View Code? Open in Web Editor NEWA chess library.
Home Page: https://hexdocs.pm/chex/
License: MIT License
A chess library.
Home Page: https://hexdocs.pm/chex/
License: MIT License
Add some tests to replay full famous games.
Is your feature request related to a problem? Please describe.
Currently, players are identified by their color atom and this is all Chex knows about.
Describe the solution you'd like
Add support for assigning arbitrary terms to each color to be used to identify players and add functions around that value. This could be a simple string, user id, session id, etc.
Describe alternatives you've considered
Make library consumers track player state and who is assigned to each color.
Additional context
https://www.theerlangelist.com/article/spawn_or_not
When debugging or viewing the game state in logs with inspect it would be easier for humans to see a game board representation as opposed to a struct.
Describe the solution you'd like
Implement the Inspect protocol for %Chex.Game{}
A to_string function would work as well and could be implemented at the same time.
Additional context
https://hexdocs.pm/elixir/1.12/Inspect.html
Simplify to take a game and a square and return a list of squares. Investigate returning a MapSet.
Describe the solution you'd like
Ability to conditionally or unconditionally record one or more moves made during an opponents turn to be played automatically.
Describe alternatives you've considered
None
Additional context
Chess.com implements this with multiple pathways. I believe lichess has just one premove at a time.
new
, move
, in_check?
, etc.
Castling as a move is not currently possible but the game state does know about castling rights and how and when to remove them.
Is your feature request related to a problem? Please describe.
When a game ends with checkmate, Chex is unaware that a mate has occurred.
Describe the solution you'd like
Chex should update it's internal state to reflect the mate and provide public functions for checking this state.
Describe alternatives you've considered
None.
Additional context
Checkmate on Wikipedia
Is your feature request related to a problem? Please describe.
Similar to #27, Chex doesn't know when a stalemate has occurred.
Describe the solution you'd like
Chex should update it's internal state and expose functions to inspect this state.
Describe alternatives you've considered
None.
Additional context
https://en.wikipedia.org/wiki/Stalemate
Is your feature request related to a problem? Please describe.
Better Parser support of input.
Describe the solution you'd like
Use NimbleParsec.
Describe alternatives you've considered
Regex and Ecto changesets.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.