ladybird/Userland/Games/Hearts/ScoreCard.h
Gunnar Beutner 87ace131bc Hearts: Add support for playing more than one hand
This changes the game so that more than one hand can be played. Once
one player has 100 or more points the game ends. A score card is shown
between each hand.

Fixes #7374.
2021-05-25 21:05:35 +02:00

32 lines
599 B
C++

/*
* Copyright (c) 2021, Gunnar Beutner <gbeutner@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "Player.h"
#include <AK/Function.h>
#include <LibGUI/Frame.h>
namespace Hearts {
class ScoreCard : public GUI::Frame {
C_OBJECT(ScoreCard);
Gfx::IntSize recommended_size();
private:
ScoreCard(Player (&players)[4], bool game_over);
virtual void paint_event(GUI::PaintEvent&) override;
static constexpr int column_width = 70;
static constexpr int cell_padding = 5;
Player (&m_players)[4];
bool m_game_over { false };
};
}