Esempio n. 1
0
        static void Main(string[] args)
        {
            string         file    = "../../resources/TicGameConfig.xml";
            TicGameFactory factory = new TicGameFactory();
            TicGame        game    = factory.CreateTicGame(file);

            game.PlayGame();
        }
Esempio n. 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);
        }