You are a OnesPlayer



You are a OnesPlayer

At the time you are constructed, you will be given a string

1. State, “I am a OnesPlayer. I will now construct myself as a player would.”

2. State, “…searching further in my script for a Player constructor.”

3. Execute the Player constructor found on a subsequent page.

4. State, “Done constructing OnesPlayer, .” (NOT your nickname.)

[pic]

When you are asked to “GetMove” you will be given a ChipsGame. Ignore it. Simply respond, “1”.

You are a RandomPlayer

At the time you are constructed, you will be given a string

1. State, “I am a RandomPlayer. I will now construct myself as a player would.”

2. State, “…searching further in my script for a Player constructor.”

3. Execute the Player constructor found on a subsequent page.

4. State, “Done constructing RandomPlayer, .” (NOT your nickname.)

[pic]

When you are asked to “GetMove” you will be given a ChipsGame.

1. Begin by asking the ChipsGame for its MaximumMove.

2. State aloud, “I will now choose a random number from 1 to .”

3. Pick a random number between 1 and the response you were given in Step 1.

4. State aloud, “.”

You are an ExternalPlayer

At the time you are constructed, you will be given a string

1. State, “I am a RandomPlayer. I will now construct myself as a player would.”

2. State, “…searching further in my script for a Player constructor.”

3. Execute the Player constructor found on a subsequent page.

4. State, “Done constructing RandomPlayer, .” (NOT your nickname.)

[pic]

When you are asked to “GetMove” you will be given a ChipsGame.

1. Ask the ChipsGame to Show.

2. Ask the ChipsGame to tell you its Display.

3. Ask that Display to displayTheMessage, “Your move, “.

4. Ask the ChipsGame for its MaximumMove

5. Ask the Display to “getANumberBetween 1 and .”

6. State stating aloud, “.”

You are a Player

When you are constructed, you will be given your nickname as a string. Remember it. State aloud, “Done constructing Player.”

[pic]

When you are asked for your Nickname, simply state it aloud.

You are a Player

When you are constructed, you will be given your nickname as a string. Remember it. State aloud, “Done constructing Player.”

[pic]

When you are asked for your Nickname, simply state it aloud.

You are a Player

When you are constructed, you will be given your nickname as a string. Remember it. State aloud, “Done constructing Player.”

[pic]

When you are asked for your Nickname, simply state it aloud.

You are a ChipsGame

When you are constructed, you will be given a number (of chips in the pile), a TextDisplay and a list of players. Keep track of this data at all times. It is your job to keep track of “whose turn it is” (using the list of players in the obvious order). You will also keep track of the “maximum legal move”. Start it at one less than the number of chips.

[pic]

When you are asked to Play:

1. Ask your Display to displayTheMessage, “Welcome”.

2. Ask the current player to GetMove, passing yourself as data.

3. Ask the current player its Nickame.

4. Ask your Display to displayTheMessage, “ removes chips.”

5. Subtract the number of chips from Step 2 from your pile.

6. Set the “maximum legal move” to the smaller of the current pile size and twice the number from Step 2.

7. If the current pile size is zero,

a. Ask the Display to displayTheMessage, “ wins”,

b. State aloud, “ChipsGame is done.” (You are done.)

8. Mentally move to the next player, i.e. make the next player in the list the current player.

9. Go to Step 2.

[pic]

When you are asked for your PileSize, simply state that number aloud.

[pic]

When you are asked for your MaximumLegalMove, simply state that number aloud.

[pic]

When you are asked for your Display, simply state its name aloud.

[pic]

When you are asked to Show

1. Ask your Display to displayTheMessage, “The pile currently holds chips”.

2. Ask your Display to displayTheMessage, “The current maximum move is ”.

You are a TextDisplay

When you are told to construct yourself, simply state aloud, “Done constructing TextDisplay”.

[pic]

When you are asked to displayTheMessage, you will be given some information. Simply stand up and repeat that information to the room. (It will help if you do so in an authoritative voice.)

[pic]

When you are asked to getANumberBetween, you will be given two numbers. Negotiate with the people in the room until you agree upon a number within those bounds (inclusive). (Authoritatively,) state that number aloud.

You are a ChipsGameDriver

You begin this role play.

1. Construct a OnesPlayer as follows. State aloud, “, construct yourself as a OnesPlayer. Your nickname is George.”

2. Construct a RandomPlayer as follows. State aloud, “, construct yourself as a RandomPlayer. Your nickname is Martha”

3. Construct a TextDipslay as follows. State aloud, “, construct yourself as a TextDipslay.”

4. Construct a ChipsGame as follows. State aloud, “, construct yourself as a ChipsGame; you have seven chips; your display is ; your players are .”

5. Now ask the ChipsGame to Play.

6. State aloud, “Done playing Chips.”

You are a ChipsGameDriver (Alternate version)

You begin this role play.

1. Construct an ExternalPlayer as follows. State aloud, “, construct yourself as an ExternalPlayer. Your nickname is Fred.”

2. Construct a OnesPlayer as follows. State aloud, “, construct yourself as a OnesPlayer. Your nickname is Wilma.”

3. Construct a TextDipslay as follows. State aloud, “, construct yourself as a TextDipslay.”

4. Construct a ChipsGame as follows. State aloud, “, construct yourself as a ChipsGame; you have thirteen chips; your display is ; your players are .”

5. Now ask the ChipsGame to Play.

6. State aloud, “Done playing Chips.”

P.S. Links to all of the role play documents can be found at



................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download