Not sure why you are asking as I only needed help with the code in this function showColors but here it is
#include <FastLED.h>
// How many leds in your strip?
#define BUTTON_LED 9
#define STATUS_LED 7
#define NUMOFLEDS_BUTTON 3
#define NUMOFLEDS_STRIP 9
#define BRIGHTNESS 50
//#define LED_TYPE WS2811
//#define COLOR_ORDER GRB
CRGB leds_buttons[NUMOFLEDS_BUTTON];
CRGB leds_status[NUMOFLEDS_STRIP];
//unsigned long previousTime = millis();
//long combinationBlinkInterval = 500;
int gameSpeed = 1;
int gameLevel = 1;
//int buttonColors[];
// Define the array of leds
//CRGB leds[NUM_LEDS];
CRGB colorsOnButtons[3][3] = {
{{ 255, 0, 0}, {0, 255, 0}, {0, 0, 255}},
{{0, 255, 0},{0, 0, 255}, { 255, 0, 0}},
{{0, 0, 255}, { 255, 0, 0},{0, 255, 0}}
};
CRGB colorsOnStrip[3][2] = {
{{ 255, 0, 0}, {0, 255, 0}},
{{0, 255, 0},{0, 0, 255}},
{{0, 0, 255}, { 255, 0, 0}}
};
void setup() {
// Uncomment/edit one of the following lines for your leds arrangement.
delay( 500 );
FastLED.addLeds<NEOPIXEL, BUTTON_LED>(leds_buttons, NUMOFLEDS_BUTTON); // GRB ordering is assumed
FastLED.addLeds<NEOPIXEL, STATUS_LED>(leds_status, NUMOFLEDS_STRIP);
FastLED.setBrightness( BRIGHTNESS );
//start();
//cycling through the led's on the strip and buttons on start of the game
for( int i = 0; i < NUMOFLEDS_STRIP; i++) {
leds_status[i] = ColorFromPalette( RainbowColors_p, 1, BRIGHTNESS, LINEARBLEND);
}
for( int i = 0; i < NUMOFLEDS_BUTTON; i++) {
leds_buttons[i] = ColorFromPalette( RainbowColors_p, 1, BRIGHTNESS, LINEARBLEND);
}
FastLED.show();
delay(3000);
fill_solid(leds_buttons, NUMOFLEDS_BUTTON, CRGB::Black);
fill_solid(leds_status, NUMOFLEDS_STRIP, CRGB::Black);
FastLED.show();
}
void loop() {
int gameSpeed = 0;
int gameLevel = 0;
unsigned long currentTime = millis();
showColors(gameSpeed,gameLevel);
}
void showColors(int x,int y) {
//to show colors on the buttons and selecting the colors for the buttons from the array defined
for(int i = 0; i < 3; i++) {
leds_buttons[i] = colorsOnButtons[y,i];
}
FastLED.show();
//to show the colors for the strip and selecting the colors from the array defined
for(int i = 0; i < 4; i++) {
leds_buttons[i] = colorsOnButtons[y,0];
}
FastLED.show();
for(int i = 5 ; i < 8; i++) {
leds_buttons[i] = colorsOnButtons[y,1];
}
FastLED.show();
}
void start() {
// play start music
tone(10,300,400);
delay(400);
tone(10,400,400);
delay(400);
tone(10,600,400);
delay(400);
tone(10,800,400);
delay(400);
tone(10,900,400);
for( int i = 0; i < NUMOFLEDS_STRIP; i++) {
leds_status[i] = ColorFromPalette( RainbowColors_p, 1, BRIGHTNESS, LINEARBLEND);
}
for( int i = 0; i < NUMOFLEDS_BUTTON; i++) {
leds_buttons[i] = ColorFromPalette( RainbowColors_p, 1, BRIGHTNESS, LINEARBLEND);
}
FastLED.show();
delay(3000);
}