If you’ve selected to work on the CodingBat ladder for your final project, head over to Notyhp.
If you’re going to work on a game, keep reading:
- For this project, you will choose one of the small games listed below and build it in a code spell.
- You may choose to use The Machine (scratch) or raw code (python), or any language the Loremaster can run.
- You have two periods in which to write it, May 23rd and 25th.
- At the end of the period on May 25th, whether you consider your code finished or not, email your code or a link to your scratch project to email@example.com.
- I will let you know when there is only 10 minutes left, and 5 minutes left, so you can clean up your code before turning it in.
|D||I turned in something that looked like code. It might someday do what it was supposed to do, but it needed a lot more debugging. I didn’t even note or comment on which problem I was trying to solve.|
|C||My code runs. It might not do everything it was supposed to do, but it will execute and do at least some of what it was supposed to do. My code includes at least one loop or one conditional. I commented or noted which problem I was solving. I did not provide instructions for the user, or provided confusing or inaccurate instructions.|
|B||I turned in code that runs. It does what it was supposed to do. It includes at least one loop and at least one conditional. I commented or noted which problem I was solving. I provided clear instructions for the user. If I used a language with multiple current versions, like PYTHON, I indicated which version I used (eg: 2 or 3, for Python).|
|A||My code runs and does what it’s supposed to do. It includes loops and conditionals. It’s cleanly formatted and easy to read. I clearly commented it so it’s easy to understand what my code does, which problem I was solving, and which language & version I used. I provided clear instructions for the user. My language, punctuation, spacing, spelling, etc. is all proper. My code gives the user a chance to play the game repeatedly, or exit, each time they finish a round.|
Simple (Max B)
- A choose your own adventure story
Present a bit of storyline, then give the user a choice, then present a bit more storyline, then another choice, and so on until the end of the story. To be acceptable, this must be a fairly decent length story with several possible branches. It may be helpful to plan it out using twine before you start coding.
- Knights and Knaves
In this game, you are presented with two doors. One leads to freedom, the other to a hangman. You don’t know which is which. You must choose one door, then you receive your reward. ( In a somewhat more complicated version, there is a guard at each door. One guard always tells the truth, the other always lies. You don’t know which is which. ) We’ll leave the guards out for now; just program the doors->choice->reward sequence.
Middling Challenge (max A-)
In Bracket, the player starts out with 100LE. They are dealt two cards, face up from a standard deck (A,2,3,4,5,6,7,8,9,J,Q,K). The player may bet (or not) based on whether the next card will be between the two they already have. One final card is dealt; if it’s between, they win and are paid an amount equal to their bet, if not, they lose the money they bet. Stop the game if the player loses all 100LE or if they get to 200LE. (Note: you’ll need to know how to do random selection in order to program this one.)
This lovely game starts with a pile of brabeum (loot). You and your opponent (the system, in this case) each take turns taking a number of brabeum from the pile (minimum is 1, maximum is 5). The last person to take a brabeum from the pile loses. It’s possible to program all kinds of different algorithms for the computer to use as it’s game strategy AI. Example play:
System> The pile of brabeum is ready. There are 26 pieces. How many do you take? User> 6 System> Sorry, you can only take 1 - 5 pieces. How many do you take? User> 4 System> I take 3 pieces. There are 19 pieces of brabeum left. How many do you take ...
- Nullo uno gogo
This clever little game involves the system picking a 4-digit code (lowercase letters from a-z). The player attempts to guess what it is. For each answer, the system responds with: UNO (a letter is correct, but is in the wrong place), GOGO (letter is correct and in the correct place) or NULLO (no letters correct). A sample bit of gameplay might look like this (the computer picked ” r l o b ” as the number:
System> I picked a 4 letter code. Can you guess it? User>abcd System> UNO System>Guess #2? User>ijkl System> UNO System>Guess #3? User>klab System> GOGO, GOGO ...
Cube is played on the facing sides of a cube with side dimension of 2. A location is designated by three numbers–eg: 1,2,1 (depth to the right, width to the left, and height). The object of the game is to travel from 1,1,1 to 3,3,3 by moving one horizontal or one vertical square (ie: orthogonally not diagonally) at a time without striking one of three randomly placed land mines. The round is over if you hit a mine or try to make an illegal move (eg: try to change more than one digit from your previous position, or move off the cube).
System> The cube is ready. You stand at 1,1,1. Your move: User> 1,2,1 System> BLAMO! Oh, dear. You stepped on a land mine. Play again? User> Y System> The cube is ready. You stand at 1,1,1. Your move: User> 1,2,1 System> You stand at 1,2,1. 1 move. Your move: User> 1,2,2 ...