CSC 216 F09/pretty-pretty-program: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 14: Line 14:


The class will be divided into four teams, and the game also requires a gameboard and a spinner.
The class will be divided into four teams, and the game also requires a gameboard and a spinner.
[http://img21.imageshack.us/img21/4047/prettyprettyprogrammer.jpg link to gameboard]
[http://i4.photobucket.com/albums/y112/General-Veok/PrettyPrettyProgrammer.jpg?t=1258514154link to gameboard]
 
A 4-sided die or 4 section spinner numbered 1-4 is also required.


===The script===
===The script===

Revision as of 03:16, 18 November 2009

Formatting Resources

Formatting Help Guide from MetaWiki

Pretty Pretty Programmer

The problem

This exercise is loosely based on the board game, "Pretty Pretty Princess", a game in which players must acquire 5 pieces of jewelry: 2 earrings, a necklace, a crown, and a ring.

In this exercise, students will play a variant called "Pretty Pretty Programmer", where they will try to collect everything they need to complete their java program. However instead of actually wearing the items in question, the students must demonstrate their mastery of Java by storing the items in a LinkedList. Students must be able to both add, swap, and remove objects from the list, as programmers are very greedy, and much stealing, replacing, and bickering over each others LinkedLists.

Participants and props

The class will be divided into four teams, and the game also requires a gameboard and a spinner. to gameboard

A 4-sided die or 4 section spinner numbered 1-4 is also required.

The script

Who Goes First?

  1. Everyone who is playing spins the spinner. The player who spins the highest number goes first, and the play continues clockwise.

Game Play

  1. Spin the spinner and move your piece the number of spaces the spinner lands on. The space you land on will have a direction for you to follow. If you land on a space and already have that piece of jewelry, your turn is over. If you land on a space with the earrings, you may only add one earring to your LinkedList. That is the end of the turn, and the play goes to the next person. You can also share spaces with other people.

Spaces on the Game Board ( The spaces on the game board mean different things when you land on them.)

  1. Crown: Add the Crown to your LinkedList if no one has yet added it. Otherwise, use a Remove method to get the crown from them, and then add it into your LinkedList instead.
  2. Black ring: If you land on the black ring, you must add the black ring to your LinkedList. If another player already has the black ring in their linked list, use a remove method to take the ring from them and add it to your own list.
  3. Take any piece: Add a single piece of jewelery to your LinkedList. This can come from other players (in which case, they must remove the item from their list) or from the unclaimed pile (so you only must add it to your own). You can take the crown, even if no one else has claimed it.
  4. Put one back: You must remove any piece of your jewelry or the crown from your LinkedList. If you have the black ring, you must remove this from your LinkedList instead of getting to choose. If there is nothing for you to return, your turn is over.

Maintaining your LinkedList

  1. The order one acquires the pieces in is irrelevant, but your LinkedList must not have any "holes" in it. When an element is removed by another player, your team must write code to condense the list so that you no longer have any null objects as part of the LinkedList.

Winning

  1. To win the game, you must collect a complete set of the jewelry in your LinkedList. You must also have the crown and not have the black ring. If you have all of that, you win. Turn to the programmers all around you and haughtily announce, "I'm a Pretty Pretty Programmer!"

See http://www.ehow.com/about_5076372_pretty-pretty-princess-game-rules.html as a reference