示例#1
0
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();
}
示例#2
0
void playDealer(){
	startDealer();
	while (ccount<16){ 
		hit(1);
	}
}