CS 2420-20 Homework 22

Due: Tuesday, April 26th, 2011 9:10am

Start with field.zip, which implements a game simulation using Racket message passing.

The game simulation is just like the C lock-based version, except for one case: When a player tries to move to a position where a second player is standing, if the second player is involved in a contest, then the moving player is “bumped” and does not move. In the C lock-based version, the moving player instead waits until the contest is over, at which point it might have a chance to steal from or pass to the second player.

Fix the message-passing simulation to match the lock-based simulation.

Here’s one possible strategy:


Last update: Tuesday, April 19th, 2011
mflatt@cs.utah.edu