* @Post: no changes
	 * @Return: whether or not this point is under attack by an enemy rook or queen (by line) 
	 */
	private boolean lineCanAttack(Point pointToCheck)
	{
		ArrayList<Point> directions=new ArrayList<Point>();
		//adds the 4 line directions to the list
		directions.add(new Point(0,1));
		directions.add(new Point(0,-1));
		directions.add(new Point(1,0));
		directions.add(new Point(-1,0));

		//iterates through each direction and sees if an enemy rook or queen is in the way
		for(Point direction : directions)
		{
			boolean keepGoing = true;
			Piece endPiece=null;
			Point mightHavePiece=new Point(pointToCheck.x+direction.x,pointToCheck.y+direction.y);

			while (endPiece==null&&keepGoing)
			{
				if(!myBoard.isOnBoard(mightHavePiece))
				{
					keepGoing=false;//if the point isn't on the board, we shouldn't keep going
				}else
				{
					endPiece=myBoard.getPiece(mightHavePiece);
				}
				mightHavePiece.setLocation(mightHavePiece.x+direction.x, mightHavePiece.y+direction.y);
			}
			//if the endPiece exists, and it is either a bishop or a queen, and it has opposite color, then it can attack this square. Return true
			if(endPiece!=null&&(endPiece instanceof Rook ||endPiece instanceof Queen)&&endPiece.isWhite!=this.isWhitesTurn())
			{
				return true;
			}


		}
		return false;//nothing diagonal could attack, so return false
	}