Brunot
Loading...
Searching...
No Matches
PlayCardMessage.h
Go to the documentation of this file.
1// File: PlayCardMessage.h
2// Description: The message sent to board and transform when a card is played
3// Author(s): Bryley Elder (bryley.elder@digipen.edu)
4// 2025 / 10 / 24
5// (C) Digipen 2025
6// ____ __ __ __
7// /\__ _\/\ \ /\ \/\ \
8// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
9// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
10// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
11// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
12// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
13#pragma once
14
15#include "Message.h"
16#include "Component/Card.h"
17#include "Framework/Entity.h"
18
20{
21public:
22 PlayCardMessage(Card* cardPlayed, int xPos, int yPos, gobj::UUID uuidObj);
23 PlayCardMessage(const PlayCardMessage& other) = default;
24 PlayCardMessage(PlayCardMessage&& other) noexcept = default;
25 auto operator=(const PlayCardMessage& other) -> PlayCardMessage& = default;
26 auto operator=(PlayCardMessage&& other) noexcept -> PlayCardMessage& = default;
27 ~PlayCardMessage() override = default;
28
29 auto clone() const -> std::unique_ptr<Message> override
30 {
31 return std::make_unique<PlayCardMessage>(*this);
32 }
33
34
35 auto getX() const -> int;
36 auto getY() const -> int;
37 auto getCard() const -> Card*;
38 auto getUUID() const -> gobj::UUID;
39
40private:
41 int x;
42 int y;
43 gobj::UUID uuid;
45};
The card component that is moved around on the board.
The class containing all entity elements.
Definition Card.h:34
Card * card
Definition PlayCardMessage.h:44
~PlayCardMessage() override=default
auto operator=(const PlayCardMessage &other) -> PlayCardMessage &=default
auto getY() const -> int
Definition PlayCardMessage.cpp:29
int y
Definition PlayCardMessage.h:42
auto getX() const -> int
Definition PlayCardMessage.cpp:24
PlayCardMessage(PlayCardMessage &&other) noexcept=default
auto operator=(PlayCardMessage &&other) noexcept -> PlayCardMessage &=default
int x
Definition PlayCardMessage.h:41
PlayCardMessage(Card *cardPlayed, int xPos, int yPos, gobj::UUID uuidObj)
Definition PlayCardMessage.cpp:19
PlayCardMessage(const PlayCardMessage &other)=default
auto getUUID() const -> gobj::UUID
Definition PlayCardMessage.cpp:40
auto clone() const -> std::unique_ptr< Message > override
Definition PlayCardMessage.h:29
gobj::UUID uuid
Definition PlayCardMessage.h:43
auto getCard() const -> Card *
Definition PlayCardMessage.cpp:34
namespace for things relating to GameObject, other than GameObject itself
Definition Entity.h:229
unsigned int UUID
Definition GameObject.h:62
Message()=default