Casino::Casino() { int socket, clientPort; string clientIp, message, name; int i = 0; thread a(&Casino::readMgt, this); while(1){ comm.acceptConnection(socket, clientIp, clientPort, name); Player p(socket, clientPort, clientIp, name); startDealer(p); if(i == 0) dealer.cardsInit(); i++; //comm.readMessage(socket, message); //cout<<message; /*GameMessage gm ; gm.to = "todd"; gm.from = "frdd"; gm.toSocket=socket; gm.gameMessageType = GameMessage::ACTION; gm.action=GameMessage::HIT; comm.sendMessage(gm);*/ } a.join(); }
void playDealer(){ startDealer(); while (ccount<16){ hit(1); } }