80 likes | 468 Views
Angela DiCicco 10/3/05. Fish Fight. FW Server. Fish. Located in. energy level Scene position (x,y) size of fish food intake (digestion) fight(). Prompt Fight. Communicates fight, change of fish x and fish y. Communicates fight, change of fish x and fish y. Rendered as Fighting.
E N D
Angela DiCicco 10/3/05 Fish Fight FW Server Fish Located in energy level Scene position (x,y) size of fish food intake (digestion) fight() Prompt Fight Communicates fight, change of fish x and fish y Communicates fight, change of fish x and fish y Rendered as Fighting Fish World Scene[] Requests position, size, energy level Fights
Joe:Fish energy level Scene position (x,y)size of fish food intake (digestion) fight() Fish Fight Collaboration Diagram :FW Server << communicate fight # #>> << communicate Fish locations >> fight(Lee,energyloss) Location render(Scene*) :Fish World Scene[] Lee:AutomatedFish Location render(Scene*) energy level Scene position (x,y)size of fish food intake (digestion) fight() fight(Joe,energyloss) {current scene that user is viewing}
Angela DiCicco 10/3/05 Fish Grows/Eats Fish FW Server energy level Scene position (x,y) size of fish food intake (digestion) Communicates Growth of fish, removal of food Communicates Growth of fish, removal of food Communicates Growth Energy increased Growth eats Food Fish World position (x,y) Scene amount of pellets Scene[] Communicates Removal
:FW Server Convert to Fish Grows/Eats to a Collaboration Diagram :Fish energy level Scene position (x,y) size of fish food intake (digestion) <<send remove food ##>> <<send state fish ##>> State: eatFood(FoodAmt) render(scene) :Fish World :Food remove( ) Scene[] position (x,y) Scene amount of pellets :Food :Fish World :Food remove( ) remove( ) position (x,y) Scene amount of pellets
Class Diagram: G a m e S t a r t s Hazard BottmoDweller Pos (x,y) SceNumber Pos (x,y) SceNumber Creates, positions Creates, positions Fish Assign image set Energy level Scene Pos (x,y) Color FishWorld Assign position Fish[] Scene[] or scene[] [] AbstractView Creates Assign color to all fishes andcommunicate position of the fish and the other fishes Located Scene Creates, Draws Contaiins SceNumber Foregroundbackground FWServer Felix Rosen
Class Diagram: G a m e S t a r t s {Location = x,y,scene#)} Hazard BottmoDweller {Most Hazards are created after game start} Pos (x,y) SceNumber Pos (x,y) {Hazard type is embodied in each specific subclass} SceNumber Hazard(Location,) start() Location:render(scene#) BottomDweller(Location, ID) start() Fish Location:render(scene#) Fish(Location, ID, color) FishWorld Energy level Scene Pos (x,y) Color start() Fish[] Scene[] or scene[] [] AbstractView Location:render(scene#) <<prompt create Fish (color, ID), Hazards(type, ID) , BottomDweller(ID)>> Scene( imageName) Scene renderForeground() SceNumber Foregroundbackground renderBackground() FWServer Felix Rosen
:FWServer sendSocketInput(update_message) <<sendUpdate Message>> {Server Side} :SocketListener :SocketListener <<sendUpdate Message>> sendSocketInput(update_message) {Client Side} :FishWorld {show update}