forked from nieske/Untangle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First real commit of this thang.
- Loading branch information
nieske
authored and
nieske
committed
Oct 20, 2013
1 parent
76cc185
commit ca282ba
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Untangle</title> | ||
</head> | ||
<body> | ||
|
||
<h1>Welcome to Untangle!</h1> | ||
|
||
|
||
|
||
|
||
|
||
<script src="untangle.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
var puzzles = [ | ||
'Wilhelmus van Nassouwe Ben ick van Duytschen bloet', | ||
'Wilhelmus van Nassouwe Ben ick van Duytschen bloet Den Vaderlant getrouwe Blyf ick tot in den doot Een Prince van Oraengien Ben ick vrij onverveert Den Coninck van Hispaengien Heb ick altijt gheeert', | ||
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit', | ||
"M'n zoon was gisteren jarig hij werd acht jaar oud m'n schat Hij vroeg aan mij een vlieger en die heeft hij ook gehad", | ||
"Two things are infinite: the universe and human stupidity, and I'm not sure about the universe", | ||
'Be the change that you wish to see in the world' | ||
]; | ||
|
||
|
||
var text = puzzles[Math.floor(puzzles.length * Math.random())]; | ||
var rightAnswer = text.toLowerCase(); | ||
var puzzle = text.toLowerCase().split(' ').sort(); | ||
|
||
|
||
function checkAnswer(userAnswer) { | ||
return userAnswer.toLowerCase() === rightAnswer; | ||
} |