public void CPreZeroTest() { var arena = new Arena(); arena.AddPlayerZeroNode(0); arena.AddPlayerOneNode(1); arena.AddPlayerZeroNode(2); arena.AddEdge(0, 1); arena.AddEdge(1, 2); arena.AddEdge(1, 1); arena.AddEdge(2, 0); var zeroSet = new HashSet <int>(); zeroSet.Add(0); var twoSet = new HashSet <int>(); twoSet.Add(2); var twoZeroSet = new HashSet <int>(); twoZeroSet.Add(0); twoZeroSet.Add(2); Assert.IsTrue(arena.CPreZero(twoSet).getWinningRegion().Count == 0); Assert.IsTrue(arena.CPreZero(twoZeroSet).getWinningRegion().Count == 1 && arena.CPreZero(twoZeroSet).getWinningRegion().Contains(2)); }
public void CPreZeroTest() { var arena = new Arena(); arena.AddPlayerZeroNode(0); arena.AddPlayerOneNode(1); arena.AddPlayerZeroNode(2); arena.AddEdge(0, 1); arena.AddEdge(1, 2); arena.AddEdge(1, 1); arena.AddEdge(2, 0); var zeroSet = new HashSet<int>(); zeroSet.Add(0); var twoSet = new HashSet<int>(); twoSet.Add(2); var twoZeroSet = new HashSet<int>(); twoZeroSet.Add(0); twoZeroSet.Add(2); Assert.IsTrue(arena.CPreZero(twoSet).getWinningRegion().Count == 0); Assert.IsTrue(arena.CPreZero(twoZeroSet).getWinningRegion().Count == 1 && arena.CPreZero(twoZeroSet).getWinningRegion().Contains(2)); }