Git Product home page Git Product logo

f.l.a.m.e.s.---a-puzzle-game-in-c-plus-plus's Introduction

F.L.A.M.E.S.---A-PUZZLE-GAME-IN-C++ BY ROHAN MEHRA.

Abstract:

Analyze your future relationship. You can now use the acronym "FLAME" to figure out just what the future holds for your and this other person. Match the letter you ended on with the following meaning of each letter of the word "FLAME":

Introduction:

Flames Game is a relationship calculating algorithm famous between the youngsters. Once upon a time everyone might heard about this and many of them tried out this secretly. Some took this as very serious also. So what FLAMES stance for?

F - Friendship

L - Lovers

A - Affection

M - Marriage

E - Enemy

S - Soulmates

Methodology:

It is very easy to explain with some example:

Your name: asd

Partner name: abcd

Mainly two steps are there:

Get the flames count

Take the two names ('asd' and 'abcd')

Remove the common characters (two common characters 'a', 'd')

Get the count of the characters that are left (Removed a,d and the rest are s,b,c. So total 3.)

Get the flames result

We take FLAMES letters ('F', 'L', 'A', 'M', 'E', 'S')

And start removing letters using the flames count we got.

And the letter which last the process is the result.

Implementation:

In our example we got flames count = 3. So first we takes FLAMES.

FLAMES

Then we start count from left up to flames count 3. Then remove the letter which is in the position 3. In this case it is 'A'. So the letters become:

FLMES

Then we start count again from the letter which is removed ie, from 'M'. So the next character to remove is 'S'. So our letters become:

FLME

After next step:

FLE

Then:

FE

Last:

F

So the result is 'Friend'.

Rules:

There should not be any Spelling Mistakes.

There should not be any Grammatical Errors.

Answers must not contain any bad words.

Answer should be complete in itself

EXCEPTION:

If the user enters the same name in both entries, which is a rare case but still might exist. Then in that case, no resultant string is found. And the resultant string length is '0'. And with zero we can't start operation on the Flames string.

So, in order to address this scenario. I've implemented an exception case. In this scenario, the result will be showed purely on the basis of luck/fate of the couple, as a random output is generated in such a case.

Eg:Name1 : Manpreet

Name2 : Manpreet

[it is very common in sikh names, that a single name is common among boys as well as girls, i.e. Manpreet in this example]

Then in such a case no resultant string is found. And the result will be printed purely on couple's fate/luck. As a random output is generated among the 6 possible outcomes. i.e 'F'.'L'.'A'.'M'.'E'.'S'.

f.l.a.m.e.s.---a-puzzle-game-in-c-plus-plus's People

Contributors

rohanmehraa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.