Game.cpp
//
// Game:: allButOneFolded()
// check whether all players except one have folded 
//

: allButOneFolded()
check whether all players except one have folded
: allButOneFolded () check whether all players except one have folded
bool Game::allButOneFolded(){
	shared_ptr<Player> tmp = nullptr;
	int count = 0;
	for (auto it = players.begin(); it < players.end(); it++){
		if (!(*it)->folded){
			tmp = (*it);
			count++;
		}
	}
	return count == 1;
}
bool Game :: allButOneFolded ( ) { shared_ptr < Player > tmp = nullptr ; int count = 0 ; for ( auto it = players . begin ( ) ; it < players . end ( ) ; it ++ ) { if ( ! ( * it ) -> folded ) { tmp = ( * it ) ; count ++ ; } } return count == 1 ; }
Game:: allButOneFolded()
check whether all players except one have folded
Game :: allButOneFolded () check whether all players except one have folded