public void getAllValidMoves(King king, BoardSquare[][] squares, int boardRows, int boardColumns){
		getValidMoves().removeAllElements(); // clears current entries
		for(int potentialRow=0; potentialRow<boardRows; potentialRow++){
			for(int potentialColumn=0; potentialColumn<boardColumns; potentialColumn++){
				if(squares[potentialRow][potentialColumn].getPlayer() == getPlayer() || (potentialRow==getRow() && potentialColumn==getColumn())){ // if no movement or if end location is same color as this piece
					continue;
				}
				boolean valid = checkValidMove(potentialRow, potentialColumn, squares); // true if it can move to i,j
				int startR = 0;
				int startC = 0;
				ChessPiece tempPiece = null;
				ChessPiece endPiece = null;
				if(valid == true){
					startR = getRow();
					startC = getColumn();
					endPiece = move(potentialRow, potentialColumn, squares); // makes move to check for self check
					squares[startR][startC].setPiece(null);
					tempPiece = king.selfCheck(squares, boardRows, boardColumns); //checks for selfcheck
					move(startR, startC, squares); // moves piece back to original square
					squares[potentialRow][potentialColumn].setPiece(endPiece);
				}
				
				if(valid == true && tempPiece == null){ //valid move and didnt put self in check
					getValidMoves().addElement(new Point(potentialRow,potentialColumn)); //adds to valid moves vector
				}
			}
		}
	}