コード例 #1
0
ファイル: GoBoardTests.cs プロジェクト: Hdbcoding/GoGame
        public void AnySizeGoGame()
        {
            //arrange
            GoBoard testgame = new GoBoard(5);
            Coordinate location = new Coordinate(6, 6);
            Space expected = Space.Forbidden;

            //act
            Space actual = testgame.getSpace(location);

            //assert
            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
ファイル: GoBoardTests.cs プロジェクト: Hdbcoding/GoGame
        public void edgeClusterCapture()
        {
            //arrange
            GoBoard testgame = new GoBoard(5);
            testgame.addPiece(new Coordinate(3, 3), Space.Black);
            testgame.addPiece(new Coordinate(4, 2), Space.White);
            testgame.addPiece(new Coordinate(4, 3), Space.Black);
            testgame.addPiece(new Coordinate(3, 2), Space.White);
            testgame.addPiece(new Coordinate(2, 2), Space.Black);
            testgame.addPiece(new Coordinate(2, 1), Space.White);
            testgame.addPiece(new Coordinate(3, 1), Space.Black);
            testgame.addPiece(new Coordinate(4, 1), Space.White);
            testgame.addPiece(new Coordinate(5, 2), Space.Black);
            testgame.addPiece(new Coordinate(5, 1), Space.White);
            testgame.addPiece(new Coordinate(3, 1), Space.Black);

            Coordinate location = new Coordinate(4, 1);
            Space expected = Space.Empty;

            //act
            Space actual = testgame.getSpace(location);

            //assert
            Assert.AreEqual(expected, actual);
        }