forked from bpd01001/dmd-3475-assignment-repo
-
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.
- Loading branch information
Showing
2 changed files
with
34 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,20 @@ | ||
import { Alert, Confirm, Prompt } from "./game-framework.js"; | ||
/** | ||
* Week 04 - Control Flow | ||
*/ | ||
|
||
|
||
|
||
// Modify the text for the introduction | ||
await Alert('Welcome to my game. Answer questions and complete tasks to escape the room!') | ||
|
||
let name = await Prompt("What is your name?") | ||
|
||
// Level 1 | ||
if(await Confirm(`Hi ${name}. Do you want to play the game?`)) { | ||
await Alert('Great! Let\'s get started.') | ||
} else { | ||
await Alert('That\'s too bad. Maybe next time.') | ||
window.location.reload() | ||
} | ||
|
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,14 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Test Results</title> | ||
</head> | ||
<body> | ||
<script src="../.core/js/test.js"></script> | ||
<script> | ||
runMochaTests(['example']); | ||
</script> | ||
</body> | ||
</html> |