On the Subject of Simon Serves

Family dinners. Always a classic.

On the module you will see a dinner table with 6 colored pillars arranged around it. These are Simons guests. The guests are Red, Blue, Green, Violet, White and BlacK. Initially the table is empty. Knock on the table once to signal to Simon that his guests have arrived and are ready to be served. Simon will then serve six colored plates on the table. These are the dishes Simon serves his guests. Each colored plate represents a drink or food Simon serves. The possible colors are: White, Brown, Red, Blue, Green, Yellow, Orange and Pink.

Unfortunately, Simon doesn’t take orders. He will serve random dishes and drinks from which the guests must pick one each.

Once you knock on the table, the guests around the table will start flashing in a sequence. This is your base order for the given stage. For each stage consider your base order and adjust it according to the stage rule. That is your pick order. Then consider the priority lists in pick order and read them according to the stage rule. For input press the first guest on your pick order, then the first dish you encountered on that guests priority list which is also served on the table. Repeat this process for each guest, alternate between guest and dish until every guest is served. Picking the guests in the wrong order or assigning them the wrong dish will cause a strike and make Simon angry. He will clean the table and serve fresh dishes for the current stage.

Note:
Consider the first and last flash to be connected into a loop.

Course One: Drinks

Stage Rules:

If Violet, Blue, and Red flashed consecutively in any order, swap the first guest with the last.
Otherwise, Swap the second guest with the fourth.

Guest preferation (Red was served):

Red Green, Yellow, Orange, Pink, White, Blue, Red, Brown
Blue Blue, Yellow, White, Red, Orange, Pink, Brown, Green
Violet Orange, Green, Pink, Brown, Yellow, White, Red, Blue
Green Red, Green, Orange, Pink, Blue, Brown, Yellow, White
White Pink, Red, Yellow, Blue, Brown, Green, Orange, White
Black Green, Orange, Yellow, Brown, Pink, Red, Blue, White

Guest preferation (otherwise):

Red White, Blue, Red, Brown, Green, Yellow, Orange, Pink
Blue Orange, Pink, Brown, Green, Blue, Yellow, White, Red
Violet Yellow, White, Red, Blue, Orange, Green, Pink, Brown
Green Blue, Brown, Yellow, White, Red, Green, Orange, Pink
White Brown, Green, Orange, White, Pink, Red, Yellow, Blue
Black Pink, Red, Blue, White, Green, Orange, Yellow, Brown

Course Two: Appetizer

Stage Rules:

If three guests flashed consecutively in counterclockwise order, swap the third guest with the fourth, and the second with the fifth.
Otherwise, swap the first guest with the last and put guest three and four to the end of the list.

Guest preferation (Pink and Orange are served):

Red Red, Green, Blue, Pink, Orange, White, Yellow, Brown
Blue Pink, Blue, Orange, Green, Yellow, Red, White, Brown
Violet Green, Yellow, Blue, Red, Orange, Pink, Brown, White
Green Blue, Red, White, Pink, Brown, Orange, Yellow, Green
White White, Yellow, Brown, Pink, Blue, Orange, Red, Green
Black Yellow, Green, Red, Pink, Brown, Blue, Orange, White

Guest preferation (otherwise):

Red Brown, Yellow, White, Orange, Pink, Blue, Green, Red
Blue Brown, White, Red, Yellow, Green, Orange, Blue, Pink
Violet White, Brown, Pink, Orange, Red, Blue, Yellow, Green
Green Green, Yellow, Orange, Brown, Pink, White, Red, Blue
White Green, Red, Orange, Blue, Pink, Brown, Yellow, White
Black White, Orange, Blue, Brown, Pink, Red, Green, Yellow

Course Three: Main Course

Stage Rules:

If at least two pairs of guests seated opposite each other flash consecutively this stage, swap those guests.
Otherwise, take the first three guests, swap them with the last three guests then reverse both halves.

Guest preferation (Red is served and Green was consumed as a drink):

Red Blue, White, Brown, Green, Yellow, Red, Pink, Orange
Blue White, Green, Blue, Brown, Red, Pink, Yellow, Orange
Violet Green, Red, White, Orange, Yellow, Pink, Blue, Brown
Green Blue, Yellow, Red, White, Brown, Pink, Green, Orange
White Blue, Yellow, Green, Red, Orange, Brown, White, Pink
Black White, Red, Pink, Orange, Brown, Green, Blue, Yellow

Guest preferation (otherwise):

Red Green, Blue, Red, Brown, Orange, Yellow, White, Pink
Blue Brown, White, Pink, Blue, Orange, Red, Green, Yellow
Violet Orange, Green, Pink, White, Brown, Yellow, Red, Blue
Green White, Blue, Pink, Red, Orange, Brown, Yellow, Green
White Red, Blue, Brown, Green, Pink, Orange, Yellow, White
Black Orange, White, Green, Pink, Yellow, Brown, Red, Blue

Course Four: Dessert

Stage Rules:

If Red, White or Green had the first pick at the main course, guest one and four, two and six and five and three should be swapped.
Otherwise, swap the first three with the last three and reverse the order.

Guest preferation (Orange and Red are served):

Red Orange, Pink, Brown, Blue, Yellow, Red, Green, White
Blue White, Brown, Orange, Blue, Pink, Yellow, Green, Red
Violet Red, Blue, Pink, Orange, Green, White, Yellow, Brown
Green Pink, Blue, Orange, Brown, Red, White, Green, Yellow
White Yellow, Pink, White, Red, Blue, Orange, Green, Brown
Black Brown, Pink, Blue, Orange, Red, Yellow, Green, White

Guest preferation (otherwise):

Red Brown, Orange, Green, Yellow, Red, White, Pink, Blue
Blue Orange, White, Green, Pink, Yellow, Red, Brown, Blue
Violet Pink, Red, Yellow, Green, White, Brown, Blue, Orange
Green Orange, Pink, Green, Red, White, Yellow, Blue, Brown
White White, Yellow, Green, Blue, Orange, Brown, Pink, Red
Black Blue, Brown, Green, Red, Yellow, White, Pink, Orange

The Bill

After completing all four courses the table will be cleared. It’s time to pay Simon for this delicious meal.

Consider the guest who had last pick on the Main Course. If that guests real name has a letter in common with the serial number, that guest has to pay the bill. Otherwise, move on to the next guest seated clockwise. If that guest also doesn’t share a letter with the serial number, continue clockwise one guest at a time until a guest is reached who does. Select that guest and then the table so solve the module.
If no guest with the condition is ever reached Simon pays the bill, simply click the table.

The real names of the guests, besides the colors they are wearing are:
Riley, Brandon, Veronica, Gabriel, Wendy and Kayle.
Brandon wears blue, while Kayle wears Black.

Simon sends his best regards and hopes that he will soon serve you again.