Index
Overview


NOTE WELL -- this challenge is logic play. It is all about coding a bit of logic into your model (as described below). The user interface is "just for fun" (not graded) -- play with that part only if you have time. And the instructor will help you get your user interface going, if you decide you want to play with it, and you need any tips.

Problem Statement


Code up a game of your choice.

It can be a one player, player vs computer, or other.

When you go beyond one player, it does get more complex (but fun). If vs the computer you will likely want to play with a "timer" a bit. So again the game is up to you -- your interest, and also what you want to take on.

One idea is a "Number Guessing Game". Here is info on that....

If you are choosing to do a more complex game, first do the guessing game for practice (unless you are sure you don't need the practice).

Other Game Ideas


NOTE WELL -- if coming up with your own game, keep it limited to the kinds of mechanisms you see in the two examples (because of time constraints).

Other games should be as complex as the guessing game, or more complex (but watch out for too complex).

Just a few ideas:


The "roll-the-dice" example is a bit like Snake Eyes, but simplified.

And you'll find your own.

The grader will [not] check that you implemented ever rule of a given game. In other words, if you do "Snake Eyes", you can do a variation of it. If you do "21", you can also simplify it (e.g. set ace at 1, so you have numbers 1-13), etc.

Suggested Approach


Before starting this section, you may want to review the simplest example: A Counter....

This "suggested approach" will assume the number guessing game.... You can vary these steps as needed for another game.

Unzip the provided files.

Rename the "my-game" directory as you desire.

These are the files you would need to work on (in "my-game"). They have instructions within them.


To run:


There are two guide example projects to reference:

example directoryDescription
verbose-rectanglefully loaded with model, tests and ui, this is the simpler example of "game-like" features you might use.
roll-the-dicefully loaded, a more complex example with player vs computer, some timing fun, etc.


Best way to start: -- It's tempting to hit the ui early, but bugs are harder to track there. The "test" directory (approach) is more bug friendly.

Discussion


For the guessing name, the "verbose-rectangle" example would be the best choice to look at first for examples.

These examples should provide everything you need in terms for your basic game. If you are missing anything, yell an email over to the instructor.

Pitch your questions/thoughts onto that discussion board -- hints are usually liberally given, and especially would be for the "guessing game".

Provided Code


Here is the provided code (templates and examples):


Scoring


The grader will mostly focus on your model. The UI is the fun part, but the model should be the engine behind it all.

Also, the grader will also grade a bit on clear "how-to" notes -- they don't need to be long (see next section).

Submitting


Please put "how-to" instructions at top of your "model.js" file. If doing the guessing game, you can just copy what is referenced here. They don't need to be long, just enough to get the grader going. Careful if copying in a large blob of text from the internet -- have seen odd characters introduce bugs.

Submit instructions: