src/main/java/com/webcheckers/model/CheckerBoard.java
public ArrayList<Piece> makeWhitePlayerPiece(){
        ArrayList<Piece> whitePlayerPiece = new ArrayList<>();
        ArrayList<Row> RowIterator = boardView.iterator();
        for(int row=5; row < 8; row++){
            List<Space> AllSpace = RowIterator.get(row).iterator();
            for(int col = 0; col<8;col++){
                if(AllSpace.get(col).isValid()){
                    Piece newPiece = new Piece(row,col,false, whitePLayer);
                    boardView.iterator().get(row).iterator().get(col).addPiece(newPiece);
                    whitePlayerPiece.add(newPiece);
                }
            }

        }
        whitePLayer.setPiece(whitePlayerPiece);
        return whitePlayerPiece;
    }
/**
     * Initialize all the pieces for whitePlayer
     */
Initialize all the pieces for whitePlayer
Initialize all the pieces for whitePlayer
public ArrayList<Piece> makeWhitePlayerPiece(){
        ArrayList<Piece> whitePlayerPiece = new ArrayList<>();
        ArrayList<Row> RowIterator = boardView.iterator();
        for(int row=5; row < 8; row++){
            List<Space> AllSpace = RowIterator.get(row).iterator();
            for(int col = 0; col<8;col++){
                if(AllSpace.get(col).isValid()){
                    Piece newPiece = new Piece(row,col,false, whitePLayer);
                    boardView.iterator().get(row).iterator().get(col).addPiece(newPiece);
                    whitePlayerPiece.add(newPiece);
                }
            }
        }
        whitePLayer.setPiece(whitePlayerPiece);
        return whitePlayerPiece;
    }
public ArrayList < Piece > makeWhitePlayerPiece ( ) { ArrayList < Piece > whitePlayerPiece = new ArrayList < > ( ) ; ArrayList < Row > RowIterator = boardView . iterator ( ) ; for ( int row = 5 ; row < 8 ; row ++ ) { List < Space > AllSpace = RowIterator . get ( row ) . iterator ( ) ; for ( int col = 0 ; col < 8 ; col ++ ) { if ( AllSpace . get ( col ) . isValid ( ) ) { Piece newPiece = new Piece ( row , col , false , whitePLayer ) ; boardView . iterator ( ) . get ( row ) . iterator ( ) . get ( col ) . addPiece ( newPiece ) ; whitePlayerPiece . add ( newPiece ) ; } } } whitePLayer . setPiece ( whitePlayerPiece ) ; return whitePlayerPiece ; }
Initialize all the pieces for whitePlayer
Initialize all the pieces for whitePlayer