public boolean isLegalMoveTwo(int pieceNumber){
		
		if (board[pieceNumber].getPieceType()==1 || board[pieceNumber].getPieceType()==2){
			
			if (board[pieceNumber].getX()==(BOARDSIZE-board[pieceNumber].getLength()+1))
				return false;
		}
		
		else{
			if (board[pieceNumber].getY()==(BOARDSIZE-board[pieceNumber].getLength()+1))
				return false;
		}
		int position = board[pieceNumber].getPositions()[board[pieceNumber].getPositions().length-1];
		if (board[pieceNumber].getPieceType()==1 || board[pieceNumber].getPieceType()==2){
			
		
		if (positions.contains(position+1))
			return false;
		}
		else{
			if (positions.contains(position+BOARDSIZE))
				return false;
		}
		return true;
	}