mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:57:44 +00:00
Solitaire: Make Game creation fallible
This commit is contained in:
parent
6e0ad5536f
commit
306676792c
3 changed files with 27 additions and 20 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Till Mayer <till.mayer@web.de>
|
||||
* Copyright (c) 2021-2022, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
@ -29,11 +29,12 @@ enum class GameOverReason {
|
|||
};
|
||||
|
||||
class Game final : public Cards::CardGame {
|
||||
C_OBJECT(Game)
|
||||
C_OBJECT_ABSTRACT(Game)
|
||||
public:
|
||||
static constexpr int width = 640;
|
||||
static constexpr int height = 480;
|
||||
|
||||
static ErrorOr<NonnullRefPtr<Game>> try_create();
|
||||
virtual ~Game() override = default;
|
||||
|
||||
Mode mode() const { return m_mode; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue