public static boolean checkCellInDirection(Board board, int x, int y, DirectionX dirx, DirectionY diry) {
		boolean finished = false;
		int count = 0;
		Counter turn = board.getPosition(x, y);
		//Iterate check if the cell is connected
		while((count <= Game.WINCON) && !finished &&
				(x >= Board.MINWIDTH) && (y >= Board.MINHEIGHT) && 
				(x <= board.getWidth()) && (y <= board.getHeight()) &&
				(board.getPosition(x, y) == turn) && (board.getPosition(x, y) != Counter.EMPTY)){
			/**
			 * Change x and y according to the direction, to get the next cell
			 */
			x = x + Util.convertDirX(dirx);
			y = y + Util.convertDirY(diry);
			
			count++;			
		}		
		if (count >= Game.WINCON) {
			finished = true;
		} else {
			count = 0;
		}
		
		return finished;		
	}