Пример #1
0
        static void Main(string[] args)
        {
            string         file    = "../../resources/TicGameConfig.xml";
            TicGameFactory factory = new TicGameFactory();
            TicGame        game    = factory.CreateTicGame(file);

            game.PlayGame();
        }
Пример #2
0
        public TicGame CreateTicGame(string file)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(TicGame));

            StreamReader reader = new StreamReader(file);
            TicGame      game   = (TicGame)serializer.Deserialize(reader);

            reader.Close();

            return(game);
        }