private void initializeBoard(int bl, int wa, int pi) {
        // Put the blocks on the board.
        int k= 0;
        // invariant: k blocks have been added.
        while (k < bl) {
            int xx = JManApp.rand(0, width-1);
            int yy = JManApp.rand(0, height-1);
            if(isEmpty(xx, yy)) {
                placePiece(Piece.BLOCK, xx, yy);
                k= k+1;
            }
        }
        
        // Put the walkers on the board.
        k= 0;
        // invariant: k walkers have been added.
        while (k < wa) {
            int xx = JManApp.rand(0, width-1);
            int yy = JManApp.rand(0, height-1);
            if(isEmpty(xx, yy)){
                placePiece(Piece.WALKER, xx, yy);
                k= k+1;
            }
        }
        
        // Put the pillars on the board.
        k= 0;
        // invariant: k pillars have been added.
        while(k < pi) {
            int xx = JManApp.rand(0, width-1);
            int yy = JManApp.rand(0, height-1);
            if(isEmpty(xx, yy)) {
                placePiece(Piece.PILLAR, xx, yy);
                k= k+1;
            }
        }
    }