Brunot
Loading...
Searching...
No Matches
DrawCardMessage.h
Go to the documentation of this file.
1// File: DrawCard.h
2// Description: Used to tell a Player to add a card into their hand. Contains the number of the player that drew the card and the Card they drew.
3// Author(s): Bryley Elder (bryley.elder@digipen.edu)
4// 2025 / 11 / 07
5// (C) Digipen 2025
6// ____ __ __ __
7// /\__ _\/\ \ /\ \/\ \
8// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
9// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
10// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
11// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
12// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
13#pragma once
14#include "Message.h"
15
16class Card;
17
19{
20
21public:
22 DrawCardMessage(int playerNum, const Card& card);
23 DrawCardMessage(const DrawCardMessage& other) = default;
24 DrawCardMessage(DrawCardMessage&& other) noexcept = default;
25 auto operator=(const DrawCardMessage& other) -> DrawCardMessage& = default;
26 auto operator=(DrawCardMessage&& other) noexcept -> DrawCardMessage& = default;
27 ~DrawCardMessage() override = default;
28
29 auto clone() const -> std::unique_ptr<Message> override
30 {
31 return std::make_unique<DrawCardMessage>(*this);
32 }
33
34 auto getPlayerNumber() const -> int;
35 auto getDrawnCard() const -> const Card&;
36
37private:
40};
Definition Card.h:34
auto operator=(DrawCardMessage &&other) noexcept -> DrawCardMessage &=default
const Card & drawnCard
Definition DrawCardMessage.h:39
auto clone() const -> std::unique_ptr< Message > override
Definition DrawCardMessage.h:29
DrawCardMessage(const DrawCardMessage &other)=default
DrawCardMessage(int playerNum, const Card &card)
Definition DrawCardMessage.cpp:17
int playerNumber
Definition DrawCardMessage.h:38
auto getDrawnCard() const -> const Card &
Definition DrawCardMessage.cpp:28
~DrawCardMessage() override=default
auto operator=(const DrawCardMessage &other) -> DrawCardMessage &=default
auto getPlayerNumber() const -> int
Definition DrawCardMessage.cpp:23
DrawCardMessage(DrawCardMessage &&other) noexcept=default
Message()=default