Ejemplo n.º 1
0
        public bool StartGame()
        {
            factorTypes = new FactorTypes();
            factors     = new List <Factor>();
            resources   = new Factor();
            hero        = new Hero()
            {
                position = new Position()
                {
                    xValue = 0
                }
            };
            outputLines = new List <string>();

            try
            {
                setGameModel();
                playGame();
                return(true);
            }
            catch (Exception ex)
            {
                outputLines.Add("Error: " + ex.Message);
                outputLines.Add("Inner Exception: " + ex.InnerException);
                return(false);
            }
        }
Ejemplo n.º 2
0
 public OptionalFactor(OptionalType type, string postiveanswer, string negativeanswer)
 {
     TypeOfFactor   = FactorTypes.Optional;
     TypeOfOptional = type;
     Positive       = postiveanswer;
     Negative       = negativeanswer;
 }
Ejemplo n.º 3
0
 public QuantitativeFactor(QuantitativeType type, string measurement)
 {
     TypeOfFactor       = FactorTypes.Quantitative;
     TypeOfQuantitative = type;
     Measurement        = measurement;
 }
 public BracketFactor(BracketType type, Dictionary <string, string> brackets)
 {
     TypeOfFactor  = FactorTypes.Bracket;
     TypeOfBracket = type;
     _brackets     = brackets;
 }