You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
474 B
24 lines
474 B
#include "Player.h"
|
|
|
|
void Player::addCardToHand(const Card& card) {
|
|
hand.push_back(card);
|
|
}
|
|
|
|
void Player::removeCardFromHand(const Card& card) {
|
|
auto it = std::find(hand.begin(), hand.end(), card);
|
|
if (it != hand.end()) {
|
|
hand.erase(it);
|
|
}
|
|
}
|
|
|
|
void Player::updateChips(int amount) {
|
|
chips += amount;
|
|
}
|
|
|
|
const std::vector<Card>& Player::getHand() const {
|
|
return hand;
|
|
}
|
|
|
|
int Player::getChips() const {
|
|
return chips;
|
|
} |