Difference between revisions of "Intermediate C++ Game Programming Tutorial 9"
From Chilipedia
(→Video Timestamp Index) |
(→Video Timestamp Index) |
||
Line 11: | Line 11: | ||
* Start new project in VS [https://youtu.be/F9oqC1nscgE?t=2m30s 2:30] | * Start new project in VS [https://youtu.be/F9oqC1nscgE?t=2m30s 2:30] | ||
* Using <code>std::istream::getline</code> and <code>std::vector::emplace_back</code> to load words from .txt file into a vector [https://youtu.be/F9oqC1nscgE?t=4m13s 4:13] | * Using <code>std::istream::getline</code> and <code>std::vector::emplace_back</code> to load words from .txt file into a vector [https://youtu.be/F9oqC1nscgE?t=4m13s 4:13] | ||
− | * Using <code><random></code>, generate random word out of vector of words [https://youtu.be/F9oqC1nscgE?t=7m36s 7:36] | + | * Using the <code>std::mt19937</code> class in <code><random></code>, generate random word out of vector of words [https://youtu.be/F9oqC1nscgE?t=7m36s 7:36] |
== Source Code == | == Source Code == |
Revision as of 17:52, 1 September 2019
We create an addictive little console game that will test both your vocabulary and your deductive powers while we flex our newfound std::muscles.
Contents
Topics Covered
- Practicing std::vector/string/ifstream/cin/cout
- std::tolower()
Video Timestamp Index
- Intro 0:00
- Werd gameplay 0:32
- Start new project in VS 2:30
- Using
std::istream::getline
andstd::vector::emplace_back
to load words from .txt file into a vector 4:13 - Using the
std::mt19937
class in<random>
, generate random word out of vector of words 7:36
Source Code
Download Materials
Homework
The homework is to modify Werd so that it uses a second word frequency list (linked above) to filter the words selected as targets so that the game doesn't make you guess rare-ass words that nobody knows.