コード例 #1
0
ファイル: Casino.cpp プロジェクト: the-elves/BlackJack
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);
	}
}