Index: src/com/example/helloandroid/Fleet.java
===================================================================
--- src/com/example/helloandroid/Fleet.java	(revision 61c4fbcbb69a721f2e7174dffd017c29e9a313ac)
+++ src/com/example/helloandroid/Fleet.java	(revision 0986844f4e8b2ecccc99b54c455ed44b994ff7e1)
@@ -19,25 +19,25 @@
 	private int faction;
 	private boolean isNextToAPlanet;
-	private boolean dirChanged;
-	
+	private boolean dirChanged, isClockwise;
+
 	/* Optimising: pre-calculate paths */
 	public Fleet(Planet source, Planet destination, int numShips, int faction) {
 		//Calculate initial coordinates and direction 
 		if((destination.getX() - source.getX()) != 0){
-		//line formula 
-		slope = getSlope(source.getX(),source.getY(),destination.getX(),destination.getY());
-		
-		xIntercept = destination.getY() - (slope*destination.getX());
-		
-		//direction
-		direction = Math.atan(slope);
-		
-		//coordinates for all 4 coordinates
-		if((destination.getX() - source.getX()) < 0 )
-			direction += Math.PI;
-		
-		dblX = ((Math.cos(direction)*(source.radius + 10) + source.getX()));
-		dblY = ((Math.sin(direction)*(source.radius + 10) + source.getY()));
-		
+			//line formula 
+			slope = getSlope(source.getX(),source.getY(),destination.getX(),destination.getY());
+		
+			xIntercept = destination.getY() - (slope*destination.getX());
+
+			//direction
+			direction = Math.atan(slope);
+
+			//coordinates for all 4 coordinates
+			if((destination.getX() - source.getX()) < 0 )
+				direction += Math.PI;
+
+			dblX = ((Math.cos(direction)*(source.radius + 10) + source.getX()));
+			dblY = ((Math.sin(direction)*(source.radius + 10) + source.getY()));
+
 		} else {
 			if((destination.getY() - source.getY()) > 0 ){
@@ -50,9 +50,10 @@
 				dblY = source.getY() - source.radius - 10;
 			}
+			xIntercept = destination.getX();
 		}
-		
+
 		x = (int)dblX;
 		y = (int)dblY;
-		
+
 		this.numShips = numShips;
 		this.faction = faction;
@@ -61,6 +62,6 @@
 		dirChanged = false;
 	}
-	
-		
+
+
 	public int getX() {
 		return x;
@@ -144,4 +145,5 @@
 		p.lineTo((float)(x+5*Math.cos(direction+Math.PI/2)), (float)(y+5*Math.sin(direction+Math.PI/2)));
 		
+		
 		canvas.drawPath(p, linePaint);
 	}
@@ -149,5 +151,5 @@
 	public void update(ArrayList<Planet> planets) {
 		int speed = 1; //pixels per move
-		double distance, tangentDirection;
+		double distance, tangentDirection, angle;
 		Planet temp = null;
 		//is the ship going around a planet already
@@ -167,22 +169,31 @@
 				dblY += (Math.sin(direction)*speed);
 				dblX += (Math.cos(direction)*speed);
-				
+
 				x = (int)dblX;
 				y = (int)dblY;
 			}else {				
 				double radAngle = Math.atan(getSlope(temp.getX(), temp.getY(), dblX, dblY));
+				//figure out which way to go clockwise or counter clockwise 
+				tangentDirection = (Math.atan(getSlope(temp.getX(),temp.getY(),dblX,dblY))) + (Math.PI/2);
+				angle = Math.atan((Math.tan(tangentDirection) - Math.tan(direction))/(1 + Math.tan(tangentDirection)*Math.tan(direction)));
+				if (angle <= Math.PI/2)
+					angle = Math.PI - angle;
 				
 				if(dblX < temp.getX())
 					radAngle += Math.PI;
 				
-				double angle = radAngle + Math.PI/2;
+				angle = radAngle + Math.PI/2;
 				
 				double diff = direction-angle;
 				
+				if(diff > 0)
+					isClockwise = false;
+				else
+					isClockwise = true;
 				if(Math.abs(diff)>Math.PI/2)
 					direction = angle-Math.PI;
 				else
 					direction = angle;
-				
+					
 				dirChanged = true;
 				
@@ -198,10 +209,23 @@
 			//if so set isNextToAPlanet to false and move 
 			//otherwise continue moving along the circumferenceds4
-		
+			
+			
+			if(true){
+				
+			} else {
+				angle = speed/temp.radius;
+				if(isClockwise){
+					dblX = ((Math.cos(direction + (Math.PI/2) - angle)*(temp.radius) + temp.getX()));
+					dblY = ((Math.sin(direction + (Math.PI/2) - angle)*(temp.radius) + temp.getY()));
+					direction = direction - (Math.PI/2);
+				} else {
+					dblX = ((Math.cos(direction - (Math.PI/2) + angle)*(temp.radius) + temp.getX()));
+					dblY = ((Math.sin(direction - (Math.PI/2) + angle)*(temp.radius) + temp.getY()));
+					direction = direction + (Math.PI/2);
+				}
+			}
 		}
-		
-		
-	}
-	
+	}
+
 	// attack the destination planet
 	//after the method is called the fleet needs to removed
@@ -214,10 +238,10 @@
 		}
 	}
-	
+
 	//helper functions
 	private double getDistanceBetween(double x1, double y1, double x2, double y2) {
 		return Math.sqrt(Math.pow((x2 - x1),2) + Math.pow((y2 - y1),2));
 	}
-	
+
 	private double getSlope(double x1, double y1, double x2, double y2) {
 		return ((y2 - y1)/(double)(x2 - x1));
