コード例 #1
0
ファイル: Program.cs プロジェクト: GSTU/oop-examples
        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);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: GSTU/oop-examples
 public Config(FieldSize fieldSize, int victoryCondition, String message)
 {
     FieldSize        = fieldSize;
     VictoryCondition = victoryCondition;
     Message          = message;
 }