@Test
    public void connectedToCapitalTest() {
        Board g = new Board(5, 5);
        g.buildings[0][1] = new Building(g.player1);
        g.buildings[0][2] = new Building(g.player1);

        g.buildings[1][0] = new Building(g.player2);
        g.buildings[2][0] = new Building(g.player1);

        g.buildings[3][3] = new Building(g.player1);

        assertTrue(g.isConnectedToCapital(0, 0, g.player1));

        assertTrue(g.isConnectedToCapital(0, 1, g.player1));
        assertTrue(g.isConnectedToCapital(0, 2, g.player1));
        assertTrue(g.isConnectedToCapital(0, 3, g.player1));

        assertTrue(g.isConnectedToCapital(1, 0, g.player1));
        assertFalse(g.isConnectedToCapital(2, 0, g.player1));

        assertFalse(g.isConnectedToCapital(3, 3, g.player1));

        assertFalse(g.isConnectedToCapital(4, 4, g.player1));
    }