package chessGame;

public class Rook extends ChessPiece {

	/**
	 * 
	 * @param id
	 */
	public Rook(String id) {
		// TODO - implement Rook.Rook
		throw new UnsupportedOperationException();
	}

	/**
	 * 
	 * @param move
	 */
	public boolean moveIsAvailable(String move) {
		// TODO - implement Rook.moveIsAvailable
		throw new UnsupportedOperationException();
		
		if .....means possible to move there
		//a1a2 vertical move
		(int)position.charAt(0)==(int)move.charAt(1)
		//a1b1 horizontal move
		(int)position.charAt(1)==(int)move.charAt(2)
			if no obstacles //check any chessPiece in the way
				//vertice
				if((int)position.charAt(1)-(int)move.charAt(2)>0)
					int k=(int)position.charAt(1)-(int)move.charAt(2);
					for(int i=0;i<k;i++)
						.getChessPiece(nearest position);//need to implement in chessMonitoringSystem
				
				
			
			else
				//obstacles in halfway
		
				
		else
			return false;
			
			
		
		
		
		
	}

}
@@ -385,72 +385,414 @@
 %0D%0A%09%09
-if .....means possible to move there
+//a1a2 vertical move%0D%0A%09%09if((int)position.charAt(0)==(int)move.charAt(1))%0D%0A%09%09%09if((int)position.charAt(1)-(int)move.charAt(2)%3E0)%0D%0A%09%09%09%09int k=(int)position.charAt(1)-(int)move.charAt(2);%0D%0A%09%09%09%09for(int i=0;i%3Ck;i++)%0D%0A%09%09%09%09%09.getChessPiece(nearest position);//need to implement in chessMonitoringSystem
 %0D%0A%09%09
+%09
+%09
 //
-a1a2 vertical move%0D%0A%09%09
+compare whether you can move there%0D%0A%09%09%09else if ((int)position.charAt(1)-(int)move.charAt(2)%3C0)%0D%0A%09%09%09%09int k=
 (int
@@ -800,36 +800,35 @@
 position.charAt(
-0)==
+2)-
 (int)move.charAt
@@ -830,16 +830,228 @@
 harAt(1)
+;%0D%0A%09%09%09%09for(int i=0;i%3Ck;i++)%0D%0A%09%09%09%09%09.getChessPiece(nearest position);//need to implement in chessMonitoringSystem%0D%0A%09%09%09%09//compare whether you can move there%0D%0A%09%09%09else// dont move the chessPiece%0D%0A%09%09%09%09return false;%0D%0A%09%09
 %0D%0A%09%09//a1
@@ -1072,16 +1072,19 @@
 move%0D%0A%09%09
+if(
 (int)pos
@@ -1123,85 +1123,284 @@
 t(2)
+)
 %0D%0A%09%09%09if
- no obstacles //check any chessPiece in the way%0D%0A%09%09%09%09//vertic
+((int)position.charAt(0)-(int)move.charAt(1)%3E0)%0D%0A%09%09%09%09int k=(int)position.charAt(0)-(int)move.charAt(1);%0D%0A%09%09%09%09for(int i=0;i%3Ck;i++)%0D%0A%09%09%09%09%09.getChessPiece(nearest position);//need to implement in chessMonitoringSystem%0D%0A%09%09%09%09//compare whether you can move ther
 e%0D%0A%09%09%09
-%09
+else 
 if
+ 
 ((in
@@ -1409,33 +1409,33 @@
 position.charAt(
-1
+0
 )-(int)move.char
@@ -1437,24 +1437,23 @@
 .charAt(
-2)%3E
+1)%3C
 0)%0D%0A
-%09
 %09%09%09%09int 
@@ -1495,22 +1495,21 @@
 .charAt(
-2
+0
 );%0D%0A
-%09
 %09%09%09%09for(
@@ -1522,25 +1522,24 @@
 0;i%3Ck;i++)%0D%0A
-%09
 %09%09%09%09%09.getChe
@@ -1618,66 +1618,101 @@
 %09%09%09%09
-%0D%0A%09%09%09%09%0D%0A%09%09%09%0D%0A%09%09%09else%0D%0A%09%09%09%09//obstacles in halfway%0D%0A%09%09%0D%0A%09%09%09%09
+//compare whether you can move there%0D%0A%09%09%09else// dont move the chessPiece%0D%0A%09%09%09%09return false;%0D%0A
 %0D%0A%09%09
@@ -1768,8 +1768,10 @@
 %0A%09%7D%0D%0A%0D%0A%7D
+%0D%0A

Update Rook.java