/Game_of_flames

the relationship game

Primary LanguageJavaScript

flames

flames is a game played by young ones. it just to fake a fotune teller ,, telling you about the kind of relatioship that exist between you and someone.

F.L.A.M.E.s=> f-friendship,l-love,A-admire,m-marriage,e-motion,s-secret lover

How the game operate

let say your name is Joe and you want to fortell your relationship with James. the two name will be compared to each other. the common letter will be cancell out according to the number of time they appear. so J will be cancel out from both names like wise letter e. so it remain o in Joe, and ams in James. the remaining letter are join together it becomes oams, the total word is 4.

so count flames from f till you reached the value remained which is 4 and the letter in the 4th is m which stand for marriage.

var f = flames("joe",'james');

console.log(f);
//marriage

Approach

Two method is used to solved the problem, which i called the Matrixway and Developer way