## On the Subject of Coffee Beans

Me and the boys at 3 am awake due to B E A N S

This module has 3 coffee beans on it. Some beans will be moving around. To solve the module, you must consume the three beans in the correct order. Eating a bean at the incorrect moment will cause a strike. **Note that you cannot see a bean when it has been eaten.**

### Finding Valid Beans

To find the valid order of eating the beans, follow the steps below. Hovering over a bean will display its index.

- Observe the movements of the empty spot. These can be horizontal, vertical or diagonal. The spot will make 3 to 5 movements before pausing and repeating the sequence.
- Observe the positions of the empty spot at the beginning and end of the sequence.
- If the space stayed in the same place, or it moved to the diagonally opposite position, eat the bean with index 1.
- Otherwise, if the space moved horizontally, eat the bean with index 2.
- Otherwise, eat the bean with index 3.

- Create a series of pairs by taking each pair of consecutive movements. Do not create a pair between the last and first movement.
- Reference each of these pairs in the below table to obtain a movement for each pair.
- If an even amount of these new movements result in
`diagonal`or`nothing`, eat the bean with the lower index. - Otherwise, eat the bean with the higher index.

- If an even amount of these new movements result in
- Finally, eat the remaining bean.

nothing | horizontal | vertical | diagonal | |
---|---|---|---|---|

nothing | nothing | horizontal | vertical | diagonal |

horizontal | horizontal | nothing | diagonal | vertical |

vertical | vertical | diagonal | nothing | horizontal |

diagonal | diagonal | vertical | horizontal | nothing |