public void LoadBoard(BladesOfSteelPlayerItem thisPlayer)
 {
     PlayerCategory = thisPlayer.PlayerCategory;
     HandList       = thisPlayer.DefenseList;
     Maximum        = 3;
     AutoSelect     = HandObservable <RegularSimpleCard> .EnumAutoType.None;
     Text           = thisPlayer.NickName + " Defense";
 }
 public void LoadBoard(BladesOfSteelPlayerItem thisPlayer)
 {
     PlayerCategory = thisPlayer.PlayerCategory;
     HandList       = thisPlayer.AttackList;
     Maximum        = 3;
     AutoSelect     = EnumAutoType.None;
     Text           = thisPlayer.NickName + " Attack";
 }
Ejemplo n.º 3
0
        public bool CanAddDefenseCards(ICustomBasicList <RegularSimpleCard> thisList)
        {
            if (_gameContainer.GetAttackStage == null)
            {
                throw new BasicBlankException("Nobody is handling the getattackstage.  Rethink");
            }
            if (_gameContainer.GetDefenseStage == null)
            {
                throw new BasicBlankException("Nobody is handling the getdefensestage.  Rethink");
            }
            BladesOfSteelPlayerItem thisPlayer = _gameContainer.PlayerList !.GetWhoPlayer();
            var attackStage = _gameContainer.GetAttackStage(thisPlayer.AttackList);

            if (attackStage == EnumAttackGroup.GreatOne)
            {
                return(false);
            }
            var defenseStage = _gameContainer.GetDefenseStage(thisList);

            if (defenseStage == EnumDefenseGroup.StarGoalie)
            {
                return(true);
            }
            if ((int)defenseStage > (int)attackStage)
            {
                return(true);
            }
            if ((int)attackStage > (int)defenseStage)
            {
                return(false);
            }
            int attackPoints  = thisPlayer.AttackList.Sum(items => (int)items.Value);
            int defensePoints = thisList.Sum(items => (int)items.Value);

            return(defensePoints >= attackPoints);
        }