Skip to content

Ramblebot Clapshaw#7

Open
JonusClapshaw wants to merge 16 commits intogrc-cohort-22:mainfrom
JonusClapshaw:main
Open

Ramblebot Clapshaw#7
JonusClapshaw wants to merge 16 commits intogrc-cohort-22:mainfrom
JonusClapshaw:main

Conversation

@JonusClapshaw
Copy link
Copy Markdown

No description provided.

Comment on lines +47 to +52
} else if(word.charAt(word.length() - 1) == '?') {
int endIndex = word.length() - 1;
if(word.charAt(endIndex) == '?') {
word = word.substring(0, endIndex);
tokens.add(word);
tokens.add("?");
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice extra feature

Comment on lines +120 to +123
if(neighborMap.containsKey(lastWord)) {
List<String> nextword = neighborMap.get(lastWord);
int rand = (int) (Math.random() * nextword.size());
return nextword.get(rand);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Great logic!

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