Skip to content

Instantly share code, notes, and snippets.

Created November 6, 2017 07:51
Show Gist options
  • Save anonymous/6b58287cd333acf963019a0411819518 to your computer and use it in GitHub Desktop.
Save anonymous/6b58287cd333acf963019a0411819518 to your computer and use it in GitHub Desktop.
FBullCowGame.h
#pragma once
#include<string>
using int32 = int;
using FString = std::string;
class FBullCowGame
{
public:
FBullCowGame(); //constructor
int32 GetMaxTries() const;
int32 GetCurrentTry() const;
bool IsGameWon() const;
void Reset(); //TODO make a more rich return value
bool CheckGuessValidity(std::string); //TODO make a more rich return value
//counts bull & cows and assume gues sis valid
BullCowCount SubmitGuess(FString);
private:
// see constructor for initialization
int32 MyCurrentTry;
int32 MyMaxTries;
FString MyHiddenWord;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment