Exemplo n.º 1
0
        internal static void TestWrite()
        {
            ColorCounter c1 = new ColorCounter();

            c1[Color.Red]++;
            ColorCounter c2 = new ColorCounter();

            c2[Color.Green]++;
            c2[Color.Blue]++;

            Player[] players =
            {
                new Player("Hans",  new CardStack(new Card[] { new Card(3, Color.Red),   new Card(6, Color.Red)  }), c1),
                new Player("Peter", new CardStack(new Card[] { new Card(2, Color.Green), new Card(7, Color.Blue) }), c2)
            };
            GameLog g = new GameLog(2, 3, players);

            g.Turns.Add(new Turn(0, 1, Color.Green,
                                 new Card[] {
                new Card(2, Color.Green),
                new Card(3, Color.Red)
            }));
            g.SaveLog();
        }
Exemplo n.º 2
0
 public static Replay LoadReplayFromLog(string path)
 {
     return(new Replay(GameLog.LoadLog(path)));
 }
Exemplo n.º 3
0
 public Replay(GameLog gameLog)
 {
     log = gameLog;
     GoToTurn(0);
 }