parent
9c5c49c175
commit
b5ca0c5369
@ -0,0 +1,24 @@
|
||||
#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;
|
||||
}
|
Loading…
Reference in new issue