<commit_before>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;
			
			
		
		
		<commit_msg>Update Rook.java<commit_after>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();
		
		//a1a2 vertical move
		if((int)position.charAt(0)==(int)move.charAt(1))
			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
				//compare whether you can move there
			else if ((int)position.charAt(1)-(int)move.charAt(2)<0)
				int k=(int)position.charAt(2)-(int)move.charAt(1);
				for(int i=0;i<k;i++)
					.getChessPiece(nearest position);//need to implement in chessMonitoringSystem
				//compare whether you can move there
			else// dont move the chessPiece
				return false;
		
		//a1b1 horizontal move
		if((int)position.charAt(1)==(int)move.charAt(2))
			if((int)position.charAt(0)-(int)move.charAt(1)>0)
				int k=(int)position.charAt(0)-(int)move.charAt(1);
				for(int i=0;i<k;i++)
					.getChessPiece(nearest position);//need to implement in chessMonitoringSystem
				//compare whether you can move there
			else if ((int)position.charAt(0)-(int)move.charAt(1)<0)
				int k=(int)position.charAt(1)-(int)move.charAt(0);
				for(int i=0;i<k;i++)
					.getChessPiece(nearest position);//need to implement in chessMonitoringSystem
				//compare whether you can move there
			else// dont move the chessPiece
				return false;

		else
			return false;
			
			
		
		
		
{'fraction_non_alphanumeric': 0.1400445765230312, 'fraction_numerical': 0.017087667161961365, 'mean_word_length': 3.329581993569132, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4532581', 'n_tokens_mistral': 1136, 'n_tokens_neox': 921, 'n_words': 200}