Skip to content

Commit

Permalink
uploading files to repo
Browse files Browse the repository at this point in the history
  • Loading branch information
pcm20001 committed Feb 8, 2024
1 parent fba772d commit 58f81c1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
20 changes: 20 additions & 0 deletions week-04/js/main.js
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()
}

14 changes: 14 additions & 0 deletions week-04/tests.html
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>

0 comments on commit 58f81c1

Please sign in to comment.