Pedro Pereira
9d2e169169
FlappyBug+Spider: Update GUI:Application::construct usage
...
Update code to use Main:Arguments directly.
2021-11-23 14:15:00 +01:00
Andreas Kling
21a5fb0fa2
LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCore
...
With this change, System::foo() becomes Core::System::foo().
Since LibCore builds on other systems than SerenityOS, we now have to
make sure that wrappers work with just a standard C library underneath.
2021-11-23 11:33:36 +01:00
Mustafa Quraish
4d302e0e88
Everywhere: Use Application::construct() with Main::Arguments directly
...
Use the updated API everywhere we are currently manually passing in
`arguments.argc` and `arguments.argv`.
2021-11-22 21:13:42 -08:00
pbrw
71298ad9ba
Spider: Port to LibMain
...
Simplified two pledge() and two unveil() by using TRY()
2021-11-22 21:03:45 -08:00
Pedro Pereira
85ae298b85
FlappyBug: Port to LibMain
...
Simplified two pledge() and two unveil() by using TRY().
2021-11-22 21:02:14 -08:00
Pedro Pereira
55db1811c7
Chess: Port to LibMain
...
Simplified two pledge() and five unveil() by using TRY().
2021-11-22 23:55:42 +01:00
Pedro Pereira
fb5ea617f1
2048: Port to LibMain
...
Simplified two pledge() and two unveil() by using TRY().
2021-11-22 23:44:55 +01:00
Pedro Pereira
6e6228d40d
Breakout: Port to LibMain
...
Simplified two pledge() and two unveil() by using TRY().
2021-11-22 23:44:09 +01:00
Pedro Pereira
a0c80a6f17
Minesweeper: Port to LibMain
...
Simplified two unveil() and two pledge() by using TRY().
2021-11-22 21:56:31 +01:00
Andreas Kling
216e21a1fa
AK: Convert AK::Format formatting helpers to returning ErrorOr<void>
...
This isn't a complete conversion to ErrorOr<void>, but a good chunk.
The end goal here is to propagate buffer allocation failures to the
caller, and allow the use of TRY() with formatting functions.
2021-11-17 00:21:13 +01:00
Pedro Pereira
b7af536f9b
Minesweeper: Decrease min for Columns and Rows on Custom Game
...
Since the Beginner difficulty has a 9x9 playing field, it is expected
that a Custom Game should allow to create a field with that size.
2021-11-15 14:05:03 +00:00
Pedro Pereira
7b4b060b9c
Minesweeper: Create field from Difficulty enum
...
This change makes it easier to generate a new field. Instead of using
hard-coded values everywhere, we now just need to keep track of
the Difficulty enum value.
2021-11-15 14:05:03 +00:00
Pedro Pereira
1c29633110
Minesweeper: Turn difficulty menu into checkable actions
...
This change makes use of checkable actions to specify the current
selected difficulty for the game.
2021-11-15 14:05:03 +00:00
Pedro Pereira
557075465c
Minesweeper: Add "Custom game..." difficulty
...
This adds a dialog window which allows us to customize the size of the
board and the amount of mines that will be placed.
The current max amount of mines is 50% of the total number of cells
due to the fact that the generator algorithm takes too long to create a
board for higher percentages of mines.
2021-11-14 23:52:55 +00:00
Camron
5137f96bd6
Solitaire: Fix 3 card draw from reversing after an undo
...
Solitaire: Fix 3 card draw from reversing after an undo
Co-Authored-By: Tim Flynn <trflynn89@pm.me>
2021-11-10 20:15:09 -08:00
Andreas Kling
8b1108e485
Everywhere: Pass AK::StringView by value
2021-11-11 01:27:46 +01:00
Andreas Kling
235f39e449
LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()
...
This was used in a lot of places, so this patch makes liberal use of
ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
2021-11-08 00:35:27 +01:00
Ben Wiederhake
3796d417e0
Demos+DevTools+Games: Fix visibility of Object-derivative constructors
...
Derivatives of Core::Object should be constructed through
ClassName::construct(), to avoid handling ref-counted objects with
refcount zero. Fixing the visibility means that misuses like this are
more difficult.
2021-11-02 22:56:53 +01:00
Ben Wiederhake
6b75a4dfc3
Everywhere: Mark overridden methods 'override'
...
This is good practice, and fixes some IDE warnings.
2021-11-02 22:56:53 +01:00
Musab Kılıç
39afbceb53
Minesweeper: Set time label to a fixed width
...
This ensures the label width doesn't sporadically change as time elapses
2021-10-29 23:02:24 +03:00
Filiph Sandström
d6a0726302
Everywhere: Rename left/right-click to primary/secondary
...
This resolves #10641 .
2021-10-27 22:05:58 +03:00
Mohsan Ali
d609dde7b0
2048: Let user decide if he wants to continue the game
...
Before game finish when a player has reached target tile,
Now player will be able to decide if he wants to continue or not
2021-10-05 13:27:57 +03:30
Matheus Vinicius
567104607c
Breakout: Tag fallthrough statement
...
Tag key changes with fallthrough statement to document the intention.
2021-09-15 14:22:34 +00:00
Matheus Vinicius
ef3f9b24dd
Breakout: Add possibility to play with A and D
...
This change will make the player able to control the game with
A and D keys, in addition to the current arrow keys and mouse.
2021-09-15 14:22:34 +00:00
Mustafa Quraish
0f749681a9
Everywhere: Use my fancy new serenityos.org email :^)
2021-09-13 20:51:50 +00:00
Damien Firmenich
61f573fa67
Breakout: Improve collision response between ball and paddle
...
When the ball hits the side of the paddle, it would get stuck because
the paddle moves faster than the ball. This commit forces the post-
collision vertical velocity of the ball to be going up and makes sure
that new ball's y-position is higher than in the previous frame.
2021-09-10 22:08:22 +02:00
Ben Wiederhake
9c3da7a3e3
Pong: Switch to global tracking
...
When I play Pong, I don't really pay attention to whether my mouse is in
the Pong window. That means that sometimes, annoyingly, the window loses
my mouse, and I lose control of the paddle. Gasp! D:
This commit teaches Pong the wonders of global mouse tracking, thus
enabling the player to focus solely on the game.
2021-09-08 23:59:08 +02:00
Thitat Auareesuksakul
95ff65e211
Solitaire: Add Auto-Collect gameplay option
...
Add the option for players to enable automatic collection of eligible
cards to their foundation pile with a single click of that card.
2021-09-06 21:39:24 +02:00
Sam Atkins
e2c32a6c65
Everywhere: Use my shiny new serenityos.org email :^)
2021-09-03 12:22:36 +02:00
Musab Kılıç
1179d5d921
GameOfLife: Don't enable rotate button if a pattern isn't selected
2021-08-31 15:46:58 +01:00
Andreas Kling
0de35db0f1
Minesweeper: Use AK::get_random_uniform() instead of rand()
2021-08-30 18:35:36 +02:00
Andreas Kling
d3d170851d
Snake: Use AK::get_random_uniform() instead of rand()
2021-08-30 18:35:36 +02:00
Luke Wilde
041007e9f6
2048: Remove wpath and cpath pledges
...
With the move to LibConfig, these are no longer needed.
2021-08-28 12:22:16 +04:30
Luke Wilde
c0c33a4604
Spider: Remove wpath and cpath pledges and pledge earlier
...
With the move to LibConfig, the wpath and cpath pledges are no longer
needed.
2021-08-28 12:22:16 +04:30
Luke Wilde
34dc275005
Solitaire: Remove wpath and cpath pledges and pledge earlier
...
With the move to LibConfig, the wpath and cpath pledges are no longer
needed.
2021-08-28 12:22:16 +04:30
Luke Wilde
4332b35798
Chess: Perform pledges earlier
2021-08-28 12:22:16 +04:30
Luke Wilde
fd51a3cf15
FlappyBug: Remove wpath and cpath pledges
...
With the move to LibConfig, these are no longer needed.
2021-08-28 12:22:16 +04:30
Luke Wilde
5d6fccc52b
GameOfLife: Add pledge and unveil
2021-08-28 12:22:16 +04:30
Luke Wilde
7a0fbb94b6
Pong: Remove wpath and cpath pledges
...
With the move to LibConfig, these are no longer needed.
2021-08-28 12:22:16 +04:30
Luke Wilde
efe0a3d415
Snake: Remove wpath and cpath pledges
...
With the move to LibConfig, these are no longer needed.
2021-08-28 12:22:16 +04:30
Luke Wilde
9d428a65d1
Minesweeper: Remove wpath and cpath pledges
...
With the move to LibConfig, these are no longer needed.
2021-08-28 12:22:16 +04:30
Mustafa Quraish
17299db61a
Hearts: Remove wpath
and cpath
priviliges
...
There are no longer needed since the config file is not being
modified by the application directly.
2021-08-27 23:17:05 +02:00
Mustafa Quraish
0af3855fb9
Hearts: Use LibConfig instead of Core::ConfigFile
2021-08-27 23:17:05 +02:00
Mustafa Quraish
4bd9ac1f66
Pong: Remove unused Core::ConfigFile imports
...
This application was including, opening and unveiling the path for
a config file, however it never actually reads or saves anything
from the configuration file.
Since it's easy enough to add it back later if needed, probably
makes sense to remove the unused code right now?
2021-08-27 12:45:50 +02:00
Mustafa Quraish
998d3a98ec
Spider: Use LibConfig instead of Core::ConfigFile
...
There was a lot of error handling here previously when writing to
a config file failed, but this was removed since we have no way of
conveying a `Config::write` failure from the ConfigServer.
2021-08-27 12:45:50 +02:00
Mustafa Quraish
458471cc37
Snake: Use LibConfig instead of Core::ConfigFile
2021-08-27 12:45:50 +02:00
Ralf Donau
a6fc80f069
Games: Remove unveiling /tmp/portal/config
...
Config::pledge_domains is applied before, hence /tmp/portal/config
can and should be veiled.
2021-08-26 21:40:39 +02:00
Ralf Donau
5a0be07cf0
FlappyBug: Use LibConfig instead of Core::ConfigFile
2021-08-26 19:54:50 +02:00
Thitat Auareesuksakul
f119c5580a
Solitaire: Use LibConfig instead of Core::ConfigFile
2021-08-26 16:39:22 +02:00
Thitat Auareesuksakul
573d14b7b5
Chess: Use LibConfig instead of Core::ConfigFile
2021-08-26 16:39:22 +02:00