Esempio n. 1
0
 /**
  * Method overloaded for multi player games.
  * Indicates if there is a game winner in the current observation.
  * Possible values are VGDLPlayerOutcomes.PLAYER_WINS, VGDLPlayerOutcomes.PLAYER_LOSES and
  * VGDLPlayerOutcomes.NO_WINNER.
  * @return the winner of the game.
  */
 public VGDLPlayerOutcomes[] getMultiGameWinner()
 {
     VGDLPlayerOutcomes[] winners = new VGDLPlayerOutcomes[no_players];
     for (int i = 0; i < no_players; i++)
     {
         winners[i] = avatars[i].winState;
     }
     return(winners);
 }
Esempio n. 2
0
    public VGDLAvatar(VGDLAvatar from) : base(from)
    {
        //Insert fields to be copied by copy constructor.
        actions.AddRange(from.actions);
        actionsNIL.AddRange(from.actionsNIL);

        playerID        = from.playerID;
        winState        = from.winState;
        score           = from.score;
        is_disqualified = from.is_disqualified;

        //Don't know about this one
        //inputHandler = from.inputHandler;
        setKeyHandler(from.getKeyHandler());
        lastMovementType = from.lastMovementType;
    }
Esempio n. 3
0
 /**
  * Sets the disqualified flag.
  */
 public void disqualify(bool is_disqualified)
 {
     this.is_disqualified = is_disqualified;
     this.winState        = VGDLPlayerOutcomes.PLAYER_DISQ;
 }