External Exam Download Resources Web Applications Games Recycle Bin

JavaScript Challenges #4 ludicrous

Question 1: The Three-card Monte is a trick that can be done by shuffling around cards or cups, one of which is the "target" card that the user has to guess. See if you can recreate this trick without the animation using cards or cups in JavaScript.

Basically, the user should have a 1 in 3 chance of picking the correct cup.
It would be nice if an image showing an empty cup, or a cup with a ball under it, replaced the image of the cup when it was clicked on:



Question 2: Attempt the questions at the bottom of the trader game activity:

Trader Game

Question 3: Attempt the questions at the bottom of the role player game activity:

Role Player Game

Question 4: As best you can, attempt to recreate the cheque writer challenge. Note: This is really hard, especially once you start testing outlandish amounts (see page 6 of this test plan) and will require you to do much googling.

Cheque Writer

Question 5: Text based golf is often a favourite implementation activity for coders.

There are currently two places on this site where you can find implementations of text based golf.

One is using alert and prompt boxes and can be found here: JS Golf via Browser Object Model (BOM)

The other experiments with an animated gif of a golfer swinging, and uses the browser object model: Animations of golfer swinging

Your challenge for this question is to implement your own interpretation of what a JS based golf simulation game using JS and HTML might look like on a webpage.



Question 6: If you make it this far, you are a JavaScript legend. Go back and check that all of your games are responsive and use good front end accessible design.