This GitHub repository consists of the source code used for the Bulls and Cows game in Unreal Engine 4.
The Bulls and Cows game is a well known coding puzzle game where a player has to guess a word given the number of letters.
- The number of lives is 3 times the amount of letters in the answer
- The bulls indicate how many letters are correct and in the right position
- The cows indicate how many letters are correct but in the wrong position
- The player cannot input repeated letters
- The player cannot input words that are not the same length as the answer
- The player must press TAB in the beginning to write their answers in the console
The files included in this repository are only the source code used to make the game function as it should. BullCowCartridge.cpp is the implementation file for BullCowCartridge.h and it is there that we define the member functions and member variables that are used to run the game on the console. BullCowCartridge.cpp uses HiddenWordsList.h to randomly select one of the words to use for the players to guess.
The following files were automatically generated by Unreal Engine 4:
- BullCowGame.build.cs
- BullCowGame.cpp
- BullCowGame.h
- BullCowGameGameModeBase.cpp
- BullCowGameGameModeBase.h
These generated files are used to initiate the BeginPlay event that would trigger the functions in BullCowCartridge.cpp.
This project is based off of an online game development class by GameDev.tv. The implementation and header files for the console, as well as the 3D assets, were provided by them.
The link here is a video demonstration of the game: https://youtu.be/PEjjmTnju5o