예제 #1
1
        public static Game Load(System.IO.Stream stream, Action<string> paint)
        {
            var old = _singleton;
            _singleton = serializer.ReadObject(stream) as Game;
            //not supper happy about these but hard to serialize wihtout a bunch of redundancy.
            _singleton.Painter = paint;
            _singleton.AdvanceToCurrent();
            _singleton._graph.Players = _singleton._players;
            
            //need better way to end old game.
            old.Kill();

            _singleton.Paint();

            return _singleton;
        }
예제 #2
0
 public static Game NewGame(Action<string> paint)
 {
    _singleton = new Game(paint);
     return _singleton;
 }