FLAMES (game)
FLAMES or FLAME is a paper-and-pencil game popular among school-aged children, which is theoretically related to the Josephus problem and other counting-out games. FLAMES or FLAME is an acronym for the possible outcomes of the game. In order, they are:
- F: friends
- L: lovers
- A: affectionate
- M: marriage
- E: enemies
- S: siblings : it may be omitted in some variations
Gameplay
The gameplay of FLAMES has the following steps:- Write your and your crush's name on a sheet of paper.
- Cross out any common letter that appears in both the names. If the common letter appears uneven times in the two names, all of its occurrences in both names may be crossed, or just as many occurrences that are common in the two may be crossed, depending on the variant of play.
- Count the total number of remaining letters in the two names. Let it be.
- Write "FLAMES" on a sheet of paper.
Example
Consider a "FLAMES" example of the Josephus problem variant.- Take two names "ROHAN" and "LENNA".
- After crossing out common letters, "ROH" and "LEN" is left.
- Total number of remaining letters in the two names is 6.
- Write "FLAMES".
- Cross out the 6th letter "S". Repeat counting, starting from F, on what remains of "FLAMES", i.e., "FLAME".
- Cross out the new 6th letter "F". Repeat counting, starting from L, on "LAME".
- Cross out the new 6th letter "A". Repeat counting, starting from M, on "LME".
- Cross out the new 6th letter "L". Repeat counting, starting from M, on "ME".
- Cross out the new 6th letter "E". Only "M" remains of "FLAMES".
- The future relationship between "ROHAN" and "LENNA" is "Marriage".
Code implementation
The following is a possible pythonic implementation of the Josephus problem variant:def flames -> str:
a = list)
b = list)
for i in list:
if i in b:
a.remove
b.remove
n = len + len
f = "FLAMES"
f_len = 6
while f_len > 1:
r = n % f_len
if r 0:
f = f
f_len -= 1
else:
f = f + f
f_len -= 1
return f