-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFunctions.h
43 lines (27 loc) · 1.17 KB
/
Functions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
#include <string>
using namespace std;
static string userInputRaw;
static string userInputRefined;
static string spoofedFruit;
static string tryPond;
static int tryCounter;
static int posHit = -1;
static bool triedThatBefore = false;
static bool isTrySuccessfull = false;
static bool isWordRevealed = false;
static bool isGameOver = false;
static bool isGameGoingOn = false;
string spoofFruit(string fruitToFind, string spoofedFruit);
int getFruitLength(string fruitToFind, int fruitLength);
int getCounter(string fruitToFind, int fruitLength);
string getRefinedLetter(string userInputRaw);
bool checkIftriedThatBefore(string spoofedFruit, int fruitLength, string userInputRefined);
int findLetterPosition(string fruitToFind, string userInputRefined);
bool checkIfIsTrySuccessfull(int posHit);
string updateSpoofedFruit(string fruitToFind, int fruitLength, string spoofedFruit, string userInputRefined);
string addToTryPond(string userInputRefined, bool isTrySuccessfull);
int addToTryCounter(bool isTrySuccessfull);
bool checkIfIsWordRevealed(string spoofedFruit);
bool checkIfIsGameOver(int tryCounter);
bool checkIfIsGameGoingOn(bool isWordRevealed, bool isGameOver);