I know this puzzle is easy, but I hope it isn't too easy... If it is I really have to work on my puzzle-creation skills :P
Story & Question:
8 men plan to go eating to a restaurant, where they will celebrate Mr. Blue's birthday. Here is an example how it could look like:
(The above image is just for visualization!) They're still struggling with coming up with a solution so every man is satisfied with his position. Can you help them find (one of the four) solutions only given the preferences of each man? (I will only accept an answer that contains a picture (or code snippet) of the solution like the one above, see "Tools").
- Mr. Red wants to sit at a corner.
- Mr. Green wants to face Mr. Red
- Mr. Blue wants to have Mr. Orange as an immediate neighbor
- Mr. Pink doesn't want to sit at a corner
- Mr. Orange wants to have Mr. Blue as an immediate neighbor and wants to have Mr. Red as an immediate neighbor
- Mr. Yellow wants to face Mr. Magenta
- Mr. Magenta doesn't want to have Mr. Green as an immediate neighbor
- Mr. Cyan wants to face Mr. Blue
Clarification: If you divide the image in 5 columns, the seats inside the first 2 and the last 2 columns are the seats that are at a corner.
I've provided 9 pictures, one of the table and one of each man with alpha channels. This will make it much easier for you to create/get to an answer. All you need is an image editing program. But like mentioned before, I also accept an illustration with text in a code sample, like this:
Red|Green|Blue ==================== ==================== Pink ==================== Orange ==================== ==================== Yellow|Magenta|Cyan
But I think an image like I made would be nicer for visualization :)