Skip to content

Commit

Permalink
Added a few easter eggs to the recogntion/response loop
Browse files Browse the repository at this point in the history
  • Loading branch information
ohjay committed Oct 20, 2015
1 parent 4e0e488 commit af22945
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Binary file modified images/drake-black-background(newest).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/j-cole-black-background(new).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,16 @@
var finalWord = finalPhrase.substring(finalPhrase.lastIndexOf(' ') + 1);

document.getElementById("final-word").innerHTML = "[ Your previous line: <i>" + finalPhrase + "</i> ]";
rhymes = ["Rhymes: " + lookup(finalWord).toString() + "^3000"];

// Easter eggs + rhymes (this is where we'll set the response text)
if (finalPhrase.indexOf("Oliver") > -1) {
rhymes = ["Hi, Oliver. How goes it?^3000"];
} else if (finalPhrase.indexOf("cigar") > -1) {
rhymes = ["Cigar? ...or SAGANG?^3000"];
} else {
rhymes = ["Rhymes: " + lookup(finalWord).toString() + "^3000"];
}

updated = true;
r.stop();
}
Expand Down

0 comments on commit af22945

Please sign in to comment.