Website Summary Files Commits Branches @commit @diff @stats
path: root / pract KN / week7 / solution / game.h
diff options
context:
space:
mode:
Commitb68542a9ffa71c51a7481df8fa12e7fc41c7ab77 (patch)
Author
 Stoycho Kyosev <68247567+stoychoX@users.noreply.github.com>
2022-04-06 16:36:40 +0300
Committer
 GitHub <noreply@github.com>
2022-04-06 16:36:40 +0300
Filese50c80994d29e575d8d6fb18e5d9ec5f107ba49a /pract KN/week7/solution/game.h
Object-oriented_programming_FMI-b68542a9ffa71c51a7481df8fa12e7fc41c7ab77.tar
Object-oriented_programming_FMI-b68542a9ffa71c51a7481df8fa12e7fc41c7ab77.tar.gz
Object-oriented_programming_FMI-b68542a9ffa71c51a7481df8fa12e7fc41c7ab77.zip
Parent5bec77741360caf1f3baec340e7b01fd308170b2 (diff)
Add files via upload
1 files changed, 25 insertions, 0 deletions
-rw-r--r--pract KN/week7/solution/game.h25
diff --git a/pract KN/week7/solution/game.h b/pract KN/week7/solution/game.h
new file mode 100644
index 0000000..a2a4ed0
--- /dev/null
+++ b/pract KN/week7/solution/game.h
@@ -0,0 +1,25 @@
+#ifndef GAME_HEADER
+#define GAME_HEADER
+
+#include"player.h"
+
+double newtonSquareRoot(double, int);
+bool isPrime(int number);
+bool isPowerOfTwo(int number);
+
+class game {
+private:
+ size_t number;
+
+ void generateNumber();
+
+ void validateBet(double& bet, double cMoney) const;
+ void validateNumber(int& number) const;
+
+ double getRate(betType currentBet) const;
+public:
+ void play(player& p);
+};
+
+
+#endif