Petals Around the Rose brain teaser
The name of the game is Petals Around the Rose, and that name is significant. You can only be told that much. You can also be told that every answer is zero or an even number. You can also be told the answer for every throw of the dice that are used in the game. And that's all the information you get.
Spoiler Warning: try the game without reading roll script!
Run the script, you are given an answer after every roll, try to figure out the pattern and guess the correct answer for the next roll.
curl https://raw.githubusercontent.com/zocoi/Petals-Around-the-Rose/master/roll.rb
ruby roll.rb
Enjoy and good luck!
Bonus: the game is inspired by Bill Gates and Petals Around the Rose
➜ Petals-Around-the-Rose git:(master) ✗ ruby roll.rb
Welcome to Petals Around the Rose
Let's start
Roll 1:
-----
|o o|
|o o|
|o o|
-----
-----
|o |
| o |
| o|
-----
-----
|o |
| |
| o|
-----
-----
|o |
| o |
| o|
-----
-----
|o |
| o |
| o|
-----
The answer is: 6
Press Enter to continue next roll...
Roll 2:
-----
|o |
| |
| o|
-----
-----
| |
| o |
| |
-----
-----
|o |
| |
| o|
-----
-----
|o o|
|o o|
|o o|
-----
-----
|o |
| |
| o|
-----
The answer is: 0
Press Enter to continue next roll...
Roll 3:
-----
|o |
| |
| o|
-----
-----
|o o|
| o |
|o o|
-----
-----
|o |
| o |
| o|
-----
-----
|o |
| |
| o|
-----
-----
|o o|
| |
|o o|
-----
The answer is: 6
Press Enter to continue next roll...
Roll 4:
-----
|o o|
|o o|
|o o|
-----
-----
| |
| o |
| |
-----
-----
|o |
| |
| o|
-----
-----
|o o|
|o o|
|o o|
-----
-----
|o o|
| |
|o o|
-----
The answer is: 0
Press Enter to continue next roll...
Roll 5:
-----
|o |
| |
| o|
-----
-----
| |
| o |
| |
-----
-----
| |
| o |
| |
-----
-----
|o o|
| o |
|o o|
-----
-----
|o o|
| o |
|o o|
-----
The answer is: 8
Press Enter to continue next roll...
Roll 6:
-----
|o o|
| |
|o o|
-----
-----
|o |
| |
| o|
-----
-----
|o o|
|o o|
|o o|
-----
-----
|o o|
| o |
|o o|
-----
-----
|o o|
| |
|o o|
-----
You are now warm, let's guess the answer. Enter your answer:
4
Correct!
The answer is: 4
Press Enter to continue next roll...
Roll 7:
-----
| |
| o |
| |
-----
-----
|o o|
| o |
|o o|
-----
-----
|o o|
| |
|o o|
-----
-----
|o o|
|o o|
|o o|
-----
-----
| |
| o |
| |
-----
You are now warm, let's guess the answer. Enter your answer:
4
Correct!
The answer is: 4
Press Enter to continue next roll...
Roll 8:
-----
| |
| o |
| |
-----
-----
|o |
| |
| o|
-----
-----
|o |
| |
| o|
-----
-----
| |
| o |
| |
-----
-----
|o o|
|o o|
|o o|
-----
You are now warm, let's guess the answer. Enter your answer:
0
Correct!
The answer is: 0
Press Enter to continue next roll...
Roll 9:
-----
|o o|
|o o|
|o o|
-----
-----
|o |
| o |
| o|
-----
-----
| |
| o |
| |
-----
-----
|o o|
| o |
|o o|
-----
-----
|o o|
| o |
|o o|
-----
You are now warm, let's guess the answer. Enter your answer:
10
Correct!
The answer is: 10
Press Enter to continue next roll...
Roll 10:
-----
| |
| o |
| |
-----
-----
| |
| o |
| |
-----
-----
|o o|
| o |
|o o|
-----
-----
| |
| o |
| |
-----
-----
|o |
| o |
| o|
-----
You are now warm, let's guess the answer. Enter your answer:
6
Correct!
The answer is: 6
Press Enter to continue next roll...
Roll 11:
-----
| |
| o |
| |
-----
-----
|o |
| o |
| o|
-----
-----
|o o|
| o |
|o o|
-----
-----
| |
| o |
| |
-----
-----
|o o|
| |
|o o|
-----
You are now warm, let's guess the answer. Enter your answer:
6
Correct!
The answer is: 6
Press Enter to continue next roll...
You guess the correct answer more than 5 times. Looks like you figured it out. Congrats!