Age | Commit message (Collapse) | Author |
|
Stockfish apparently cannot handle non-blocking I/O, and it does not
make sense to assume that all chess engines can do so.
Fixes #18946.
|
|
This is a clear sign that they want to use a UnixDateTime instead.
This also adds support for placing durations and date times into SQL
databases via their millisecond offset to UTC.
|
|
That's what this class really is; in fact that's what the first line of
the comment says it is.
This commit does not rename the main files, since those will contain
other time-related classes in a little bit.
|
|
Previously, calling `.right()` on a `Gfx::Rect` would return the last
column's coordinate still inside the rectangle, or `left + width - 1`.
This is called 'endpoint inclusive' and does not make a lot of sense for
`Gfx::Rect<float>` where a rectangle of width 5 at position (0, 0) would
return 4 as its right side. This same problem exists for `.bottom()`.
This changes `Gfx::Rect` to be endpoint exclusive, which gives us the
nice property that `width = right - left` and `height = bottom - top`.
It enables us to treat `Gfx::Rect<int>` and `Gfx::Rect<float>` exactly
the same.
All users of `Gfx::Rect` have been updated accordingly.
|
|
|
|
Previously, the engine would attempt to make a move if the engine was
changed after the game had ended.
This change also allows the player to always flip the board when the
game is finished, instead of only being able to flip the board on
their turn.
|
|
Corrects a slew of titles, buttons, labels, menu items and status bars
for capitalization, ellipses and punctuation.
Rewords a few actions and dialogs to use uniform language and
punctuation.
|
|
When either king is in check, its square is now highlighted with a red
background. This behavior can be toggled in GameSettings.
|
|
This concerns both `BufferedSeekable` and `BufferedFile`.
|
|
|
|
|
|
In Snake, the menu for choosing a skin looked messy due to
inconsistent capitalization. Two skins names were entirely lowercase.
For the sprite-based skins, the menu takes the name of each skin's
directory, so I have capitalized these.
Capitalizing the original snake skin required more change than simply
renaming a directory.
|
|
The 50 and 75 move rules are no longer invoked if a pawn has advanced
in the last 50 or 75 moves respectively.
|
|
The pattern to construct `Application` was to use the `try_create`
method from the `C_OBJECT` macro. While being safe from an OOM
perspective, this method doesn't propagate errors from the constructor.
This patch make `Application` use the `C_OBJECT_ABSTRACT` and manually
define a `create` method that can bubble up errors from the
construction stage.
This commit also removes the ability to use `argc` and `argv` to
create an `Application`, only `Main`'s `Arguments` can be used.
From a user point of view, the patch renames `try_create` => `create`,
hence the huge number of modified files.
|
|
The graphics directory is a more suitable home for game assets.
|
|
The graphics directory is a more suitable home for game assets.
|
|
The graphics directory is a more suitable home for game assets.
|
|
The graphics directory is a more suitable home for game assets.
|
|
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.
|