Advertisement
Guest User

.h file

a guest
Nov 15th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #pragma once
  2. #include <string>
  3. using int32 = int;
  4. using FString = std::string;
  5.  
  6. struct FBullCowCount
  7. {
  8. int32 Bulls = 0;
  9. int32 Cows = 0;
  10. };
  11.  
  12. class FBullCowGame {
  13. public:
  14. FBullCowGame();
  15.  
  16. int32 GetMaxTries() const;
  17. int32 GetCurrentTries() const;
  18. int32 GetHiddenWordLength();
  19.  
  20. bool IsGameWon() const;
  21.  
  22. void Reset(); //TODO make a rich return value
  23. bool CheckGuessValidity(std::string) const;
  24. FBullCowCount SubmitGuess(FString);
  25.  
  26. private:
  27. //see constractor for inizialization
  28. int32 MyCurrentTries;
  29. int32 MyMaxTries;
  30. FString MyHiddenWord;
  31. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement