public void TestFindFourTokenConnectionPossibilties() { //setup the initial condition var player1 = "Player 1"; var player2 = "Player 2"; var game = new GameCore(player1, player2); var board = game.Board; board[0][0].OwningPlayer = player1; board[1][0].OwningPlayer = player2; board[4][0].OwningPlayer = player1; board[4][1].OwningPlayer = player1; board[5][0].OwningPlayer = player1; board[5][1].OwningPlayer = player2; List <TileConnection> conns = AIHelper.FindFourTokenConnectionPossibilties(board, player1); //Around 0,0 Assert.AreEqual("[0,0] - [0,3]", conns[0].ToString()); //vert Assert.AreEqual("[0,0] - [3,3]", conns[1].ToString()); //+diag //Around 4,0 //Assert.AreEqual("[4,0] - [4,3]", conns[2].ToString()); //vert subset of [4,0] - [4,4] //Assert.AreEqual("[2,0] - [6,0]", conns[2].ToString()); //horiz dup of [2,0] - [6,0] around 5,0 Assert.AreEqual("[1,3] - [4,0]", conns[2].ToString()); //-diag //Around 4,1 Assert.AreEqual("[4,0] - [4,4]", conns[3].ToString()); //vert Assert.AreEqual("[1,1] - [4,1]", conns[4].ToString()); //horiz Assert.AreEqual("[3,0] - [6,3]", conns[5].ToString()); //+diag Assert.AreEqual("[1,4] - [5,0]", conns[6].ToString()); //-diag //Around 5,0 Assert.AreEqual("[2,0] - [6,0]", conns[7].ToString()); //Assert.AreEqual("[2,3] - [5,0]", conns[10].ToString()); //-diag subset of [1,4] - [5,0] Assert.AreEqual(8, conns.Count); }