Skip to content

Instantly share code, notes, and snippets.

@johnSerrano
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save johnSerrano/5117a016e428d6e86d4a to your computer and use it in GitHub Desktop.

Select an option

Save johnSerrano/5117a016e428d6e86d4a to your computer and use it in GitHub Desktop.
Color[][] color_grid = new Color[6][6]; //new array
// imagine i just instantiated all the elements of grid
Color temp;
for (int y == 0; y < 5; y++){
temp = color_grid[y][0]; //for safekeeping
for (int x == 0; x < 4; x++)
color_grid[y][x] = color_grid[y][x+1];
}
color_grid[y][5] = temp; //finishing the rotation
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment