Logo Search packages:      
Sourcecode: schafkopf version File versions  Download package

void Game::startGame (  )  [private]

give cards to the player and begin a new gameinfo

Definition at line 81 of file game.cpp.

References postEvent(), and CardList::randomize().

{
    unsigned int i = 0;
    CardList *playercards[PLAYERS];

    m_allcards.randomize();
    for( i=0; i<PLAYERS; i++)
      playercards[i]=new CardList();
    for( i=0; i<CARD_CNT; i++)
        playercards[i%PLAYERS]->append(m_allcards.at(i));

    for( i=0;i<PLAYERS;i++)
    {
        m_players[i]->setCards( playercards[i] );
        m_players[i]->stiche()->clear();
    }

    postEvent( GameStarted );
    //emit gameStarted();
}


Generated by  Doxygen 1.6.0   Back to index