daily pastebin goal
2%
SHARE
TWEET

FBullCowGame.h

a guest Nov 19th, 2017 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #pragma once
  2. #include <string>
  3.  
  4. using FString = std::string;
  5. using int32 = int;
  6.  
  7. struct FBullCowCount
  8. {
  9.     int32 Bulls = 0;
  10.     int32 Cows = 0;
  11. };
  12.  
  13. enum EWordStatus
  14. {
  15.     Invalid,
  16.     Valid,
  17.     NotIsogram,
  18.     WrongLength,
  19. };
  20.  
  21.  
  22.  
  23. class FBullCowGame
  24. {
  25. public:
  26.     FBullCowGame(); //constructor
  27.  
  28.     void Reset();
  29.     int32 GetMaxChances() const;
  30.     int32 GetCurrentChance() const;
  31.     int32 GetHiddenWordLength() const;
  32.  
  33.     bool GameWon() const;
  34.     EWordStatus GuessCorrect(FString);
  35.     FBullCowCount SubmitGuess(FString);
  36.  
  37.  
  38.    
  39. private:
  40.     int32 CurrentChance;
  41.     int32 MyMaxChances;
  42.     FString HiddenWord;
  43.     bool bGameWon;
  44. };
RAW Paste Data
Top