Esempio n. 1
0
 public void selectPanel(JOB_SELECTION typeEnum)
 {
     if (jobSelectionsInternal[currentPlayer] == JOB_SELECTION.NONE)
     {
         // allow player to immediately select
         jobSelectionsInternal[currentPlayer] = typeEnum;
         panelsDict[typeEnum].setIsSelected(true);
         readyPlayers++;
     }
     else
     {
         // change the player's selection
         foreach (KeyValuePair <JOB_SELECTION, JobPanel> entry in panelsDict)
         {
             entry.Value.setIsSelected(false);
         }
         jobSelectionsInternal[currentPlayer] = typeEnum;
         panelsDict[typeEnum].setIsSelected(true);
     }
 }
Esempio n. 2
0
 /*
  * This function receives the initial job struct formed after the player
  * selected their initial business, and sets it too the current player.
  * it should be then updates as the game progresses.
  */
 public void setJobInfoSruct(JobPanel.JobInformation jobInfo)
 {
     jobInformationStruct = jobInfo;
     this.initialJob      = jobInfo.jobTypeEnum;
 }