Exemplo n.º 1
0
        private Bracket AtLeastOne(List <Variable> pVariables)
        {
            var formular = new Bracket();

            for (int i = 0; i < pVariables.Count; i++)
            {
                var variable1 = pVariables[i];

                if (i > 0)
                {
                    formular.Add(_or);
                }

                formular.Add(variable1);
            }

            return(formular);
        }
        private static Bracket InTheBeginningStartState()
        {
            Bracket formula = new Bracket();

            formula.Add(new Bracket()
            {
                new Variable("Q0,0")
            });

            return(formula);
        }
        private static Bracket HeadInTheBeginningAtTheStart()
        {
            Bracket formula = new Bracket();

            formula.Add(new Bracket()
            {
                new Variable("H0,0")
            });

            return(formula);
        }
Exemplo n.º 4
0
 private static void Compare(int start,
                             int count,
                             int scoreIndex,
                             int tier)
 {
     for (int i = start; i < count; i += 2)
     {
         if (Bracket[i].Score > Bracket[i + 1].Score)
         {
             int  playerIndex = Bracket[i].PlayerIndex;
             Game game        = new Game()
             {
                 Name        = Bracket[i].Name,
                 PlayerIndex = playerIndex,
                 Score       = Players[playerIndex].Scores[scoreIndex],
                 Tier        = tier
             };
             Bracket.Add(game);
             if (i == TIER_3_START || i == TIER_3_END)
             {
                 SecondPlace = Bracket[i + 1].Name;
             }
         }
         else
         {
             int  playerIndex = Bracket[i + 1].PlayerIndex;
             Game game        = new Game()
             {
                 Name        = Bracket[i + 1].Name,
                 PlayerIndex = playerIndex,
                 Score       = Players[playerIndex].Scores[scoreIndex],
                 Tier        = tier
             };
             Bracket.Add(game);
             if (i == TIER_3_START || i == TIER_3_END)
             {
                 SecondPlace = Bracket[i].Name;
             }
         }
     }
 }