Commit graph

15 commits

Author SHA1 Message Date
Itamar
9a9d655abe Chess: Add LibCore as a dependency
This fixes Dynamic Loader crash because of an unresolved LibCore symbol
2020-12-14 23:05:53 +01:00
AnicJov
f631e73519 Chess: Added abilty to import PGN files
This patch allows the user to load games using PGN files. The parsing
is not complete and has a bunch of work left to be done, but it's
okay for our use case here. It can load all of the games our PGN
exporter can save. As the Chess program impoves so can the PGN parser.
2020-12-10 20:40:51 +01:00
AnicJov
cf8fce368a Chess: Added ability to copy board state as FEN
You can now copy the board state as Forsyth-Edwards Notation. You can
then paste this into other chess programs/games, or into ours when
it gets implemented.
2020-12-10 20:40:51 +01:00
AnicJov
fe1628746c Chess: Add ability to export game as PGN file
This patch adds an option to the menubar for exporting the current
game as a PGN file. This file can then be read by other chess
programs (and ours eventually) to replay the game or analyze it.
The implementation is mostly PGN spec compliant, however the code
could use some more work. Particularly the `const_cast`s...
But it's a start. :^)

Fixup: Chess: Fixed hard-coded home path in unveil() call

Fixup: Chess: Removed castling flags from Move struct

The castling detection logic is done inside Move::to_algebraic()
now, removing the need for is_castle_short and is_castle_long flags
inside of the Move struct.
2020-12-06 15:51:34 +01:00
AnicJov
01b62cc7f4 Chess: Added ability to resign and flip the board
This patch adds options to the app's menubar to resign the game and
flip the board.
2020-12-06 15:51:34 +01:00
Brendan Coles
d4c34d50c9 LibChess: Forbid King moving into check by a pawn on the home rank
A player can no longer move the King piece into any position on
their home rank if the move would place the King in check.

A player can also no longer ignore a check position when in check
by a pawn on their home rank. The player must now resolve the check
during their move.
2020-10-30 16:51:41 +01:00
asynts
43e37c7cde LibChess: Use new format functions. 2020-10-17 23:20:31 +02:00
Linus Groh
bcfc6f0c57 Everywhere: Fix more typos 2020-10-03 12:36:49 +02:00
Nico Weber
ef1b21004f Everywhere: Fix typos
Mostly in comments, but sprintf() now prints "August" instead of
"Auguest" so that's something.
2020-10-02 16:03:17 +02:00
Andreas Kling
23813d9bc9 LibChess: Shrink Chess::Piece from 8 bytes to 1 byte
This makes the engine footprint a lot smaller.
2020-08-21 13:46:07 +02:00
Peter Elliott
1e57e32a93 ChessEngine: Add ChessEngine
This engine is pretty bad, but doesn't let itself get checkmated
2020-08-21 12:26:30 +02:00
Peter Elliott
fb62eed058 Chess: Add support for UCI engines 2020-08-21 12:26:30 +02:00
Peter Elliott
7331b2b2f6 LibChess: Add UCIEndpoint for writing UCI chess engines 2020-08-21 12:26:30 +02:00
Peter Elliott
e80d0abb2c LibChess: Fix the ability to counter check with another check
fixes #3187,#3171
2020-08-21 12:26:30 +02:00
Peter Elliott
d2cb5e0f48 Chess: Refactor game logic into LibChess for use in engines
In the future UCI protocol stuff will also go into LibChess.
2020-08-21 12:26:30 +02:00