user23997: I've written a function that heavily relies on the If / Else statement but I feel it's a very beginner way to achieve functionality. Are there any better ways to achieve the same functionality?
Code:
void jumpThree() // Update from left then right
{
  if (effectCounter[0] < tiles) // Right, first tile
  {
    Serial << flag[6] << "\t";
    Serial << newRed[0] << " " << newGreen[0] << " " << newBlue[0] << "\t";

    if (flag[6] == 1)
    {
      oldRed[0]   = (tileBuffer[effectCounter[0]] & 0xff0000) >> 16;
      oldGreen[0] = (tileBuffer[effectCounter[0]] & 0x00ff00) >> 8;
      oldBlue[0]  = (tileBuffer[effectCounter[0]] & 0x0000ff);

      Serial << effectCounter[0] << "\t";
    }

    else if (flag[6] == 0)
    {
      oldRed[0]   = (tileBuffer[6 - effectCounter[0]] & 0xff0000) >> 16;
      oldGreen[0] = (tileBuffer[6 - effectCounter[0]] & 0x00ff00) >> 8;
      oldBlue[0]  = (tileBuffer[6 - effectCounter[0]] & 0x0000ff);

      Serial << (6 - effectCounter[0]) << "\t";
    }

    Serial << oldRed[0] << " " << oldGreen[0] << " " << oldBlue[0] << endl;


    if ((newRed[0] - oldRed[0] != 0) || (newGreen[0] - oldGreen[0] != 0) || (newBlue[0] - oldBlue[0] != 0))
    {
      // Red difference
      if (newRed[0] - oldRed[0] > 0) // Positive red change
      {
        oldRed[0] ++;
      }
      else if (newRed[0] - oldRed[0] < 0) // Negative red change
      {
        oldRed[0] --;
      }

      // Green difference
      if (newGreen[0] - oldGreen[0] > 0) // Positive green change
      {
        oldGreen[0] ++;
      }
      else if (newGreen[0] - oldGreen[0] < 0) // Negative green change
      {
        oldGreen[0] --;
      }

      // Blue difference
      if (newBlue[0] - oldBlue[0] > 0) // Positive blue change
      {
        oldBlue[0] ++;
      }
      else if (newBlue[0] - oldBlue[0] < 0) // Negative blue change
      {
        oldBlue[0] --;
      }

      if (flag[6] == 1)
      {
        tileBuffer[effectCounter[0]] = tile.Colour(oldRed[0], oldGreen[0], oldBlue[0]);
      }

      else if (flag[6] == 0)
      {
        tileBuffer[6 - effectCounter[0]] = tile.Colour(oldRed[0], oldGreen[0], oldBlue[0]);
      }

      // tileBuffer[effectCounter[0]] = tile.Colour(oldRed[0], oldGreen[0], oldBlue[0]);
    }

    else if (((newRed[0] - oldRed[0]) == 0) && ((newRed[0] - oldRed[0]) == 0) && ((newRed[0] - oldRed[0]) == 0))
    {
      effectCounter[0] ++;  // Go to next tile
      //flag[1] = false;
    }
  }

  else
  {
    flag[1] = false;
    effectCounter[0] = 0;

    if (flag[6] == 1) // Flip flop between left and right updates
    {
      flag[6] = 0;
    }

    else if (flag[6] == 0)
    {
      flag[6] = 1;
    }
  }
  delay(wait);
}


user18478: For part of this you can use the switch case style
Which looks like  
switch(flag[6]) {  
    case 0  //your code here 
             break;       // and exits the switch
    case 1 : cout << '2';  
             break;  
    default: //all other cases
}

There is also the ? syntax that can help

condition ? result_if_true : result_if_false

If I "refactor" this type of code (really we all get there from time to time) I try to go back to "what I want". From What I understand your code would look like (no code validation this is a educational example)
int bufferoffset=0;
int bufferMultiplyer=1;

if(flag[6] == 0)
{
   bufferoffset=6;
   bufferMultiplyer=-1;
}        
oldRed[0]   = (tileBuffer[bufferoffset+bufferMultiplyer*effectCounter[0]] & 0xff0000) >> 16;
oldGreen[0] = (tileBuffer[bufferoffset+bufferMultiplyer*effectCounter[0]] & 0x00ff00) >> 8;
oldBlue[0]  = (tileBuffer[bufferoffset+bufferMultiplyer*effectCounter[0]] & 0x0000ff);  

Serial << (bufferoffset+bufferMultiplyer*effectCounter[0]) << "\t";

Serial << oldRed[0] << " " << oldGreen[0] << " " << oldBlue[0] << endl;

int redDiff=newRed[0] - oldRed[0];
int greenDiff=newGreen[0] - oldGreen[0] ;
int blueDiff=newBlue[0] - oldBlue[0] ;
if(redDiff!= 0) 
{
  redDiff > 0?         oldRed[0] ++:   oldRed[0] --;
 }
if(greenDiff!= 0) 
{
  greenDiff> 0?         oldGreen[0] ++:   oldGreen[0] --;
 }    
if(blueDiff!= 0) 
{
  blueDiff> 0?         oldBlue[0] ++:   oldBlue[0] --;
 }        

    tileBuffer[bufferoffset+bufferMultiplyer*effectCounter[0]] = tile.Colour(oldRed[0], oldGreen[0], oldBlue[0]);
}

for more details on switch case see http://en.cppreference.com/w/cpp/language/switch
for more detail on ? syntax https://stackoverflow.com/questions/795286/what-does-do-in-c

23997: <p>I've written a function that heavily relies on the If / Else statement but I feel it's a very beginner way to achieve functionality. Are there any better ways to achieve the same functionality?</p>

<p>Code:</p>

<pre><code>void jumpThree() // Update from left then right
{
  if (effectCounter[0] &lt; tiles) // Right, first tile
  {
    Serial &lt;&lt; flag[6] &lt;&lt; "\t";
    Serial &lt;&lt; newRed[0] &lt;&lt; " " &lt;&lt; newGreen[0] &lt;&lt; " " &lt;&lt; newBlue[0] &lt;&lt; "\t";

    if (flag[6] == 1)
    {
      oldRed[0]   = (tileBuffer[effectCounter[0]] &amp; 0xff0000) &gt;&gt; 16;
      oldGreen[0] = (tileBuffer[effectCounter[0]] &amp; 0x00ff00) &gt;&gt; 8;
      oldBlue[0]  = (tileBuffer[effectCounter[0]] &amp; 0x0000ff);

      Serial &lt;&lt; effectCounter[0] &lt;&lt; "\t";
    }

    else if (flag[6] == 0)
    {
      oldRed[0]   = (tileBuffer[6 - effectCounter[0]] &amp; 0xff0000) &gt;&gt; 16;
      oldGreen[0] = (tileBuffer[6 - effectCounter[0]] &amp; 0x00ff00) &gt;&gt; 8;
      oldBlue[0]  = (tileBuffer[6 - effectCounter[0]] &amp; 0x0000ff);

      Serial &lt;&lt; (6 - effectCounter[0]) &lt;&lt; "\t";
    }

    Serial &lt;&lt; oldRed[0] &lt;&lt; " " &lt;&lt; oldGreen[0] &lt;&lt; " " &lt;&lt; oldBlue[0] &lt;&lt; endl;


    if ((newRed[0] - oldRed[0] != 0) || (newGreen[0] - oldGreen[0] != 0) || (newBlue[0] - oldBlue[0] != 0))
    {
      // Red difference
      if (newRed[0] - oldRed[0] &gt; 0) // Positive red change
      {
        oldRed[0] ++;
      }
      else if (newRed[0] - oldRed[0] &lt; 0) // Negative red change
      {
        oldRed[0] --;
      }

      // Green difference
      if (newGreen[0] - oldGreen[0] &gt; 0) // Positive green change
      {
        oldGreen[0] ++;
      }
      else if (newGreen[0] - oldGreen[0] &lt; 0) // Negative green change
      {
        oldGreen[0] --;
      }

      // Blue difference
      if (newBlue[0] - oldBlue[0] &gt; 0) // Positive blue change
      {
        oldBlue[0] ++;
      }
      else if (newBlue[0] - oldBlue[0] &lt; 0) // Negative blue change
      {
        oldBlue[0] --;
      }

      if (flag[6] == 1)
      {
        tileBuffer[effectCounter[0]] = tile.Colour(oldRed[0], oldGreen[0], oldBlue[0]);
      }

      else if (flag[6] == 0)
      {
        tileBuffer[6 - effectCounter[0]] = tile.Colour(oldRed[0], oldGreen[0], oldBlue[0]);
      }

      // tileBuffer[effectCounter[0]] = tile.Colour(oldRed[0], oldGreen[0], oldBlue[0]);
    }

    else if (((newRed[0] - oldRed[0]) == 0) &amp;&amp; ((newRed[0] - oldRed[0]) == 0) &amp;&amp; ((newRed[0] - oldRed[0]) == 0))
    {
      effectCounter[0] ++;  // Go to next tile
      //flag[1] = false;
    }
  }

  else
  {
    flag[1] = false;
    effectCounter[0] = 0;

    if (flag[6] == 1) // Flip flop between left and right updates
    {
      flag[6] = 0;
    }

    else if (flag[6] == 0)
    {
      flag[6] = 1;
    }
  }
  delay(wait);
}
</code></pre>
 18478: <p>For part of this you can use the switch case style<br>
Which looks like  </p>

<pre><code>switch(flag[6]) {  
    case 0  //your code here 
             break;       // and exits the switch
    case 1 : cout &lt;&lt; '2';  
             break;  
    default: //all other cases
}
</code></pre>

<p>There is also the ? syntax that can help</p>

<blockquote>
  <p>condition ? result_if_true : result_if_false</p>
</blockquote>

<p>If I "refactor" this type of code (really we all get there from time to time) I try to go back to "what I want". From What I understand your code would look like (no code validation this is a educational example)</p>

<pre><code>int bufferoffset=0;
int bufferMultiplyer=1;

if(flag[6] == 0)
{
   bufferoffset=6;
   bufferMultiplyer=-1;
}        
oldRed[0]   = (tileBuffer[bufferoffset+bufferMultiplyer*effectCounter[0]] &amp; 0xff0000) &gt;&gt; 16;
oldGreen[0] = (tileBuffer[bufferoffset+bufferMultiplyer*effectCounter[0]] &amp; 0x00ff00) &gt;&gt; 8;
oldBlue[0]  = (tileBuffer[bufferoffset+bufferMultiplyer*effectCounter[0]] &amp; 0x0000ff);  

Serial &lt;&lt; (bufferoffset+bufferMultiplyer*effectCounter[0]) &lt;&lt; "\t";

Serial &lt;&lt; oldRed[0] &lt;&lt; " " &lt;&lt; oldGreen[0] &lt;&lt; " " &lt;&lt; oldBlue[0] &lt;&lt; endl;

int redDiff=newRed[0] - oldRed[0];
int greenDiff=newGreen[0] - oldGreen[0] ;
int blueDiff=newBlue[0] - oldBlue[0] ;
if(redDiff!= 0) 
{
  redDiff &gt; 0?         oldRed[0] ++:   oldRed[0] --;
 }
if(greenDiff!= 0) 
{
  greenDiff&gt; 0?         oldGreen[0] ++:   oldGreen[0] --;
 }    
if(blueDiff!= 0) 
{
  blueDiff&gt; 0?         oldBlue[0] ++:   oldBlue[0] --;
 }        

    tileBuffer[bufferoffset+bufferMultiplyer*effectCounter[0]] = tile.Colour(oldRed[0], oldGreen[0], oldBlue[0]);
}
</code></pre>

<p>for more details on switch case see <a href="http://en.cppreference.com/w/cpp/language/switch" rel="nofollow noreferrer">http://en.cppreference.com/w/cpp/language/switch</a>
for more detail on ? syntax <a href="https://stackoverflow.com/questions/795286/what-does-do-in-c">https://stackoverflow.com/questions/795286/what-does-do-in-c</a></p>
