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); }
public Config(FieldSize fieldSize, int victoryCondition, String message) { FieldSize = fieldSize; VictoryCondition = victoryCondition; Message = message; }