Commit graph

283 commits

Author SHA1 Message Date
Sam Atkins
0e2fa09f52 Games: Cast unused smart-pointer return values to void 2021-12-05 15:31:03 +01:00
Brian Gianforcaro
cf4fa936be Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
Pedro Pereira
d748f2bea2 Spider: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira
206847c37d Solitaire: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira
d2e9b122e0 Snake: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira
498d8bf1d7 Pong: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira
aa2bc6fd47 Minesweeper: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira
1211a3a3f3 Hearts: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira
ee3b14fc38 GameOfLife: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira
2f5f53d1cf FlappyBug: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira
45e29d58e2 Chess: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira
5caa9311d7 Breakout: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira
d56e4d5145 2048: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira
913b1fad25 FlappyBug: Support mouse clicks for flapping
This change allows to play the game using the mouse.
2021-11-24 21:18:31 -08:00
Pedro Pereira
2efec90fb7 Spider: Replace construct() with TRY(try_create()) pattern 2021-11-24 13:51:07 +01:00
Pedro Pereira
302784ebf8 Solitaire: Replace construct() with TRY(try_create()) pattern 2021-11-24 13:51:07 +01:00
Pedro Pereira
2c6dc6d5f6 Snake: Replace construct() with TRY(try_create()) pattern 2021-11-24 13:51:07 +01:00
Pedro Pereira
5934e95402 Pong: Replace construct() with TRY(try_create()) pattern 2021-11-24 13:51:07 +01:00
Pedro Pereira
36056c1cba Minesweeper: Replace construct() with TRY(try_create()) pattern 2021-11-24 13:51:07 +01:00
Pedro Pereira
0a800cc1bb Hearts: Replace construct() with TRY(try_create()) pattern 2021-11-24 13:51:07 +01:00
Pedro Pereira
a0db5cca8a GameOfLife: Replace construct() with TRY(try_create()) pattern 2021-11-24 13:51:07 +01:00
Pedro Pereira
da50667bb5 FlappyBug: Replace construct() with TRY(try_create()) pattern 2021-11-24 13:51:07 +01:00
Pedro Pereira
70a3962ce9 Chess: Replace construct() with TRY(try_create()) pattern 2021-11-24 13:51:07 +01:00
Pedro Pereira
92e9b447f4 Breakout: Replace construct() with TRY(try_create()) pattern 2021-11-24 13:51:07 +01:00
Pedro Pereira
5b33ee20df 2048: Replace construct() with TRY(try_create()) pattern 2021-11-24 13:51:07 +01:00
Pedro Pereira
d68196969d Pong: Port to LibMain
Simplified two pledge() and two unveil() by using TRY().
2021-11-23 22:56:01 +01:00
Pedro Pereira
3ca2f192af GameOfLife: Port to LibMain
Simplified two pledge() and two unveil() by using TRY().
2021-11-23 22:55:56 +01:00
Pedro Pereira
8d3059c6f5 Solitaire: Port to LibMain
Simplified two pledge() and two unveil() by using TRY().
2021-11-23 22:55:50 +01:00
Pedro Pereira
c4e49e1955 Snake: Port to LibMain
Simplified two pledge() and two unveil() by using TRY().
2021-11-23 22:55:44 +01:00
Pedro Pereira
7d2170246f Hearts: Port to LibMain
Simplified one pledge() and two unveil() by using TRY().
2021-11-23 22:47:34 +01:00
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