Previously, during the start of the game BoardView component tried to
get the font from the database passing empty string as a parameter.
It caused a debug message informing user that the lookup failed.
We previously never called event.ignore(), so the keydown event for F2
or F11 etc would be consumed by the BrickGame widget instead of
bubbling up. Now you can start a new game, or escape fullscreen mode,
even if you've paused the game. :^)
Required allowing resizing. Perhaps an additional setting to allow
fullscreen, but not resizing? Anyhow, the game still plays well if
you can resize and works as expected.
`on_game_start` is not called until the player makes a move, so waiting
until then means that the solve button would still be visible when
starting a new game after completing one. By hiding the button in
`on_game_end`, this happens when the game-over animation starts playing
instead.
This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).
This commit is auto-generated:
$ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
Meta Ports Ladybird Tests Kernel)
$ perl -pie 's/\bDeprecatedString\b/ByteString/g;
s/deprecated_string/byte_string/g' $xs
$ clang-format --style=file -i \
$(git diff --name-only | grep \.cpp\|\.h)
$ gn format $(git ls-files '*.gn' '*.gni')
In Solitaire, when the stock stack is empty and all cards have been
revealed, finishing the game is trivial, since you only need to sort the
already visible cards onto the foundation stacks. To simplify this, the
game will now give you the option to finish the game automatically if
these conditions are met. It then sorts the cards with a delay of 100ms
between each card.
In Spider, cards that can't be moved are now shown as disabled using the
helpers in LibCards. This makes it much easier to see what can be moved
and to where, overall improving the game significantly!
Display a warning when some images are missing, instead of crashing.
Also, don't keep old images around when loading a new set, and make use
of get_piece_graphic() more often.
Previously we would display the score rounded to the nearest integer,
but save the high score by using a static_cast<u32>, which would
always round the score down. This could lead to the final score being
higher than the new high score, when they should be equal.
Now we always round the score to the nearest integer.
The counter is incremented after each new generation and reset
whenever any cell on the board is toggled. Resizing the board
does not reset the tick count.
This prevents the menu and toolbar action state getting out of sync,
which could happen previously. The menu item also now shows the
appropriate icon rather than a checkbox.
Previously, when there were more rows or columns than the BoardWidget
could contain, nothing was displayed. The BoardWidget minimum size is
now set whenever the number of rows or columns changes.
This change also ensures that the redo stack is cleared when a move is
made, so that it isn't possible to redo a previous move after having
made a new one.
Now when selecting a chess set in Games Settings, the names of the sets
are capitalized which looks much neater.
The default set 'stelar7' has been renamed to 'Classic' to reflect its
default vanilla design, as opposed to more stylized sets.
This commit also updates any code references to this set.