All GameDev.tv Unreal Courses

Hello! I’m enjoying this course so far. I got pretty far flawlessly but I’m kinda stumped on this one… I think I messed up somewhere and I need help solving the issue… Thanks!

#include <iostream>

void PrintIntroduction()
{
	std::cout << "You are a secret agent breaking into a secure server room...\n";
	std::cout << "enter the correct code to continue...\n\n";
}
void PlayGame()
{

	PrintIntroduction();

	//Declare 3 number code
	const int CodeA = 4;
	const int CodeB = 3;
	const int CodeC = 2;

	const int CodeSum = CodeA + CodeB + CodeC;
	const int CodeProduct = CodeA * CodeB * CodeC;

	// Print CodeSum and product to the terminal
	std::cout << std::endl;
	std::cout << "There are 3 numbers in the code" << std::endl;
	std::cout << "The codes add-up to: " << CodeSum << std::endl;
	std::cout << "+ The codes multiply to give: " << CodeProduct << std::endl;

	//Store Player guess
	int GuessA, GuessB, GuessC;
	std::cin >> GuessA >> GuessB >> GuessC;


	int GuessSum = GuessA + GuessB + GuessC;
	int GuessProduct = GuessA * GuessB * GuessC;

	//Check if the players guess is correct
	if (GuessSum == CodeSum && GuessProduct == CodeProduct)
	{

		std::cout << "\nYou win!";
	}
	else
	{
		std::cout << "\nYou lose!";
	}

	int main();
	{
		PlayGame();
		return 0;
	}

Remove the semi colon on line 46.


Locked and loaded baby

Added some spice to the bull and cow game by adding assets from quixel. Also added a post processing so when player enters the lake, it makes it look look like you entered a body of water.

Hello! I purchase your Unreal Engine C++ course in Udemy! How am i able to watch courses in GameDev.tv?

Go to the last section of the course in Udemy, there are instructions about how to migrate your course, there will be a link that will redirect you to GameDev site where you find a code to copy and send it back to GameDev account on Udemy.

Hi!! I´m showing you how my tripleX game is going on at the moment!!!

Thanks!!

2 Likes

Congrats, we all have big hopes to build the last game of this course successfully and get to the next course to learn the multiplayer games with online gaming. So, stick around and get this done!

1 Like

Hi! I need someone help me. When I put other character in the guess part that is not a number, the game makes it a huge number not a 0, that happens when the player puts the numbers in the same line separated by spaces, I don´t know why??
But, when the player puts the numbers in different lines with other character that is not a number it tooks the character like a 0 just like the prof says.

Thanks for all the help you could give me!!

1 Like

Hi people!!

I´m sending you my tripleX game where the player has lost the game!!

Thanks for everything!!

2 Likes

Hello I am Strike I need help on the tripleX game

1 Like

Describe the issue with more details please! What’s the problem? I Think first you have to compile and then run the compiled file!

Hi!! I´m sending my tripleX game with functions and ASCII Art. I hope you´ll like it!!

1 Like