public ArrayList<Point> validMove(Point p){
		ArrayList<Point> validMoves = new ArrayList<Point>();
		Piece piece = b.get(p);
		
		
		for(int i = 1; i <= 8; i++){
			for(int j = 1; j<= 8; j++){
				Piece p2 = b.get(new Point(i,j));
				if((p2 == null && piece.pieceMovement(p, new Point(i,j)) ||
						(validTake(p, new Point(i,j)))) && 
						!isKingInCheck() && checkIfPathIsClear(p, new Point(i,j))){
					validMoves.add(new Point(i, j));
				//	System.out.println(p + " " + i + " " + j );
				}
			}
		}
		return validMoves;
	}