// Fill out your copyright notice in the Description page of Project Settings.
#include "BullCowCartridge.h"
void UBullCowCartridge::BeginPlay() // When the game starts
{
Super::BeginPlay();
// Welcoming The Player
PrintLine(TEXT("Welcome to Bull Cows!"));
PrintLine(TEXT("Guess the 4 letter word!")); // Magic Number Remove!
PrintLine(TEXT("Press enter to continue..."));
SetupGame();
// Prompt Player for Guess
}
void UBullCowCartridge::OnInput(const FString& Input) // When the player hits enter
{
ClearScreen();
// Checking PlayerGuess
if (Input.Len() != HiddenWord.Len())
{
PrintLine(TEXT("This is a 4 letter word"));
}
else if (Input == HiddenWord)
{
PrintLine(TEXT("You have Won!"));
}
else
{
PrintLine(TEXT("You have Lost!"));
}
// Check If Isogram
// Prompt To Guess Again
// Check Right Number Of Characters
// Prompt To Guess Again
// Remove Life
// Check If Lives > 0
// If Yes GuessAgain
// Show Lives Left
// If No Show GameOver and HiddenWord?
// Prompt To Play Again, Press Enter To Play Again?
// Check User Input
// PlayAgain Or Quit
}
void UBullCowCartridge::SetupGame()
{
HiddenWord = TEXT("Snack");
Lives = 4;
}