Age | Commit message (Collapse) | Author |
|
A new engine process is now started immediately, rather than waiting
until a move needs to be made.
This means that if the engine is playing as black, it can start up
while the human player is making a move. This is noticable with
stockfish, which can be slow to start up.
|
|
The stockfish chess engine can now be selected from the engine menu if
the port has been installed.
|
|
Previously, Frames could set both these properties along with a
thickness to confusing effect: Most shapes of the same shadowing only
differentiated at a thickness >= 2, and some not at all. This led
to a lot of creative but ultimately superfluous choices in the code.
Instead let's streamline our options, automate thickness, and get
the right look without so much guesswork.
Plain shadowing has been consolidated into a single Plain style,
and 0 thickness can be had by setting style to NoFrame.
|
|
These icons are a relic of GLabel and were never implemented to
accomodate both image and text. This convenience can always be added
in the future, but no current instance assumes or needs it, so let's
replace them all with ImageWidget to show clearer intent.
|
|
|
|
Previously, clicking outside the bounds of the board when the window
was resized, could cause a crash.
|
|
A dialog is now displayed when an engine move results in a checkmate
or a draw. In the case of threefold repetition or the fifty move rule,
the engine will always accept a draw. A human player is asked if they
would like to accept a draw.
|
|
This fixes an issue where the engine would crash when starting a new
game playing as white.
|
|
Also, avoid creating temporary Strings for numbers, and stop appending
empty StringViews.
|
|
This saves us having to build and allocate a String, just to then use
one character of it.
|
|
This resolves a regression caused by
8a48246ed1a93983668a25f5b9b0af0e745e3f04.
|
|
The GUI now tracks when it becomes disconnected from ChessEngine.
If not currently waiting for a move from ChessEngine, it will
automatically reconnect on the next engine move. If a disconnection
occurs while waiting for a move, the player is asked whether they
want to try again or not.
|
|
The chess GUI now instructs the ChessEngine to gracefully exit by
sending a UCI quit command.
|
|
|
|
|
|
And use proper ellipses and capitalization in related action text.
|
|
Adds fallible factories, ports DeprecatedString, and rebuilds the
layout to accomodate system font changes.
|
|
Instead of propagating field size changes to main and manually
calculating window size, use auto shrink to automatically
resize the window after changes to the board.
|
|
Previously resizing the window did not take into account the
height of the status bar. The board now fixes its size on reset
and allows the Window to auto shrink to the perfect dimensions.
|
|
|
|
|
|
|
|
by using the ConfigServer.
|
|
|
|
To show it to the player, draw a faint outline of where the piece would
end up.
|
|
by fixing the "Toggle pause" option
|
|
Every other function there returning a RenderRequest has one, so might
as well.
Don't add it to check_and_remove_full_rows(), because it's only used
inside other functions returning a RenderRequest, when it's already
clear a render will happen.
|
|
|
|
|
|
Co-authored-by: HawDevelopment <hawdevelopment@gmail.com>
|
|
|
|
If we were paused before, don't start the game after closing the dialog.
|
|
|
|
Similar to POSIX read, the basic read and write functions of AK::Stream
do not have a lower limit of how much data they read or write (apart
from "none at all").
Rename the functions to "read some [data]" and "write some [data]" (with
"data" being omitted, since everything here is reading and writing data)
to make them sufficiently distinct from the functions that ensure to
use the entire buffer (which should be the go-to function for most
usages).
No functional changes, just a lot of new FIXMEs.
|
|
This is how the menu looks like after this commit:
ββββββ
βGameβ Help
ββββββ΄ββββββββββββββββββββββββββββββ
β New game F2 β
β Toggle pause P β
ββββββββββββββββββββββββββββββββββββ€
β Quit Alt+F4 β
ββββββββββββββββββββββββββββββββββββ
|
|
Looks a bit like this:
ββββββββββββββ
β β
β Paused β
β β
ββββββββββββββ
|
|
This make the pause feature feel much better.
|
|
Allows for pausing with either the `P` or `Escape` keys. In this commit
you can still rotate pieces when paused - which makes for an interesting
"stop-time" cheat mechanic, but probably isn't yet what we want.
|
|
Let's make it clear that these functions deal with ASCII case only.
|
|
Same as NonnullRefPtrVector: weird semantics, questionable benefits.
|
|
|
|
This class had slightly confusing semantics and the added weirdness
doesn't seem worth it just so we can say "." instead of "->" when
iterating over a vector of NNRPs.
This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
|
|
The only remaining clients of this API are specific to bitmap fonts and
editing thereof.
|
|
|
|
|
|
Nobody uses this return value any more. It also lets us remove a whole
bunch of `(void)` casts. :^)
|
|
|
|
|
|
|
|
As usual, this removes many unused includes and moves used includes
further down the chain.
|