Skip to content
Snippets Groups Projects
Commit 2d023d5c authored by noec's avatar noec
Browse files

implemented the final draw of the dealer in maingamepanel.cpp

parent 17a35e41
No related branches found
No related tags found
No related merge requests found
......@@ -429,6 +429,10 @@ void MainGamePanel::buildDealer(game_state* gameState){
ImagePanel* leftDealerCard = new ImagePanel(this, getPngFileName(dealers_cards[0]->get_value(), dealers_cards[0]->get_suit()), wxBITMAP_TYPE_ANY, leftCardPosition, MainGamePanel::cardSize);
}
else{
std::string err = "Problems drawing cards for dealer in the end";
while(gameState->get_dealers_hand()->get_points(err)<= 16){
gameState->get_shoe()->draw_card(gameState->get_dealers_hand(), err);;
}
for(unsigned i = 0; i < dealers_cards.size(); ++i){
ImagePanel *image_panel = new ImagePanel(this, dealer_cards_file_names[i], wxBITMAP_TYPE_ANY, offsets[i], MainGamePanel::cardSize);
handLayout->Add(image_panel, 0, wxLEFT | wxRIGHT, 4);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment