IFSC 3300 HW4 due W Sept. 18, 2024
Directions: Please provide the code for all questions that involve coding. Answers may be included in the body (instead of as attachments) of an email. No pdf files. Email to IFSC3300HW@gmail.com.
Do option A or option B.
Option A: buttons
Note: If you want to learn anything, avoid using an AI for this problem unless you get completely stuck and really need a hint.
A1. Conditionals.
A2. More conditionals.
A3. Implement a for loop, a while loop, and a do while loop. These should involve buttons that demonstrate the loops.
A4. Modify the button styles. Here is an example: (check the source code for this button to see how it is done).
Option B: Game
Consider the early text-based computer game "Adventure." See https://www.historyofinformation.com/detail.php?id=2020. I used to play it, a long time ago. A video that is at least very short, if not perfect, is here. If you find a better video please email me to let me know. For Fall 2024 I found a free online version at grack.com/demos/adventure (caution: I didn't test it in detail, but it appears to work). To give a hint, it started by saying I was near a building, so I typed "in building" and it moved me into the building. Then it said there were some keys and things on the floor. So, I typed "take keys." It responded with "ok." And so on - you can probably sort of see where this is going.
Make a rather simple game in Javascript. Don't worry, it doesn't have to be the next blockbuster on STEAM! (But we had a student who did design a blockbuster on STEAM.) Use looping and conditional statements as needed.