reddragonwebdesign / php-chess Goto Github PK
View Code? Open in Web Editor NEWPlay chess on the web. Legal move generator working 100%. PHP, optimized, OOP code.
Home Page: https://www.reddragonwebdesign.com/projects/php-chess/
Play chess on the web. Legal move generator working 100%. PHP, optimized, OOP code.
Home Page: https://www.reddragonwebdesign.com/projects/php-chess/
When reading this FEN. Related to ChessRulebook
8/8/8/3pp3/4P3/3P1N2/PPP1BPPP/RNBQK2R w KQkq d6 0 5
`Fatal error: Uncaught TypeError: Argument 3 passed to ChessRulebook::square_is_attacked() must be an instance of ChessSquare, null given, called in D:\Dropbox\Code\chess\chess_v2.2 [before putting on Red Dragon Web Design]\models\ChessRulebook.php on line 675 and defined in D:\Dropbox\Code\chess\chess_v2.2 [before putting on Red Dragon Web Design]\models\ChessRulebook.php on line 794
TypeError: Argument 3 passed to ChessRulebook::square_is_attacked() must be an instance of ChessSquare, null given, called in D:\Dropbox\Code\chess\chess_v2.2 [before putting on Red Dragon Web Design]\models\ChessRulebook.php on line 675 in D:\Dropbox\Code\chess\chess_v2.2 [before putting on Red Dragon Web Design]\models\ChessRulebook.php on line 794`
When importing the FEN 'r1bqkb1r/ppp2ppp/2n2n2/3pp3/4P3/3P1N2/PPP1BPPP/RNBQK2R w KQkq d6 0 5' the script lists several legal moves. One of them is 'Nd2', but that's ambiguous. It should be clarified to 'Nbd2' and 'Nfd2'.
This should be very unit testable in something like PHPUnit. Add unit tests.
4k3/8/8/8/8/5N2/8/1N2K3 w KQkq d6 0 5
Fatal error: Uncaught Exception: Invalid FEN - Castling permissions set to TRUE but rook is missing in D:\Dropbox\Code\chess\chess_v2.2 [before putting on Red Dragon Web Design]\models\ChessRulebook.php on line 646
8/8/2n2n2/3pp3/4P3/3P1N2/PPP1BPPP/RNBQK2R w KQkq d6 0 5
Fatal error: Uncaught TypeError: Argument 3 passed to ChessRulebook::square_is_attacked() must be an instance of ChessSquare, null given, called in D:\Dropbox\Code\chess\chess_v2.2 [before putting on Red Dragon Web Design]\models\ChessRulebook.php on line 675 and defined in D:\Dropbox\Code\chess\chess_v2.2 [before putting on Red Dragon Web Design]\models\ChessRulebook.php on line 794
Went to test something right now, and it was displaying an old version of the page until I did a hard refresh. Maybe send some headers that guarantee that no caching is used.
Faster Perft - use recursion instead of storing lists of ChessMoves at each depth. Then you just need to store the board/move list above you in the tree
Make a fast, live perft page. No other perft generators appear to be online/live, they're all offline. There's probably a need for test engine makers to use a quick, easy online perft.
Could even do the current perft, and give it a good user interface, and have it time out after 10 or 30 seconds.
Perft would be perfect for JavaScript. Client side resource usage instead of server side resource usage.
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.