Beispiel #1
0
        public Config GetConfig()
        {
            XmlElement root             = document[ROOT];
            String     message          = root[NODE_MESSAGE].InnerText;
            int        x                = int.Parse(root[NODE_X].InnerText);
            int        y                = int.Parse(root[NODE_Y].InnerText);
            int        victoryCondition = int.Parse(root[NODE_VICTORY_CONDITION].InnerText);

            FieldSize fieldSize = new FieldSize(x, y);
            Config    config    = new Config(fieldSize, victoryCondition, message);

            return(config);
        }
Beispiel #2
0
 public Config(FieldSize fieldSize, int victoryCondition, String message)
 {
     FieldSize        = fieldSize;
     VictoryCondition = victoryCondition;
     Message          = message;
 }