J :
* Code cleaning
This commit is contained in:
@@ -52,10 +52,7 @@ JQuad * Player::getIcon(){
|
|||||||
Player * Player::opponent(){
|
Player * Player::opponent(){
|
||||||
GameObserver * game = GameObserver::GetInstance();
|
GameObserver * game = GameObserver::GetInstance();
|
||||||
if (!game) return NULL;
|
if (!game) return NULL;
|
||||||
for (int i= 0; i < 2; i++){
|
return this == game->players[0] ? game->players[1] : game->players[0];
|
||||||
if (game->players[i] != this) return game->players[i];
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HumanPlayer::HumanPlayer(MTGPlayerCards * deck, string file, string fileSmall) : Player(deck, file, fileSmall) {
|
HumanPlayer::HumanPlayer(MTGPlayerCards * deck, string file, string fileSmall) : Player(deck, file, fileSmall) {
|
||||||
|
|||||||
Reference in New Issue
Block a user