static void Main(string[] args) { string file = "../../resources/TicGameConfig.xml"; TicGameFactory factory = new TicGameFactory(); TicGame game = factory.CreateTicGame(file); game.PlayGame(); }
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); }