to the kinds of things that appear in the situation we are attempting to model three obvious types are locationfieldand drunk as we look at the classes providing these typesit is worthwhile to think about what each might imply about the kinds of simulation models they will allow us to build let' start with location class location(object)def __init__(selfxy)""" and are floats""self self def move(selfdeltaxdeltay)"""deltax and deltay are floats""return location(self deltaxself deltaydef getx(self)return self def gety(self)return self def distfrom(selfother)ox other oy other xdist self ox ydist self oy return (xdist** ydist** )** def __str__(self)return 'figure location class this is simple classbut it does embody two important decisions it tells us that the simulation will involve at most two dimensions the simulation will not model changes in altitude this is consistent with the pictures above alsosince the values of deltax and deltay are floats rather than integersthere is no built-in assumption in this class about the set of directions in which drunk might move this is generalization of the informal model in which each step was of length one and was parallel to the -axis or -axis class field is also quite simplebut it too embodies notable decisions it simply maintains mapping of drunks to locations it places no constraints on locationsso presumably field is of unbounded size it allows multiple drunks to be added into field at random locations it says nothing about the patterns in which drunks movenor does it prohibit multiple drunks from occupying the same location or moving through spaces occupied by other drunks