geekbrains_oop_cpp/lesson_6/exercise_4.hpp

28 lines
487 B
C++
Raw Normal View History

2021-07-08 14:54:37 +00:00
#ifndef EXERCISE_4_HPP_
#define EXERCISE_4_HPP_
#include "Blackjack.hpp"
class House : public GenericPlayer
{
public:
House(const string& name = "House") : GenericPlayer(name) { }
virtual ~House() { }
virtual bool IsHitting() const
{
return (GetTotal() <= 16);
}
void FlipFirstCard()
{
if (!(m_Cards.empty()))
m_Cards[0]->Flip();
else
cout << "Нет карты для переворота!\n";
}
};
#endif