Bumper Two Player

First, a confession: we don’t actually make the boats bump each other. We needed to finish the discussion in one day, so we did not add any physics that wasn’t present in the one-player version.

One Player Review

The one player code does the following:

Requiring bumper-boats-single.rkt gives the following functions:

(define-struct boat ([id : Integer] [name : String]
                     [pos : Posn]  [vel : Posn]
                     [color : Color]
                     [radius : Positive-Integer])

Two Player Conversion

The Game structure was a number to keep track of whose turn it is and two Boat structures, one for each player. Require the one player file so the old functions are available.

(require "bumper-boats.single.rkt")