20 lines
474 B
C++
20 lines
474 B
C++
|
|
#pragma once
|
|
#include "card.hpp"
|
|
|
|
#include <array>
|
|
#include <optional>
|
|
|
|
namespace solitaire {
|
|
class Goal {
|
|
std::array<std::optional<Card>, 3> goal{};
|
|
auto getEmptyId() -> std::optional<int>;
|
|
|
|
public:
|
|
[[nodiscard]] auto getId(CardType suit) const noexcept -> std::optional<int>;
|
|
[[nodiscard]] auto get(CardType suit) const noexcept -> std::optional<int>;
|
|
|
|
void set(CardType suit, int value) noexcept;
|
|
void inc(CardType suit) noexcept;
|
|
};
|
|
} // namespace solitaire
|