EdinyangaOttoho / flames-matcher

A simple implementation of the FLAMES match game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FLAMES Matcher

This is a software implementation that matches two people as either Friends, Lovers, Admirers, Married, Enemies or Secret Lovers. It is written in JavaScript OOP paradigm (ES6). It is meant to display the use of Loops, Classes and recursions all in one box.

How FLAMES works

As already known by some teenagers and adults, the FLAMES matching pattern works this way; You take two names:

Name A

Name B

You try to cross off the letters of the names (spaces are not counted) as they are matched respectively. Once that is done, you count the remaining letters. Their sum is what determines where the result would fall in using the general tree:

F:1,7,13

L:2,8,14

A:3,9,15

M:4,10,16

E:5,11,17

S:6,12,18

And it goes down continually to infinity.

So, if it sums to 7, both are considered to be Friends (F). Boom!! And simple.

Usage

Simply create an instance of the Flames class with two parameters (string x, string y) that represent the two names and call its member method, compute() as shown:

let flames = new Flames('Name A', 'Name B');
let result = flames.compute();
//returns the result of the Name A and Name B, which is Lovers in this case.

That's it. You've got flames at your fingertips! Feel free to make your versions in several other programming languages and star the project!

About

A simple implementation of the FLAMES match game


Languages

Language:JavaScript 100.0%