Exemplo n.º 1
0
        /// <summary>
        /// Add a fruiton to currently selected team.
        /// </summary>
        /// <param name="fruiton">fruiton to add</param>
        /// <param name="position">position in team where the fruiton should be added</param>
        private void AddFruitonToTeam(Fruiton fruiton, Position position)
        {
            FridgeFruiton fridgeFruiton = dbFridgeMapping[fruiton.dbId];

            fridgeFruiton.Count--;
            var team = teams[selectedTeamIndex].KernelTeam;

            team.FruitonIDs.Add(fruiton.dbId);
            team.Positions.Add(position);
            MyTeamGrid.AddFruitonAt(fruiton, position);
        }
Exemplo n.º 2
0
 private void AddFruitonToTeam(KFruiton fruiton, Position position, FruitonTeam team)
 {
     if (isMyTurnToDraft)
     {
         FridgeFruiton fridgeFruiton = dbFridgeMapping[fruiton.dbId];
         fridgeFruiton.Count--;
         team.FruitonIDs.Add(fruiton.dbId);
         team.Positions.Add(position);
         MyTeamGrid.AddFruitonAt(fruiton, position);
         draftHandler.SendDraftResponse(fruiton.dbId);
     }
 }