Exemplo n.º 1
0
 void toSubmitSignal(resourceCard card)
 {
     if (card.toSubmitSignal == 1)            //if player1 send his card1 to the team
     {
         teamMemberSignal++;
         if (teamMemberSignal == 1)
         {
             teamMember1 = card;
         }
         if (teamMemberSignal == 2)
         {
             teamMember2 = card;
         }
         if (teamMemberSignal == 3)
         {
             teamMember3 = card;
         }
         if (teamMemberSignal == 4)
         {
             print("Warning! The number of team member is more than required");
             teamMemberSignal = 3;
             check            = 1;
         }
     }
 }
Exemplo n.º 2
0
 // this function is used to compare that if one of the teamMember has the function same with the win condition
 void  compare(resourceCard teamMember, MapCard map)
 {
     if (teamMember.function1 == map.winCondition1)
     {
         if (winCondition1Signal == 0)          // this kind of signal is to avoid the re-calculate of the match number, when there is more than one function of the same kind
         {
             matchNum++;
             winCondition1Signal = 1;
         }
     }
     if (teamMember.function1 == map.winCondition2)
     {
         if (winCondition2Signal == 0)
         {
             matchNum++;
             winCondition2Signal = 1;
         }
     }
     if (teamMember.function1 == map.winCondition3)
     {
         if (winCondition3Signal == 0)
         {
             matchNum++;
             winCondition3Signal = 1;
         }
     }
     // function 2 of the team member
     if (teamMember.function2 == map.winCondition1)
     {
         if (winCondition1Signal == 0)
         {
             matchNum++;
             winCondition1Signal = 1;
         }
     }
     if (teamMember.function2 == map.winCondition2)
     {
         if (winCondition2Signal == 0)
         {
             matchNum++;
             winCondition2Signal = 1;
         }
     }
     if (teamMember.function2 == map.winCondition3)
     {
         if (winCondition3Signal == 0)
         {
             matchNum++;
             winCondition3Signal = 1;
         }
     }
 }
Exemplo n.º 3
0
 //give that card to that place
 void drawCard(resourceCard card)
 {
     card = GameSetup.resourceCardArray[whichResourceCard];
     whichResourceCard++;
 }