1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:07:34 +00:00

Spider: Make Game creation fallible

This commit is contained in:
Sam Atkins 2023-01-06 12:21:12 +00:00 committed by Linus Groh
parent f9f6bf3cd4
commit e193679352
3 changed files with 13 additions and 6 deletions

View file

@ -30,11 +30,12 @@ enum class GameOverReason {
};
class Game final : public Cards::CardGame {
C_OBJECT(Game)
C_OBJECT_ABSTRACT(Game)
public:
static constexpr int width = 10 + 10 * Card::width + 90 + 10;
static constexpr int height = 480;
static ErrorOr<NonnullRefPtr<Game>> try_create();
~Game() override = default;
Mode mode() const { return m_mode; }