Skip to content

Conversation

@emanuelmch
Copy link
Owner

Add a Hangman game + players! Still a WIP, though.

@emanuelmch emanuelmch self-assigned this Jul 22, 2020
@emanuelmch emanuelmch changed the base branch from master to arbitrary_container July 22, 2020 19:23
@emanuelmch emanuelmch requested a review from herculesjr July 22, 2020 19:26
@emanuelmch emanuelmch force-pushed the arbitrary_container branch 3 times, most recently from 80db9ef to 3cbdf5d Compare August 23, 2020 00:36
Base automatically changed from arbitrary_container to master August 24, 2020 13:12
using namespace Hangman;

char AlphaOrderPlayerSession::guess() {
auto letters = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about non-ASCII letters?


for (const auto &word : repository.words()) {
for (auto letter : word) {
assert(letter >= 'A' && letter <= 'Z');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might break for non-ASCII characters

using namespace Puzzles;

std::vector<std::string> WordRepository::words() {
if (_words.empty()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about changing it to an early return?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants