Ejemplo n.º 1
0
        public void VerticalWins()
        {
            var boardState = new Dictionary <Cell, Color>();

            boardState[Cell(1, 1)] = Color.Red;
            boardState[Cell(1, 2)] = Color.Red;
            boardState[Cell(1, 3)] = Color.Red;
            boardState[Cell(1, 4)] = Color.Red;

            boardState[Cell(2, 1)] = Color.Yellow;
            boardState[Cell(2, 2)] = Color.Yellow;
            boardState[Cell(2, 3)] = Color.Yellow;

            TestReferee.Horizontal(boardState, Cell(1, 1));
            TestReferee.Horizontal(boardState, Cell(1, 2));
            TestReferee.Horizontal(boardState, Cell(1, 3));
            TestReferee.Horizontal(boardState, Cell(1, 4));
        }
Ejemplo n.º 2
0
        public void HorizontalWins()
        {
            var boardState = new Dictionary <Cell, Color>();

            boardState[Cell(1, 1)] = Color.Red;
            boardState[Cell(2, 1)] = Color.Red;
            boardState[Cell(3, 1)] = Color.Red;
            boardState[Cell(4, 1)] = Color.Red;

            boardState[Cell(1, 2)] = Color.Yellow;
            boardState[Cell(2, 2)] = Color.Yellow;
            boardState[Cell(3, 2)] = Color.Yellow;

            //	Sending different Cells for it to test against forces the verification to assume
            //	that particular last move.  So rather than just checking from one end to the other,
            //	it takes the move played and looks to the left and then to the right (if necessary)
            TestReferee.Horizontal(boardState, Cell(1, 1));
            TestReferee.Horizontal(boardState, Cell(2, 1));
            TestReferee.Horizontal(boardState, Cell(3, 1));
            TestReferee.Horizontal(boardState, Cell(4, 1));
        }