Skip to content

AshayM - Feature 1,2 & 3#75

Open
WallyWest74422 wants to merge 13 commits intoLEAGUE-Level6:developmentfrom
WallyWest74422:development
Open

AshayM - Feature 1,2 & 3#75
WallyWest74422 wants to merge 13 commits intoLEAGUE-Level6:developmentfrom
WallyWest74422:development

Conversation

@WallyWest74422
Copy link

No description provided.

Copy link

@opie10 opie10 left a comment

Choose a reason for hiding this comment

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

Minor issue, main problem is the punApi API not existing anymore/not being accessible. a few coverage cleanups, and one test problem, but thats all.

"I love that skirt on you! Can I buy it off of you for, say $20?", "You're so hot, I need a fan to cool me down.", "You're too kind. Maybe tone it down a bit",
"I bet you have straight A's in school.", "Your husband is a very lucky man.",
"I bet you got a 5 on the AP Chemistry exam.", "On my list of Top 10 Favorite People, you're definitely on there." };
int rand = (int)(Math.random()*list.length)+0;
Copy link

Choose a reason for hiding this comment

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

The String Array should be a member variable and not called every handle, additionally, there is an unnecessary +0

play = true;
guessed = "";
String[] words = {"memento", "federal", "executive", "abysmal", "oxygen", "elucidate", "burrito", "candid", "diplomat", "gratuitous", "feral", "holiday", "inclusive", "junta", "kimono", "negligible", "preclude", "laudable"};
int rand = (int) (Math.random() * words.length) + 0;
Copy link

Choose a reason for hiding this comment

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

Another +0, I'm unsure why this is here, also same as before, put the string array as a member variable

}else {
guessed+=guess;
event.sendResponse("Incorrect! You have " + lives + " guesses left!");
lives--;
Copy link

Choose a reason for hiding this comment

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

This line causes the test "itShouldTellTheUserIfTheirGuessIsWrong" to fail. either move the incrementation of lives up, or do --lives within your event.sendResponse

String messageContent = event.getMessageContent();
if (messageContent.startsWith(COMMAND)) {
String pun = getPun();
event.sendResponse(pun);
Copy link

Choose a reason for hiding this comment

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

Could be simplified to even.sendResponse(getPun());

Copy link

Choose a reason for hiding this comment

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

The api appears to be broken now, however there is 100% coverage

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.

2 participants