Applet: Children's Game

MYP Instructions

Code a game for children to play.

Analysis

Some possiblities:

  1. Rock, Paper, Scissors. Or a slightly different version like bug - nuclear bomb - human.
  2. Mastermind - The computer selects three coloured pegs. You guess what they are. The computer tells you how many positions are right and how many colors are right.
  3. Hi-Lo - The player guesses high or low. The computer chooses a random number between 1 and 13. If the number is between 1-6, it is considered low. If it is between 8-13, it is high. 7 is neither hi nor low. If the player is right they get two points. If they are wrong, they loose a point.
  4. Pig – Two player game for dice. You roll the pair of dice and add up what they say. You don’t have to take turns, you keep rolling as long as you want. BUT: If a 1 comes up on 1 of the dice, you lose your count for that entire turn. If a 1 comes up on both dice, your total goes back to 0. And anytime you roll a one you lose your turn.
  5. Poison – Two player game. 12 things appear on the screen that are the same and one that is difference (the poison). Take turns. In a turn, you must take away 1 thing or 2 things until only the poison is left. Whoever takes away the poison dies.
  6. Race for 20 – It’s a counting game. Whoever gets 20 wins. You take turns. When its your turn, you may count 1 or 2 numbers. So the first person says “1” or “1 2” and the second continues with 1 or 2 more numbers.
  7. Race for New Year’s Eve – The idea of the game is the be the first to say “December 31”. There are several rules you must follow: Whatever date you say must be later in the year than the date said before it and you may change the month OR the day but not both. Ex. July 8, October 8, October 31, December 31!
  8. Your choice Tic-Tac-Toe – Take turns as you usually do. On your turn, you may put down either an X or an O and you can change your mind from turn to turn. The winner is the one who finishes any row, column or diagonal all of X’s or O’s.
  9. Number Tic-Tac-Tow – You don’t use X’s or O’s for the version, you use the numbers forn 1 to 9. Each number may be used only once in the game. Take turns writing a number in a space. The idea is to be the one to get the numbers in any row, column or diagonal to add up to 15.
  10. Race for Zero – This is a calculator game for two people. You will need a calculator. Whoever is first punches in a seven digit number. The second player chooses one of the numerals showing and punches it in, repeating it as many times as he or she chooses and subtracts it from what is already in the display. Then the first player takes the calculator again, chooses any numeral that is now showing, punches it in as many times as he or she likes and subtracts it. Continue taking turns. The player who gets zero on the calculator display after subtracting wins the game.
  11. Deal and count – Shuffle a deck of cards. Then deal them out one by one. While you’re dealing count: ace, 2, 3,4, 5,6, 7, 8, 9, 10, jack, queen, king, ace, 2, 3, 4, and so on. Each time you deal a card, turn it over so you can see what it is. You win this game if you get to the end of a deck without turning over a card that matches what you count.
  12. Thirty one game – You need 24 cards, ace through 6 of each of the suits. Lay out the cards face up. Decide who goes first. The first player turns any card face down and adds that number to the total. Then the second player does the same adding to the running total. Whoever reaches the sum of exactly 31 wins. If neither reach it exactly, neither wins.

Design

  0-1 2 3 4
10 games list Almost 10 games. some choices may be similar. 10 games. 10 games. Some interesting choices not from the above list. 10 games. Many unique and creative choices not from the above list. Your list is fairly distinct from others in the class.
Choice Choice is not outlined in a paragraph. Choice is very briefly justified. Choice is well justified. Good grammar and spelling. If paragraphs are needed, they are used.
Intro Screens One screen is drawn. Few user instructions. User instructions (on labels: eg. Enter a number) are provided. Opening Screen and Instructions appear. Extremely well laid out. Choices of pictures have been completed.
Game Screen Few labels, pictures. Unclear. Buttons to trigger events, reset button, points. Clear labels and indications to the user how the game will be played. Extremely detailed. Obvious how to play. Error proof. New widgets used.

Coding

  0-2 3-4 5-6 7 8
Widgets buttons, labels, textfields. option panes. multiple screens, panels. New widgets used. Many new things tried.
Comments title only before ifs and loops all present. listed extra features after the title comments. sourced new items and pictures at the top after the title comments.
Functionality game runs. scores displayed. reset button. lots of widgets. game has instructions and is user friendly. Great game. Plays well. Game is complex and/or unique.
Error checking. none. some minimal checks and corrections. Error checking of input. Hard to cheat or break the game. Lots of error checking. Impossible to break the game.

 

 

 

 

 


Old stuff - 2006 - Pretend you can't see this

ICS3M0 Instructions

Make a rock- paper-scissors game OR any game of your choice.

An example of User Interface:

Rubric

Level Description
1 Pictures change for user when selected. The computer's pictures change automatically.
2 The winner is calculated and displayed to the user.
Some basic formatting is done, make resize and colour and font.
Title comments - name, date and purpose is at the top.
3

The score is updated on the screen.
Panels are added.
Comments appear in init and actionPerformed.

4 A new widget is tried or extrememly nice formatting (maybe a cardLayout).
Source of new code is recorded in title comments.
4+ Many new widgets or new code added. (JCheckboxes, JRadioButtons, Sound, JProgress Bars, JSpinner)
Source of new code is recorded in title comments.

 

Analysis

  0-2 3-4 5-6 7 8
Set up/ Layout hard to follow some titles titles and concluding sentences for choices very easy to follow. outstanding layout.
List of 10 Few games selected. Many games selected. 10 games, variety of options. 10 games, all resonable. Very creative or extra options.
Selection chart Very brief. Needs more details. Good criteria, well explained. codable, do-able in the time alloted. Very creative or extra options

Design

  0-2 3-4 5-6 7 8
Set up/ Layout hard to follow some titles titles and concluding sentences for choices very easy to follow. outstanding layout.
Screen Designs Few screens, quick drawing. Widget types are clear. Picture selections are clear. Panels labelled. Names of variables included, including which variables need to be global.
Structure Chart Screens Very brief. Needs more details. Screens and links shown. codable, do-able in the time alloted. Well laid out. Very creative or extra options.
Structure Chart Methods Very brief. Needs more details. Methods and major functions shown. codable, do-able in the time alloted. Well laid out. Very creative or extra options.
Flow charts major errors. minor errors. 2 or so for major functions. correct shapes. Well laid out or extra flow charts. Very creative, possible pseudocode.

 

An Example Assignment: Rock, Paper Scissors Game

Make a game that simulates Rock, Paper, Scissors. The user will be able to choose which one they want. They will play against the computer (whose choices will be randomly generated). The following table demonstrates how the winner is determined.

Choice 1 Choice 2 Winner
Paper Rock Paper (paper covers rock)
Rock Scissors Rock (rock blunts scissors)
Scissors Paper Scissors (scissors cut paper)

Required elements:

Recommended Steps: