Solution for exercise 13:
edited another state in the server and client, added the rocket, added the 'Shell.java' and 'ShellControl.java' edited the logic for the states and 3 messages for the server client comunication, edited the 'SeaSynchronizer' and ShipMapSynchronizer', so that the animations will be displayed, added the sound for the rocket
This commit is contained in:
654
Dokumente/Feyer_Benjamin_BPMN_Diagramm.drawio
Normal file
654
Dokumente/Feyer_Benjamin_BPMN_Diagramm.drawio
Normal file
@@ -0,0 +1,654 @@
|
||||
<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.7.8 Chrome/128.0.6613.36 Electron/32.0.1 Safari/537.36" version="24.7.8">
|
||||
<diagram name="Page-1" id="2a216829-ef6e-dabb-86c1-c78162f3ba2b">
|
||||
<mxGraphModel dx="2009" dy="2329" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="none" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0" />
|
||||
<mxCell id="1" parent="0" />
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-13" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="300" y="280" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="7a84cebc1def654-34" value="" style="shape=message;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="310" y="295" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-29" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-1" target="Sf4z-aHPgcdhoojVuiNO-27">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-1" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="100" y="180" width="80" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-2" value="start client 1" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||
<mxGeometry x="110" y="260" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-3" target="Sf4z-aHPgcdhoojVuiNO-10">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-3" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="100" y="340" width="80" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-4" value="start server" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||
<mxGeometry x="110" y="420" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-5" target="Sf4z-aHPgcdhoojVuiNO-23">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-5" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="100" y="500" width="80" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-8" value="start cleint 2" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
||||
<mxGeometry x="110" y="580" width="60" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-10" target="Sf4z-aHPgcdhoojVuiNO-14">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-10" target="Sf4z-aHPgcdhoojVuiNO-13">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-10" value="" style="shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;outline=none;symbol=parallelGw;" vertex="1" parent="1">
|
||||
<mxGeometry x="240" y="355" width="50" height="50" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-13" target="Sf4z-aHPgcdhoojVuiNO-17">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-19" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-14" target="Sf4z-aHPgcdhoojVuiNO-17">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-14" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="300" y="420" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-37" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-17" target="Sf4z-aHPgcdhoojVuiNO-31">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-17" value="" style="shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;outline=none;symbol=parallelGw;" vertex="1" parent="1">
|
||||
<mxGeometry x="390" y="355" width="50" height="50" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-22" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="310" y="435" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-48" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-23" target="Sf4z-aHPgcdhoojVuiNO-42">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-23" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="300" y="510" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-24" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="310" y="525" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-46" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-27" target="Sf4z-aHPgcdhoojVuiNO-44">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-27" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="300" y="190" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-28" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="310" y="205" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-38" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-31" target="Sf4z-aHPgcdhoojVuiNO-33">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-31" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="470" y="350" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-32" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="480" y="365" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-39" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-33" target="Sf4z-aHPgcdhoojVuiNO-35">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-33" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="600" y="350" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-34" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="610" y="365" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-55" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-35" target="Sf4z-aHPgcdhoojVuiNO-52">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-57" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-35" target="Sf4z-aHPgcdhoojVuiNO-50">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-35" value="" style="shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;outline=none;symbol=parallelGw;" vertex="1" parent="1">
|
||||
<mxGeometry x="730" y="355" width="50" height="50" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-62" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-40" target="Sf4z-aHPgcdhoojVuiNO-60">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-40" value="edit ship map" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="600" y="190" width="90" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-63" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-41" target="Sf4z-aHPgcdhoojVuiNO-58">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-41" value="edit ship map" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="730" y="510" width="90" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-49" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-42" target="Sf4z-aHPgcdhoojVuiNO-41">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-42" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="600" y="510" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-43" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="610" y="525" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-47" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-44" target="Sf4z-aHPgcdhoojVuiNO-40">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-44" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="470" y="190" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-45" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="480" y="205" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-67" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-50" target="Sf4z-aHPgcdhoojVuiNO-64">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-50" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="865" y="280" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-51" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="875" y="295" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-66" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-52" target="Sf4z-aHPgcdhoojVuiNO-65">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-52" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="865" y="420" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-53" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="875" y="435" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-89" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-58" target="Sf4z-aHPgcdhoojVuiNO-87">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-58" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="865" y="510" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-59" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="875" y="525" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-90" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-60" target="Sf4z-aHPgcdhoojVuiNO-85">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-60" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="865" y="190" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-61" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="875" y="205" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-69" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-64" target="Sf4z-aHPgcdhoojVuiNO-68">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-64" value="save player 1 map" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="980" y="280" width="120" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-70" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-65" target="Sf4z-aHPgcdhoojVuiNO-68">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-65" value="save player 2 map" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="980" y="420" width="120" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-81" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-68" target="Sf4z-aHPgcdhoojVuiNO-77">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-68" value="" style="shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;outline=none;symbol=parallelGw;" vertex="1" parent="1">
|
||||
<mxGeometry x="1160" y="355" width="50" height="50" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-76" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-77" target="Sf4z-aHPgcdhoojVuiNO-79">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-77" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1260" y="350" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-78" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1270" y="365" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-108" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-79" target="Sf4z-aHPgcdhoojVuiNO-103">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-79" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1390" y="350" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-80" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1400" y="365" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-107" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-85" target="Sf4z-aHPgcdhoojVuiNO-105">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-85" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1260" y="190" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-86" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1270" y="205" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-156" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-87" target="Sf4z-aHPgcdhoojVuiNO-147">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-87" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1390" y="510" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-88" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1400" y="525" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-145" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-91" target="Sf4z-aHPgcdhoojVuiNO-141">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-91" value="process shot" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1650" y="350" width="120" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-92" value="connect" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="300" y="570" width="70" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-93" value="connect" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="300" y="160" width="70" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-94" value="send GameDetails" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="440" y="410" width="120" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-95" value="send GameDetails" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="570" y="320" width="120" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-96" value="send MapMessage" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="835" y="570" width="120" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-97" value="send MapMessage" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="835" y="160" width="120" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-100" value="send StartBattleMessage" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="1210" y="410" width="160" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-101" value="send StartBattleMessage" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="1340" y="320" width="160" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-109" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-103" target="Sf4z-aHPgcdhoojVuiNO-91">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-103" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1520" y="350" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-104" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1530" y="365" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-155" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-105" target="Sf4z-aHPgcdhoojVuiNO-149">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-105" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1520" y="190" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-106" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1530" y="205" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-110" value="send ShotMessage" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="1485" y="160" width="130" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-112" value="" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="325" y="500" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-116" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-112" target="Sf4z-aHPgcdhoojVuiNO-14">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="350" y="490" as="sourcePoint" />
|
||||
<mxPoint x="510" y="490" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-119" value="" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="495" y="340" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-120" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-119">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="520" y="330" as="sourcePoint" />
|
||||
<mxPoint x="500" y="250" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-121" value="" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="890" y="500" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-122" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-121">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="915" y="490" as="sourcePoint" />
|
||||
<mxPoint x="895" y="480" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-127" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="625" y="410" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-129" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-127" target="Sf4z-aHPgcdhoojVuiNO-42">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="410" y="400" as="sourcePoint" />
|
||||
<mxPoint x="570" y="400" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-131" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="325" y="250" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-132" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-131">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="110" y="240" as="sourcePoint" />
|
||||
<mxPoint x="330" y="280" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-133" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="890" y="250" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-134" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-133">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="675" y="240" as="sourcePoint" />
|
||||
<mxPoint x="895" y="280" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-135" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1415" y="410" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-136" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-135">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="1200" y="400" as="sourcePoint" />
|
||||
<mxPoint x="1420" y="510" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-137" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1545" y="250" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-138" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-137">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="1330" y="240" as="sourcePoint" />
|
||||
<mxPoint x="1550" y="350" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-139" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1285" y="340" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-140" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-139" target="Sf4z-aHPgcdhoojVuiNO-85">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="1070" y="330" as="sourcePoint" />
|
||||
<mxPoint x="1290" y="440" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-146" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-141" target="Sf4z-aHPgcdhoojVuiNO-143">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-141" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1830" y="350" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-142" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1840" y="365" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-188" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-143" target="Sf4z-aHPgcdhoojVuiNO-178">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-143" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1970" y="350" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-144" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1980" y="365" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-163" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-147" target="Sf4z-aHPgcdhoojVuiNO-161">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-147" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1970" y="510" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-148" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1980" y="525" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-162" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-149" target="Sf4z-aHPgcdhoojVuiNO-160">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-149" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1830" y="190" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-150" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1840" y="205" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-151" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1995" y="410" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-152" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-151">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="1780" y="400" as="sourcePoint" />
|
||||
<mxPoint x="2000" y="510" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-154" value="send AnimationStartMessage" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="1910" y="320" width="180" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-157" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="1855" y="340" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-158" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-157">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="1865" y="336.07000000000016" as="sourcePoint" />
|
||||
<mxPoint x="1859.88" y="250" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-159" value="send AnimationStartMessage" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="1770" y="428" width="180" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-196" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-160" target="Sf4z-aHPgcdhoojVuiNO-194">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-160" value="Animate the shot" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1960" y="190" width="120" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-199" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-161">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="2260" y="539.8947368421054" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-161" value="Animate the shot" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2090" y="510" width="120" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-176" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-178" target="Sf4z-aHPgcdhoojVuiNO-182">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-191" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-178" target="Sf4z-aHPgcdhoojVuiNO-189">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-178" value="" style="shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;outline=none;symbol=parallelGw;" vertex="1" parent="1">
|
||||
<mxGeometry x="2130" y="355" width="50" height="50" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-179" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="2325" y="310" as="sourcePoint" />
|
||||
<mxPoint x="2380" y="310" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-181" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-182">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="2380" y="450" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-182" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="2265" y="420" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-183" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2275" y="435" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-189" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="2265" y="280" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-190" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2275" y="295" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-210" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-194" target="Sf4z-aHPgcdhoojVuiNO-206">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-194" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="2265" y="190" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-195" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2275" y="205" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-211" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-197" target="Sf4z-aHPgcdhoojVuiNO-208">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-197" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="2265" y="510" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-198" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2275" y="525" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-225" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-202" target="Sf4z-aHPgcdhoojVuiNO-215">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-202" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="2380" y="420" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-203" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2390" y="435" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-224" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-204" target="Sf4z-aHPgcdhoojVuiNO-217">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-204" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="2380" y="280" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-205" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2390" y="295" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-223" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-206" target="Sf4z-aHPgcdhoojVuiNO-219">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-206" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="2380" y="190" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-207" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2390" y="205" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-226" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-208" target="Sf4z-aHPgcdhoojVuiNO-221">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-208" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="2380" y="510" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-209" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2390" y="525" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-229" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-215" target="Sf4z-aHPgcdhoojVuiNO-227">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-215" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="2540" y="420" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-216" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2550" y="435" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-228" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-217" target="Sf4z-aHPgcdhoojVuiNO-227">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-217" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="2540" y="280" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-218" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2550" y="295" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-219" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="2540" y="190" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-220" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2550" y="205" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-221" value="" style="ellipse;shape=doubleEllipse;html=1;dashed=0;whiteSpace=wrap;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="2540" y="510" width="60" height="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-222" value="" style="shape=message;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2550" y="525" width="40" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-227" value="" style="shape=mxgraph.bpmn.shape;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;perimeter=rhombusPerimeter;background=gateway;outline=none;symbol=parallelGw;" vertex="1" parent="1">
|
||||
<mxGeometry x="2720" y="345" width="50" height="50" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-230" value="send animationEndMessage" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="2200" y="160" width="170" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-231" value="send animationEndMessage" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="2210" y="570" width="170" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-232" value="send Effect Message" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="2340" y="340" width="140" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-234" value="send Effect Message" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="2340" y="390" width="140" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-235" value="send BackToBattleStateMessage" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="2480" y="340" width="200" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-236" value="send BackToBattleStateMessage" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="2490" y="390" width="200" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-244" value="" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2290" y="500" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-245" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-244">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="2315" y="490" as="sourcePoint" />
|
||||
<mxPoint x="2295" y="480" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-248" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="2409.71" y="269.9999999999998" as="sourcePoint" />
|
||||
<mxPoint x="2409.71" y="250" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-250" value="" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2565" y="270" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-251" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-250">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="2590" y="260" as="sourcePoint" />
|
||||
<mxPoint x="2570" y="250" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-253" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-247">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="2294.71" y="260" as="sourcePoint" />
|
||||
<mxPoint x="2294.71" y="279.9999999999998" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-254" value="" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2405" y="270" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-256" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" target="Sf4z-aHPgcdhoojVuiNO-247">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="2294.71" y="260" as="sourcePoint" />
|
||||
<mxPoint x="2294.71" y="279.9999999999998" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-247" value="" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2290" y="250" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-257" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-258">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="2409.71" y="490" as="sourcePoint" />
|
||||
<mxPoint x="2409.71" y="509.9999999999998" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-258" value="" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2405" y="480" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-259" value="" style="endArrow=block;dashed=1;endFill=0;endSize=12;html=1;rounded=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-260">
|
||||
<mxGeometry width="160" relative="1" as="geometry">
|
||||
<mxPoint x="2569.71" y="490" as="sourcePoint" />
|
||||
<mxPoint x="2569.71" y="509.9999999999998" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-260" value="" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2565" y="480" width="10" height="10" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-261" value="Game Play" style="whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="2870" y="110" width="120" height="490" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-265" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-227">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="2870" y="370" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-267" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-219">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="2870" y="220" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="Sf4z-aHPgcdhoojVuiNO-268" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.018;entryY=0.878;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="Sf4z-aHPgcdhoojVuiNO-221" target="Sf4z-aHPgcdhoojVuiNO-261">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
174
Dokumente/State_Diagram_Feyer.drawio
Normal file
174
Dokumente/State_Diagram_Feyer.drawio
Normal file
@@ -0,0 +1,174 @@
|
||||
<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.7.8 Chrome/128.0.6613.36 Electron/32.0.1 Safari/537.36" version="24.7.8">
|
||||
<diagram name="Seite-1" id="CSCMTvoyx8GfkIWIgrj5">
|
||||
<mxGraphModel dx="2171" dy="1811" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0" />
|
||||
<mxCell id="1" parent="0" />
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-10" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-2" target="8jlTEtXbO0kP9G_WUDS2-8">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-2" target="8jlTEtXbO0kP9G_WUDS2-12">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-2" value="" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="70" y="320" width="80" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-6" value="addPlayer(id)" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="130" y="290" width="90" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-7" value="[otherwise]" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="-10" y="358" width="80" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-8" target="8jlTEtXbO0kP9G_WUDS2-16">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-8" target="8jlTEtXbO0kP9G_WUDS2-16">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-8" value="Set up" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="72.5" y="450" width="75" height="20" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-11" value="[players.size()=2]/send GameDetail messages" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="125" y="360" width="270" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-12" target="8jlTEtXbO0kP9G_WUDS2-2">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-12" value="" style="ellipse;fillColor=strokeColor;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="15" y="260" width="30" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-22" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-16" target="8jlTEtXbO0kP9G_WUDS2-21">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-16" value="<span style="color: rgba(0, 0, 0, 0); font-family: monospace; font-size: 0px; text-align: start; text-wrap: nowrap;">%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22%22%20style%3D%22rhombus%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22170%22%20y%3D%22530%22%20width%3D%2280%22%20height%3D%2240%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E</span>" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="170" y="520" width="80" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-19" value="received MapMessage<div><br></div>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="220" y="470" width="140" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-20" value="[otherwise]" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="50" y="588" width="80" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-21" target="8jlTEtXbO0kP9G_WUDS2-24">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-21" value="Battle" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="172.5" y="640" width="75" height="20" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-23" value="[readyPlayers.size() = 2]" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="220" y="585" width="150" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-28" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-24">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="342.3548387096773" y="830" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-24" value="Animation wait" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="285" y="680" width="115" height="20" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-29" target="8jlTEtXbO0kP9G_WUDS2-21">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-32" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-29" target="8jlTEtXbO0kP9G_WUDS2-31">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-29" value="<span style="color: rgba(0, 0, 0, 0); font-family: monospace; font-size: 0px; text-align: start; text-wrap: nowrap;">%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22%22%20style%3D%22rhombus%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22170%22%20y%3D%22530%22%20width%3D%2280%22%20height%3D%2240%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E</span>" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="302.5" y="830" width="80" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-31" value="Game over" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="285" y="960" width="115" height="20" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-33" value="[game over]" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="345" y="888" width="90" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-34" value="[otherwise]" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="205" y="860" width="80" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-39" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-35" target="8jlTEtXbO0kP9G_WUDS2-38">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-35" value="" style="ellipse;fillColor=strokeColor;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="550" y="260" width="30" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-41" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-38" target="8jlTEtXbO0kP9G_WUDS2-40">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-38" value="Initial State" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="670" y="265" width="75" height="20" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-40" target="8jlTEtXbO0kP9G_WUDS2-43">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-40" value="Editor State" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="670" y="358" width="75" height="20" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-42" value="receivedGameDetails(details)" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="720" y="298" width="180" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-45" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-43" target="8jlTEtXbO0kP9G_WUDS2-40">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-51" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-43" target="8jlTEtXbO0kP9G_WUDS2-50">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-43" value="<span style="color: rgba(0, 0, 0, 0); font-family: monospace; font-size: 0px; text-align: start; text-wrap: nowrap;">%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22%22%20style%3D%22rhombus%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22170%22%20y%3D%22530%22%20width%3D%2280%22%20height%3D%2240%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E</span>" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="780" y="470" width="80" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-46" value="mapFinished" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="815" y="368" width="90" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-47" value="[otherwise]" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="680" y="498" width="80" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-65" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-50" target="8jlTEtXbO0kP9G_WUDS2-52">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-50" value="Wait Stata" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="782.5" y="575" width="75" height="20" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-54" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-52" target="8jlTEtXbO0kP9G_WUDS2-53">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-52" value="Battle State" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="782.5" y="690" width="75" height="20" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-57" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-53" target="8jlTEtXbO0kP9G_WUDS2-56">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-53" value="Animation State" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="940" y="760" width="110" height="20" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-55" value="receivedAnimationMessage(msg)" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="900" y="660" width="200" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-59" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-56" target="8jlTEtXbO0kP9G_WUDS2-52">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-62" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="8jlTEtXbO0kP9G_WUDS2-56" target="8jlTEtXbO0kP9G_WUDS2-61">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-56" value="<span style="color: rgba(0, 0, 0, 0); font-family: monospace; font-size: 0px; text-align: start; text-wrap: nowrap;">%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22%22%20style%3D%22rhombus%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22170%22%20y%3D%22530%22%20width%3D%2280%22%20height%3D%2240%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E</span>" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="955" y="878" width="80" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-60" value="receivedBackToBattleStateMessage(msg)" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="1030" y="810" width="250" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-61" value="game over" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="940" y="970" width="110" height="20" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-63" value="[game over]" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="1005" y="930" width="90" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-64" value="[otherwise]" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="832" y="918" width="80" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-66" value="[horbor&nbsp; empty] / send MapMessage" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="832" y="525" width="220" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="8jlTEtXbO0kP9G_WUDS2-67" value="receivedStartBattle(msg)" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="827" y="610" width="160" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
@@ -33,6 +33,7 @@ public class GameSound extends AbstractAppState implements GameEventListener {
|
||||
private AudioNode splashSound;
|
||||
private AudioNode shipDestroyedSound;
|
||||
private AudioNode explosionSound;
|
||||
private AudioNode rocketSound;
|
||||
|
||||
/**
|
||||
* Checks if sound is enabled in the preferences.
|
||||
@@ -77,6 +78,7 @@ public void initialize(AppStateManager stateManager, Application app) {
|
||||
shipDestroyedSound = loadSound(app, "Sound/Effects/sunken.wav"); //NON-NLS
|
||||
splashSound = loadSound(app, "Sound/Effects/splash.wav"); //NON-NLS
|
||||
explosionSound = loadSound(app, "Sound/Effects/explosion.wav"); //NON-NLS
|
||||
rocketSound = loadSound(app, "Sound/Effects/rocket-loop-99748.wav");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -92,8 +94,7 @@ private AudioNode loadSound(Application app, String name) {
|
||||
sound.setLooping(false);
|
||||
sound.setPositional(false);
|
||||
return sound;
|
||||
}
|
||||
catch (AssetLoadException | AssetNotFoundException ex) {
|
||||
} catch (AssetLoadException | AssetNotFoundException ex) {
|
||||
LOGGER.log(Level.ERROR, ex.getMessage(), ex);
|
||||
}
|
||||
return null;
|
||||
@@ -129,6 +130,25 @@ public void receivedEvent(SoundEvent event) {
|
||||
case EXPLOSION -> explosion();
|
||||
case SPLASH -> splash();
|
||||
case DESTROYED_SHIP -> shipDestroyed();
|
||||
case ROCKET -> rocket();
|
||||
case ROCKET_STOP -> rocketStopped();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* this method plays the sound of the rocket
|
||||
*/
|
||||
private void rocket() {
|
||||
if (isEnabled() && splashSound != null)
|
||||
rocketSound.playInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* this method stops the sound of the rocket
|
||||
*/
|
||||
private void rocketStopped() {
|
||||
rocketSound.stop();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -12,20 +12,26 @@
|
||||
import com.jme3.scene.Node;
|
||||
import com.jme3.scene.Spatial;
|
||||
import pp.battleship.model.Battleship;
|
||||
import pp.battleship.model.Shell;
|
||||
import pp.battleship.model.Shot;
|
||||
import pp.util.Position;
|
||||
|
||||
import java.lang.System.Logger;
|
||||
|
||||
/**
|
||||
* Synchronizes the visual representation of the ship map with the game model.
|
||||
* It handles the rendering of ships and shots on the map view, updating the view
|
||||
* whenever changes occur in the model.
|
||||
*/
|
||||
class MapViewSynchronizer extends ShipMapSynchronizer {
|
||||
private static final Logger LOGGER = System.getLogger(MapViewSynchronizer.class.getName());
|
||||
// Constants for rendering properties
|
||||
private static final float SHIP_LINE_WIDTH = 6f;
|
||||
private static final float SHOT_DEPTH = -2f;
|
||||
private static final float SHIP_DEPTH = 0f;
|
||||
private static final float INDENT = 4f;
|
||||
private static final float SHELL_DEPTH = 8f;
|
||||
private static final float SHELL_IN_GRID = 0.1f;
|
||||
|
||||
// Colors used for different visual elements
|
||||
private static final ColorRGBA HIT_COLOR = ColorRGBA.Red;
|
||||
@@ -65,9 +71,9 @@ public Spatial visit(Shot shot) {
|
||||
|
||||
// Create and return a rectangle representing the shot
|
||||
return view.getApp().getDraw().makeRectangle(p1.getX(), p1.getY(),
|
||||
SHOT_DEPTH,
|
||||
p2.getX() - p1.getX(), p2.getY() - p1.getY(),
|
||||
color);
|
||||
SHOT_DEPTH,
|
||||
p2.getX() - p1.getX(), p2.getY() - p1.getY(),
|
||||
color);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -109,6 +115,35 @@ public Spatial visit(Battleship ship) {
|
||||
return shipNode;
|
||||
}
|
||||
|
||||
/**
|
||||
* this method will create a representation of a shell in the map
|
||||
*
|
||||
* @param shell the Shell element to visit
|
||||
* @return the node the representation is attached to
|
||||
*/
|
||||
@Override
|
||||
public Spatial visit(Shell shell) {
|
||||
LOGGER.log(Logger.Level.DEBUG, "Visiting {0}", shell);
|
||||
final Node shellNode = new Node("shell");
|
||||
final Position target = view.modelToView(shell.getX(), shell.getY());
|
||||
final Position startPosition = view.modelToView(SHELL_IN_GRID, SHELL_IN_GRID);
|
||||
shellNode.attachChild(createShell());
|
||||
shellNode.setLocalTranslation(startPosition.getX(), startPosition.getY(), SHELL_DEPTH);
|
||||
shellNode.scale(18f);
|
||||
shellNode.addControl(new ShellMapControl(view.getApp(), target, shell));
|
||||
return shellNode;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the red dot for the shell in the MapViewSynchronizer
|
||||
*
|
||||
* @return Spatial
|
||||
*/
|
||||
private Spatial createShell() {
|
||||
return view.getApp().getDraw().makeFilledCircle(ColorRGBA.Red);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a line geometry representing part of the ship's border.
|
||||
*
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
|
||||
import com.jme3.effect.ParticleEmitter;
|
||||
import com.jme3.effect.ParticleMesh.Type;
|
||||
import com.jme3.light.AmbientLight;
|
||||
import com.jme3.light.DirectionalLight;
|
||||
import com.jme3.light.Light;
|
||||
import com.jme3.material.Material;
|
||||
import com.jme3.material.RenderState.BlendMode;
|
||||
import com.jme3.math.ColorRGBA;
|
||||
@@ -21,18 +18,15 @@
|
||||
import com.jme3.scene.Node;
|
||||
import com.jme3.scene.Spatial;
|
||||
import com.jme3.scene.shape.Box;
|
||||
import com.jme3.scene.shape.Cylinder;
|
||||
import com.simsilica.lemur.effect.EffectControl;
|
||||
import pp.battleship.client.BattleshipApp;
|
||||
import pp.battleship.model.Battleship;
|
||||
import pp.battleship.model.Rotation;
|
||||
import pp.battleship.model.Shell;
|
||||
import pp.battleship.model.ShipMap;
|
||||
import pp.battleship.model.Shot;
|
||||
|
||||
import java.awt.Point;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.lang.System.Logger;
|
||||
import java.lang.System.Logger.Level;
|
||||
import java.util.Timer;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static pp.util.FloatMath.HALF_PI;
|
||||
@@ -45,6 +39,8 @@
|
||||
* logic for the sea map.
|
||||
*/
|
||||
class SeaSynchronizer extends ShipMapSynchronizer {
|
||||
private static final Logger LOGGER = System.getLogger(SeaSynchronizer.class.getName());
|
||||
|
||||
private static final String UNSHADED = "Common/MatDefs/Misc/Unshaded.j3md"; //NON-NLS
|
||||
private static final String KING_GEORGE_V_MODEL = "Models/KingGeorgeV/KingGeorgeV.j3o"; //NON-NLS
|
||||
private static final String SUBMARINE = "Models/Submarine/submarine.obj";
|
||||
@@ -54,6 +50,7 @@ class SeaSynchronizer extends ShipMapSynchronizer {
|
||||
private static final String COLOR = "Color"; //NON-NLS
|
||||
private static final String SHIP = "ship"; //NON-NLS
|
||||
private static final String SHOT = "shot"; //NON-NLS
|
||||
private static final String ROCKET = "Models/Rocket/rocket.j3o";
|
||||
private static final ColorRGBA BOX_COLOR = ColorRGBA.Gray;
|
||||
private static final ColorRGBA SPLASH_COLOR = new ColorRGBA(0f, 0f, 1f, 0.4f);
|
||||
private static final ColorRGBA HIT_COLOR = new ColorRGBA(1f, 0f, 0f, 0.4f);
|
||||
@@ -145,8 +142,7 @@ private ParticleEmitter createFire(Shot shot) {
|
||||
Vector3f firePos = shotWorld.subtract(shipNodePos);
|
||||
if (map.findShipAt(shot.getX(), shot.getY()).getLength() == 2) {
|
||||
hitEffect.setLocalTranslation(firePos.x, 0.25f, firePos.z);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
hitEffect.setLocalTranslation(firePos.x, 0.5f, firePos.z);
|
||||
}
|
||||
return hitEffect;
|
||||
@@ -240,6 +236,38 @@ public Spatial visit(Battleship ship) {
|
||||
return node;
|
||||
}
|
||||
|
||||
/**
|
||||
* Visits a {@link Shell} and creates a graphical representation of it.
|
||||
* The representation is a 3D model
|
||||
*
|
||||
* @param shell the shell to be represented
|
||||
* @return the node containing the graphical representation of the shell
|
||||
*/
|
||||
@Override
|
||||
public Spatial visit(Shell shell) {
|
||||
LOGGER.log(Level.INFO, "was visited by SeaSynchronizer");
|
||||
final Node node = new Node("Shell");
|
||||
node.attachChild(createShell());
|
||||
node.setLocalTranslation(shell.getY() + 0.5f, 10, shell.getX() + 0.5f);
|
||||
node.addControl(new ShellControl(shell, app));
|
||||
return node;
|
||||
}
|
||||
|
||||
/**
|
||||
* this method loads the Model
|
||||
*
|
||||
* @return model
|
||||
*/
|
||||
private Spatial createShell() {
|
||||
LOGGER.log(Level.INFO, "created Shell");
|
||||
final Spatial model = app.getAssetManager().loadModel(ROCKET);
|
||||
model.rotate(PI, PI, 0);
|
||||
model.scale(0.0005f);
|
||||
model.move(0, 0, 0);
|
||||
model.setShadowMode(ShadowMode.CastAndReceive);
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the appropriate graphical representation of the specified battleship.
|
||||
* The representation is either a detailed model or a simple box based on the length of the ship.
|
||||
@@ -266,8 +294,8 @@ private Spatial createShip(Battleship ship) {
|
||||
*/
|
||||
private Spatial createBox(Battleship ship) {
|
||||
final Box box = new Box(0.5f * (ship.getMaxY() - ship.getMinY()) + 0.3f,
|
||||
0.3f,
|
||||
0.5f * (ship.getMaxX() - ship.getMinX()) + 0.3f);
|
||||
0.3f,
|
||||
0.5f * (ship.getMaxX() - ship.getMinX()) + 0.3f);
|
||||
final Geometry geometry = new Geometry(SHIP, box);
|
||||
geometry.setMaterial(createColoredMaterial(BOX_COLOR));
|
||||
geometry.setShadowMode(ShadowMode.CastAndReceive);
|
||||
@@ -275,6 +303,12 @@ private Spatial createBox(Battleship ship) {
|
||||
return geometry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Destroyer to represent a battleship that has the length of 3.
|
||||
*
|
||||
* @param ship the battleship to be represented
|
||||
* @return the model representing the battleship
|
||||
*/
|
||||
private Spatial createDestroyer(Battleship ship) {
|
||||
final Spatial model = app.getAssetManager().loadModel(DESTROYER);
|
||||
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()) - HALF_PI, 0f);
|
||||
@@ -284,6 +318,12 @@ private Spatial createDestroyer(Battleship ship) {
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Submarine to represent a battleship that has the length 2.
|
||||
*
|
||||
* @param ship the battleship to be represented
|
||||
* @return the model representing the battleship
|
||||
*/
|
||||
private Spatial createSubmarine(Battleship ship) {
|
||||
final Spatial model = app.getAssetManager().loadModel(SUBMARINE);
|
||||
model.rotate(-HALF_PI, calculateRotationAngle(ship.getRot()), 0f);
|
||||
@@ -295,6 +335,12 @@ private Spatial createSubmarine(Battleship ship) {
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a SmallShip to represent a battleship that has the length y.
|
||||
*
|
||||
* @param ship the battleship to be represented
|
||||
* @return the model representing the battleship
|
||||
*/
|
||||
private Spatial createSmallShip(Battleship ship) {
|
||||
final Spatial model = app.getAssetManager().loadModel(SMALL_SHIP);
|
||||
|
||||
|
||||
@@ -2,40 +2,67 @@
|
||||
|
||||
import com.jme3.renderer.RenderManager;
|
||||
import com.jme3.renderer.ViewPort;
|
||||
import com.jme3.scene.Spatial;
|
||||
import com.jme3.scene.control.AbstractControl;
|
||||
import pp.battleship.client.BattleshipApp;
|
||||
import pp.battleship.message.client.AnimationEndMessage;
|
||||
import pp.battleship.model.IntPoint;
|
||||
import pp.battleship.model.Shell;
|
||||
import pp.battleship.model.ShipMap;
|
||||
|
||||
import java.lang.System.Logger;
|
||||
import java.lang.System.Logger.Level;
|
||||
|
||||
/**
|
||||
* this class controls the Shell in the view
|
||||
*/
|
||||
public class ShellControl extends AbstractControl {
|
||||
|
||||
private Shell shell;
|
||||
private ShipMap map;
|
||||
private static final Logger LOGGER = System.getLogger(ShellControl.class.getName());
|
||||
|
||||
/**
|
||||
* the shell, that is displayed
|
||||
*/
|
||||
private Shell shell;
|
||||
|
||||
/**
|
||||
* the Height, when the shell will despawn
|
||||
*/
|
||||
private static final Float HEIGHT = 0f;
|
||||
|
||||
public ShellControl(Shell shell, ShipMap map){
|
||||
this.shell=shell;
|
||||
this.map=map;
|
||||
/**
|
||||
* the battleship app
|
||||
*/
|
||||
private BattleshipApp app;
|
||||
|
||||
/**
|
||||
* the constructor for this class
|
||||
*
|
||||
* @param shell the shell it displays
|
||||
* @param app the BattleshipApp
|
||||
*/
|
||||
public ShellControl(Shell shell, BattleshipApp app) {
|
||||
LOGGER.log(Level.INFO, "ShellControl has been initialized");
|
||||
this.shell = shell;
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
/**
|
||||
* this method controls the movement of the shell in dependent on fpt
|
||||
*
|
||||
* @param tpf time per frame (in seconds)
|
||||
*/
|
||||
@Override
|
||||
protected void controlUpdate(float tpf) {
|
||||
if (spatial == null) return;
|
||||
if(spatial.getLocalTranslation().getY()<=HEIGHT){
|
||||
if (spatial.getLocalTranslation().getY() <= HEIGHT) {
|
||||
spatial.getParent().detachChild(spatial);
|
||||
}
|
||||
else{
|
||||
spatial.move(0,-0.5f*tpf,0);
|
||||
app.getGameLogic().send(new AnimationEndMessage(new IntPoint(shell.getX(), shell.getY())));
|
||||
} else {
|
||||
spatial.move(0, -1 * 4f * tpf, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void controlRender(RenderManager rm, ViewPort vp) {
|
||||
|
||||
}
|
||||
|
||||
public Shell getShell(){
|
||||
return shell;
|
||||
//not in use
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package pp.battleship.client.gui;
|
||||
|
||||
import com.jme3.math.Vector3f;
|
||||
import com.jme3.renderer.RenderManager;
|
||||
import com.jme3.renderer.ViewPort;
|
||||
import com.jme3.scene.control.AbstractControl;
|
||||
import pp.battleship.client.BattleshipApp;
|
||||
import pp.battleship.message.client.AnimationEndMessage;
|
||||
import pp.battleship.model.IntPoint;
|
||||
import pp.battleship.model.Shell;
|
||||
import pp.battleship.notification.Sound;
|
||||
import pp.util.Position;
|
||||
|
||||
/**
|
||||
* this class controls the behaviour of a shell in a 2d map
|
||||
*/
|
||||
public class ShellMapControl extends AbstractControl {
|
||||
private static final System.Logger LOGGER = System.getLogger(ShellMapControl.class.getName());
|
||||
|
||||
/**
|
||||
* the position in map-coordinates
|
||||
*/
|
||||
private final Position position;
|
||||
|
||||
/**
|
||||
* the vector, the shell is going on the 2d screen
|
||||
*/
|
||||
private static final Vector3f vector = new Vector3f();
|
||||
|
||||
/**
|
||||
* the battleship app
|
||||
*/
|
||||
private final BattleshipApp app;
|
||||
|
||||
/**
|
||||
* the shell displayed
|
||||
*/
|
||||
private final Shell shell;
|
||||
|
||||
/**
|
||||
* the constructor for this class
|
||||
*
|
||||
* @param app the Battleship app
|
||||
* @param position the position shot at in map-coordinates
|
||||
* @param shell the shell shot
|
||||
*/
|
||||
public ShellMapControl(BattleshipApp app, Position position, Shell shell) {
|
||||
super();
|
||||
this.position = position;
|
||||
this.app = app;
|
||||
this.shell = shell;
|
||||
vector.set(new Vector3f(position.getX(), position.getY(), 0));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* the update loop for this shell
|
||||
*
|
||||
* @param tpf time per frame (in seconds)
|
||||
*/
|
||||
protected void controlUpdate(float tpf) {
|
||||
if (spatial.getLocalTranslation().getX() >= position.getX() && spatial.getLocalTranslation().getY() >= position.getY()) {
|
||||
app.getGameLogic().playSound(Sound.ROCKET_STOP);
|
||||
spatial.getParent().detachChild(spatial);
|
||||
app.getGameLogic().send(new AnimationEndMessage(new IntPoint(shell.getX(), shell.getY())));
|
||||
LOGGER.log(System.Logger.Level.DEBUG, "shell has been deleted", spatial.getLocalTranslation());
|
||||
} else {
|
||||
spatial.move(vector.mult(tpf));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void controlRender(RenderManager rm, ViewPort vp) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -18,13 +18,11 @@
|
||||
import pp.battleship.game.server.Player;
|
||||
import pp.battleship.game.server.ServerGameLogic;
|
||||
import pp.battleship.game.server.ServerSender;
|
||||
import pp.battleship.message.client.AnimationEndMessage;
|
||||
import pp.battleship.message.client.ClientMessage;
|
||||
import pp.battleship.message.client.MapMessage;
|
||||
import pp.battleship.message.client.ShootMessage;
|
||||
import pp.battleship.message.server.EffectMessage;
|
||||
import pp.battleship.message.server.GameDetails;
|
||||
import pp.battleship.message.server.ServerMessage;
|
||||
import pp.battleship.message.server.StartBattleMessage;
|
||||
import pp.battleship.message.server.*;
|
||||
import pp.battleship.model.Battleship;
|
||||
import pp.battleship.model.IntPoint;
|
||||
import pp.battleship.model.Shot;
|
||||
@@ -117,11 +115,15 @@ private void initializeSerializables() {
|
||||
Serializer.registerClass(Battleship.class);
|
||||
Serializer.registerClass(IntPoint.class);
|
||||
Serializer.registerClass(Shot.class);
|
||||
Serializer.registerClass(AnimationEndMessage.class);
|
||||
Serializer.registerClass(AnimationStartMessage.class);
|
||||
Serializer.registerClass(BackToBattleStateMessage.class);
|
||||
}
|
||||
|
||||
private void registerListeners() {
|
||||
myServer.addMessageListener(this, MapMessage.class);
|
||||
myServer.addMessageListener(this, ShootMessage.class);
|
||||
myServer.addMessageListener(this, AnimationEndMessage.class);
|
||||
myServer.addConnectionListener(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
Rocket origin:
|
||||
https://free3d.com/3d-model/proton-rocket-31617.html
|
||||
Licence: free for personal use
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
RocketSound origin:
|
||||
https://pixabay.com/sound-effects/rocket-loop-99748/
|
||||
Licence: free to use
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,116 @@
|
||||
package pp.battleship.game.client;
|
||||
|
||||
|
||||
import pp.battleship.message.client.AnimationEndMessage;
|
||||
import pp.battleship.message.server.AnimationStartMessage;
|
||||
import pp.battleship.message.server.BackToBattleStateMessage;
|
||||
import pp.battleship.message.server.EffectMessage;
|
||||
import pp.battleship.model.IntPoint;
|
||||
import pp.battleship.model.Shell;
|
||||
import pp.battleship.model.ShipMap;
|
||||
import pp.battleship.notification.Sound;
|
||||
|
||||
import java.lang.System.Logger;
|
||||
import java.lang.System.Logger.Level;
|
||||
|
||||
public class AnimationState extends ClientState {
|
||||
private static final Logger LOGGER = System.getLogger(AnimationState.class.getName());
|
||||
|
||||
/**
|
||||
* Constructs a client state of the specified game logic.
|
||||
*
|
||||
* @param logic the game logic
|
||||
*/
|
||||
AnimationState(ClientGameLogic logic, boolean myTurn, IntPoint pos) {
|
||||
super(logic);
|
||||
if (myTurn) {
|
||||
logic.getOpponentMap().add(new Shell(pos));
|
||||
logic.playSound(Sound.ROCKET);
|
||||
} else {
|
||||
logic.getOwnMap().add(new Shell(pos));
|
||||
logic.playSound(Sound.ROCKET);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean showBattle() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reports the effect of a shot based on the server message.
|
||||
*
|
||||
* @param msg the message containing the effect of the shot
|
||||
*/
|
||||
@Override
|
||||
public void receivedEffect(EffectMessage msg) {
|
||||
logic.playSound(Sound.ROCKET_STOP);
|
||||
ClientGameLogic.LOGGER.log(Level.INFO, "report effect: {0}", msg); //NON-NLS
|
||||
playSound(msg);
|
||||
logic.setInfoText(msg.getInfoTextKey()); //
|
||||
affectedMap(msg).add(msg.getShot());
|
||||
if (destroyedOpponentShip(msg)) {
|
||||
logic.getOpponentMap().add(msg.getDestroyedShip());
|
||||
}
|
||||
if (msg.isGameOver()) {
|
||||
msg.getRemainingOpponentShips().forEach(logic.getOpponentMap()::add);
|
||||
logic.setState(new GameOverState(logic));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines which map (own or opponent's) should be affected by the shot based on the message.
|
||||
*
|
||||
* @param msg the effect message received from the server
|
||||
* @return the map (either the opponent's or player's own map) that is affected by the shot
|
||||
*/
|
||||
private ShipMap affectedMap(EffectMessage msg) {
|
||||
return msg.isOwnShot() ? logic.getOpponentMap() : logic.getOwnMap();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the opponent's ship was destroyed by the player's shot.
|
||||
*
|
||||
* @param msg the effect message received from the server
|
||||
* @return true if the shot destroyed an opponent's ship, false otherwise
|
||||
*/
|
||||
private boolean destroyedOpponentShip(EffectMessage msg) {
|
||||
return msg.getDestroyedShip() != null && msg.isOwnShot();
|
||||
}
|
||||
|
||||
/**
|
||||
* receives an AnimationStartMessage and sets the state to AnimationState
|
||||
*
|
||||
* @param msg the message received
|
||||
*/
|
||||
public void receivedAnimationStart(AnimationStartMessage msg) {
|
||||
logic.setState(new AnimationState(logic, msg.isMyTurn(), msg.getPosition()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Plays a sound based on the outcome of the shot. Different sounds are played for a miss, hit,
|
||||
* or destruction of a ship.
|
||||
*
|
||||
* @param msg the effect message containing the result of the shot
|
||||
*/
|
||||
private void playSound(EffectMessage msg) {
|
||||
if (!msg.getShot().isHit())
|
||||
logic.playSound(Sound.SPLASH);
|
||||
else if (msg.getDestroyedShip() == null)
|
||||
logic.playSound(Sound.EXPLOSION);
|
||||
else
|
||||
logic.playSound(Sound.DESTROYED_SHIP);
|
||||
}
|
||||
|
||||
/**
|
||||
* receives a BackToBattleStateMessage and sets the state to BattleState
|
||||
*
|
||||
* @param msg the message received
|
||||
*/
|
||||
@Override
|
||||
public void receiveBackToBattleState(BackToBattleStateMessage msg) {
|
||||
logic.setState(new BattleState(logic, msg.isMyTurn()));
|
||||
}
|
||||
}
|
||||
@@ -8,12 +8,8 @@
|
||||
package pp.battleship.game.client;
|
||||
|
||||
import pp.battleship.message.client.ShootMessage;
|
||||
import pp.battleship.message.server.EffectMessage;
|
||||
import pp.battleship.message.server.AnimationStartMessage;
|
||||
import pp.battleship.model.IntPoint;
|
||||
import pp.battleship.model.ShipMap;
|
||||
import pp.battleship.notification.Sound;
|
||||
|
||||
import java.lang.System.Logger.Level;
|
||||
|
||||
/**
|
||||
* Represents the state of the client where players take turns to attack each other's ships.
|
||||
@@ -32,11 +28,21 @@ public BattleState(ClientGameLogic logic, boolean myTurn) {
|
||||
this.myTurn = myTurn;
|
||||
}
|
||||
|
||||
/**
|
||||
* this return-statement decides, whether the battle will be shown
|
||||
*
|
||||
* @return true, so the battle will be displayed
|
||||
*/
|
||||
@Override
|
||||
public boolean showBattle() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* the logic, responsible for deciding, whether it was a valid input or not
|
||||
*
|
||||
* @param pos the position where the click occurred
|
||||
*/
|
||||
@Override
|
||||
public void clickOpponentMap(IntPoint pos) {
|
||||
if (!myTurn)
|
||||
@@ -46,60 +52,13 @@ else if (logic.getOpponentMap().isValid(pos))
|
||||
}
|
||||
|
||||
/**
|
||||
* Reports the effect of a shot based on the server message.
|
||||
* Receives an AnimationStartEvent and changes then the client-state to AnimationState
|
||||
*
|
||||
* @param msg the message containing the effect of the shot
|
||||
* @param msg the message received
|
||||
*/
|
||||
//tODO
|
||||
@Override
|
||||
public void receivedEffect(EffectMessage msg) {
|
||||
ClientGameLogic.LOGGER.log(Level.INFO, "report effect: {0}", msg); //NON-NLS
|
||||
playSound(msg);
|
||||
myTurn = msg.isMyTurn(); //boolean, describes whether it is my turn
|
||||
logic.setInfoText(msg.getInfoTextKey()); //
|
||||
affectedMap(msg).add(msg.getShot());
|
||||
if (destroyedOpponentShip(msg)) {
|
||||
logic.getOpponentMap().add(msg.getDestroyedShip());
|
||||
}
|
||||
if (msg.isGameOver()) {
|
||||
//msg.getRemainingOpponentShips().forEach(logic.getOwnMap()::add);
|
||||
msg.getRemainingOpponentShips().forEach(logic.getOpponentMap()::add);
|
||||
logic.setState(new GameOverState(logic));
|
||||
}
|
||||
public void receivedAnimationStart(AnimationStartMessage msg) {
|
||||
logic.setState(new AnimationState(logic, msg.isMyTurn(), msg.getPosition()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines which map (own or opponent's) should be affected by the shot based on the message.
|
||||
*
|
||||
* @param msg the effect message received from the server
|
||||
* @return the map (either the opponent's or player's own map) that is affected by the shot
|
||||
*/
|
||||
private ShipMap affectedMap(EffectMessage msg) {
|
||||
return msg.isOwnShot() ? logic.getOpponentMap() : logic.getOwnMap();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the opponent's ship was destroyed by the player's shot.
|
||||
*
|
||||
* @param msg the effect message received from the server
|
||||
* @return true if the shot destroyed an opponent's ship, false otherwise
|
||||
*/
|
||||
private boolean destroyedOpponentShip(EffectMessage msg) {
|
||||
return msg.getDestroyedShip() != null && msg.isOwnShot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Plays a sound based on the outcome of the shot. Different sounds are played for a miss, hit,
|
||||
* or destruction of a ship.
|
||||
*
|
||||
* @param msg the effect message containing the result of the shot
|
||||
*/
|
||||
private void playSound(EffectMessage msg) {
|
||||
if (!msg.getShot().isHit())
|
||||
logic.playSound(Sound.SPLASH);
|
||||
else if (msg.getDestroyedShip() == null)
|
||||
logic.playSound(Sound.EXPLOSION);
|
||||
else
|
||||
logic.playSound(Sound.DESTROYED_SHIP);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,7 @@
|
||||
package pp.battleship.game.client;
|
||||
|
||||
import pp.battleship.message.client.ClientMessage;
|
||||
import pp.battleship.message.server.EffectMessage;
|
||||
import pp.battleship.message.server.GameDetails;
|
||||
import pp.battleship.message.server.ServerInterpreter;
|
||||
import pp.battleship.message.server.StartBattleMessage;
|
||||
import pp.battleship.message.server.*;
|
||||
import pp.battleship.model.IntPoint;
|
||||
import pp.battleship.model.ShipMap;
|
||||
import pp.battleship.model.dto.ShipMapDTO;
|
||||
@@ -226,6 +223,26 @@ public void received(EffectMessage msg) {
|
||||
state.receivedEffect(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reports the AnimationStartMessage based on the server-state
|
||||
*
|
||||
* @param animationStartMessage the StartMessage received
|
||||
*/
|
||||
@Override
|
||||
public void received(AnimationStartMessage animationStartMessage) {
|
||||
state.receivedAnimationStart(animationStartMessage);//TODO
|
||||
}
|
||||
|
||||
/**
|
||||
* Reports the BackToBattleStateMessage based on the server-state
|
||||
*
|
||||
* @param backToBattleStateMessage the Message received
|
||||
*/
|
||||
@Override
|
||||
public void received(BackToBattleStateMessage backToBattleStateMessage) {
|
||||
state.receiveBackToBattleState(backToBattleStateMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the player's own map, opponent's map, and harbor based on the game details.
|
||||
*
|
||||
@@ -304,7 +321,7 @@ public void saveMap(File file) throws IOException {
|
||||
*
|
||||
* @param msg the message to be sent
|
||||
*/
|
||||
void send(ClientMessage msg) {
|
||||
public void send(ClientMessage msg) {
|
||||
if (clientSender == null)
|
||||
LOGGER.log(Level.ERROR, "trying to send {0} with sender==null", msg); //NON-NLS
|
||||
else
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
|
||||
package pp.battleship.game.client;
|
||||
|
||||
import pp.battleship.message.server.EffectMessage;
|
||||
import pp.battleship.message.server.GameDetails;
|
||||
import pp.battleship.message.server.StartBattleMessage;
|
||||
import pp.battleship.message.server.*;
|
||||
import pp.battleship.model.IntPoint;
|
||||
|
||||
import java.io.File;
|
||||
@@ -165,6 +163,13 @@ void receivedEffect(EffectMessage msg) {
|
||||
ClientGameLogic.LOGGER.log(Level.ERROR, "receivedEffect not allowed in {0}", getName()); //NON-NLS
|
||||
}
|
||||
|
||||
/**
|
||||
* @param msg the message received
|
||||
*/
|
||||
void receivedAnimationStart(AnimationStartMessage msg) {
|
||||
ClientGameLogic.LOGGER.log(Level.ERROR, "receivedAnimationStart not allowed in {0}", getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a map from the specified file.
|
||||
*
|
||||
@@ -193,6 +198,15 @@ boolean maySaveMap() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Received a BackToBattleStateMessage and logs it
|
||||
*
|
||||
* @param msg the message received
|
||||
*/
|
||||
public void receiveBackToBattleState(BackToBattleStateMessage msg) {
|
||||
ClientGameLogic.LOGGER.log(Level.ERROR, "receivedBackToBattleState not allowed in {0}", getName());
|
||||
}
|
||||
|
||||
/**
|
||||
* Called once per frame by the update loop if this state is active.
|
||||
*
|
||||
|
||||
@@ -8,16 +8,13 @@
|
||||
package pp.battleship.game.server;
|
||||
|
||||
import pp.battleship.BattleshipConfig;
|
||||
import pp.battleship.message.client.AnimationEndMessage;
|
||||
import pp.battleship.message.client.ClientInterpreter;
|
||||
import pp.battleship.message.client.MapMessage;
|
||||
import pp.battleship.message.client.ShootMessage;
|
||||
import pp.battleship.message.server.EffectMessage;
|
||||
import pp.battleship.message.server.GameDetails;
|
||||
import pp.battleship.message.server.ServerMessage;
|
||||
import pp.battleship.message.server.StartBattleMessage;
|
||||
import pp.battleship.message.server.*;
|
||||
import pp.battleship.model.Battleship;
|
||||
import pp.battleship.model.IntPoint;
|
||||
import pp.battleship.model.Rotation;
|
||||
|
||||
import java.lang.System.Logger;
|
||||
import java.lang.System.Logger.Level;
|
||||
@@ -39,6 +36,8 @@ public class ServerGameLogic implements ClientInterpreter {
|
||||
private final ServerSender serverSender;
|
||||
private Player activePlayer;
|
||||
private ServerState state = ServerState.WAIT;
|
||||
private boolean playerOneAnimationReady = false;
|
||||
private boolean playerTwoAnimationReady = false;
|
||||
|
||||
/**
|
||||
* Constructs a ServerGameLogic with the specified sender and configuration.
|
||||
@@ -146,11 +145,34 @@ public void received(MapMessage msg, int from) {
|
||||
else if (!verifyMap(msg, from)) {
|
||||
LOGGER.log(Level.ERROR, "player submitted invalid map", state);
|
||||
send(getPlayerById(from), new GameDetails(config));
|
||||
}
|
||||
else
|
||||
} else
|
||||
playerReady(getPlayerById(from), msg.getShips());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void received(AnimationEndMessage msg, int from) {
|
||||
LOGGER.log(Level.INFO, "AnimationEndMessage was received by ServerGameLogic");
|
||||
if (state != ServerState.ANIMATION_WAIT_STATE)
|
||||
LOGGER.log(Level.ERROR, "animation not allowed in {0}", state);
|
||||
else if (getPlayerById(from) == players.get(0)) {
|
||||
LOGGER.log(Level.DEBUG, "{0} set to true", getPlayerById(from));
|
||||
playerOneAnimationReady = true;
|
||||
shoot(getPlayerById(from), msg.getPosition());
|
||||
} else if (getPlayerById(from) == players.get(1)) {
|
||||
LOGGER.log(Level.DEBUG, "{0} set to true {1}", getPlayerById(from), getPlayerById(from).toString());
|
||||
playerTwoAnimationReady = true;
|
||||
shoot(getPlayerById(from), msg.getPosition());
|
||||
}
|
||||
if (playerOneAnimationReady && playerTwoAnimationReady) {
|
||||
setState(ServerState.BATTLE);
|
||||
for (Player player : players)
|
||||
send(player, new BackToBattleStateMessage(player == activePlayer));
|
||||
playerOneAnimationReady = false;
|
||||
playerTwoAnimationReady = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* this method returns true, if the given map is valid (don't overlap or out of bound)
|
||||
*
|
||||
@@ -206,8 +228,13 @@ private boolean verifyOverlap(MapMessage msg) {
|
||||
public void received(ShootMessage msg, int from) {
|
||||
if (state != ServerState.BATTLE)
|
||||
LOGGER.log(Level.ERROR, "shoot not allowed in {0}", state); //NON-NLS
|
||||
else
|
||||
shoot(getPlayerById(from), msg.getPosition());
|
||||
else {
|
||||
for (Player player : players) {
|
||||
send(player, new AnimationStartMessage(msg.getPosition(), player == activePlayer));
|
||||
setState(ServerState.ANIMATION_WAIT_STATE);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -233,38 +260,125 @@ void playerReady(Player player, List<Battleship> ships) {
|
||||
/**
|
||||
* Handles the shooting action by the player.
|
||||
*
|
||||
* @param p the player who shot
|
||||
* @param pos the position of the shot
|
||||
* @param p the player who shot
|
||||
* @param position the position of the shot
|
||||
*/
|
||||
void shoot(Player p, IntPoint pos) {
|
||||
if (p != activePlayer) return;
|
||||
final Player otherPlayer = getOpponent(activePlayer);
|
||||
final Battleship selectedShip = otherPlayer.getMap().findShipAt(pos);
|
||||
void shoot(Player p, IntPoint position) {
|
||||
final Battleship selectedShip;
|
||||
selectedShip = getSelectedShip(p, position);
|
||||
if (selectedShip == null) {
|
||||
// shot missed
|
||||
send(activePlayer, EffectMessage.miss(true, pos));
|
||||
send(otherPlayer, EffectMessage.miss(false, pos));
|
||||
activePlayer = otherPlayer;
|
||||
nullShip(p, position);
|
||||
} else {
|
||||
shootShip(p, position, selectedShip);
|
||||
}
|
||||
else {
|
||||
// shot hit a ship
|
||||
selectedShip.hit(pos);
|
||||
if (otherPlayer.getMap().getRemainingShips().isEmpty()) {
|
||||
// game is over
|
||||
send(activePlayer, EffectMessage.won(pos, selectedShip));
|
||||
send(otherPlayer, EffectMessage.lost(pos, selectedShip, activePlayer.getMap().getRemainingShips()));
|
||||
setState(ServerState.GAME_OVER);
|
||||
}
|
||||
else if (selectedShip.isDestroyed()) {
|
||||
// ship has been destroyed, but game is not yet over
|
||||
send(activePlayer, EffectMessage.shipDestroyed(true, pos, selectedShip));
|
||||
send(otherPlayer, EffectMessage.shipDestroyed(false, pos, selectedShip));
|
||||
}
|
||||
else {
|
||||
// ship has been hit, but it hasn't been destroyed
|
||||
send(activePlayer, EffectMessage.hit(true, pos));
|
||||
send(otherPlayer, EffectMessage.hit(false, pos));
|
||||
}
|
||||
|
||||
/**
|
||||
* getter for the selected battleship through the shot
|
||||
*
|
||||
* @param p the current player
|
||||
* @param position the position shot at
|
||||
* @return the battleship, on the position shot at
|
||||
*/
|
||||
private Battleship getSelectedShip(Player p, IntPoint position) {
|
||||
return (p != activePlayer) ? p.getMap().findShipAt(position) : getOpponent(p).getMap().findShipAt(position);
|
||||
}
|
||||
|
||||
/**
|
||||
* this method handles the shot logic, if the shot misses
|
||||
*
|
||||
* @param p the current player
|
||||
* @param position the position shot at
|
||||
*/
|
||||
private void nullShip(Player p, IntPoint position) {
|
||||
if (p != activePlayer) {
|
||||
send(p, EffectMessage.miss(false, position));
|
||||
} else {
|
||||
send(activePlayer, EffectMessage.miss(true, position));
|
||||
}
|
||||
//switches the active player, when both have finished their animation
|
||||
if (playerOneAnimationReady && playerTwoAnimationReady) {
|
||||
LOGGER.log(Level.DEBUG, "switched active player");
|
||||
if (p != activePlayer) {
|
||||
activePlayer = p;
|
||||
} else {
|
||||
activePlayer = getOpponent(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* this method handles the shot logic, if the shot misses
|
||||
*
|
||||
* @param p the current player
|
||||
* @param position the position shot at
|
||||
* @param selectedShip the ship shot at
|
||||
*/
|
||||
private void shootShip(Player p, IntPoint position, Battleship selectedShip) {
|
||||
selectedShip.hit(position);
|
||||
if (isGameOver(getOpponent(p))) {
|
||||
gameOver(p, position, selectedShip);
|
||||
} else if (selectedShip.isDestroyed()) {
|
||||
shipDestroys(p, position, selectedShip);
|
||||
} else {
|
||||
shipHit(p, position);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* checks, if the given player ends the game, bc he has no ships
|
||||
*
|
||||
* @param p the player
|
||||
* @return true, if the given player has no shi left
|
||||
*/
|
||||
private boolean isGameOver(Player p) {
|
||||
return p.getMap().getRemainingShips().isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* handles the shot logic,if the game is over
|
||||
*
|
||||
* @param p the player
|
||||
* @param position the position shot at
|
||||
* @param selectedShip the current ship, shot at
|
||||
*/
|
||||
private void gameOver(Player p, IntPoint position, Battleship selectedShip) {
|
||||
if (p != activePlayer) {
|
||||
send(p, EffectMessage.lost(position, selectedShip, activePlayer.getMap().getRemainingShips()));
|
||||
} else {
|
||||
send(activePlayer, EffectMessage.won(position, selectedShip));
|
||||
}
|
||||
if (playerOneAnimationReady && playerTwoAnimationReady) {
|
||||
setState(ServerState.GAME_OVER);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* handles the logic,if the ship is destroyed and it's not gameOver
|
||||
*
|
||||
* @param p the player
|
||||
* @param position the position shot at
|
||||
* @param selectedShip the ship shot at
|
||||
*/
|
||||
private void shipDestroys(Player p, IntPoint position, Battleship selectedShip) {
|
||||
if (p != activePlayer) {
|
||||
send(p, EffectMessage.shipDestroyed(false, position, selectedShip));
|
||||
} else {
|
||||
send(activePlayer, EffectMessage.shipDestroyed(true, position, selectedShip));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* handles the logic,if the ship is hit and it's not gameOver
|
||||
*
|
||||
* @param p the player
|
||||
* @param position the position shot at
|
||||
*/
|
||||
private void shipHit(Player p, IntPoint position) {
|
||||
if (p != activePlayer) {
|
||||
send(p, EffectMessage.hit(false, position));
|
||||
} else {
|
||||
send(activePlayer, EffectMessage.hit(true, position));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,5 +29,10 @@ enum ServerState {
|
||||
/**
|
||||
* The game has ended because all the ships of one player have been destroyed.
|
||||
*/
|
||||
GAME_OVER
|
||||
GAME_OVER,
|
||||
|
||||
/**
|
||||
* The game has paused, cause the clients need time to play their respective animations
|
||||
*/
|
||||
ANIMATION_WAIT_STATE
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
package pp.battleship.game.singlemode;
|
||||
|
||||
import pp.battleship.message.client.AnimationEndMessage;
|
||||
import pp.battleship.message.client.ClientInterpreter;
|
||||
import pp.battleship.message.client.ClientMessage;
|
||||
import pp.battleship.message.client.MapMessage;
|
||||
@@ -63,6 +64,17 @@ public void received(MapMessage msg, int from) {
|
||||
copiedMessage = new MapMessage(msg.getShips().stream().map(Copycat::copy).toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* Receives an AnimationEndMessage, copies it
|
||||
*
|
||||
* @param msg the message
|
||||
* @param from the connectionID
|
||||
*/
|
||||
@Override
|
||||
public void received(AnimationEndMessage msg, int from) {
|
||||
copiedMessage = new AnimationEndMessage(msg.getPosition());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a copy of the provided {@link Battleship}.
|
||||
*
|
||||
|
||||
@@ -9,19 +9,19 @@
|
||||
|
||||
import pp.battleship.game.client.BattleshipClient;
|
||||
import pp.battleship.game.client.ClientGameLogic;
|
||||
import pp.battleship.message.server.EffectMessage;
|
||||
import pp.battleship.message.server.GameDetails;
|
||||
import pp.battleship.message.server.ServerInterpreter;
|
||||
import pp.battleship.message.server.ServerMessage;
|
||||
import pp.battleship.message.server.StartBattleMessage;
|
||||
import pp.battleship.message.server.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.System.Logger;
|
||||
import java.lang.System.Logger.Level;
|
||||
|
||||
/**
|
||||
* A proxy class that interprets messages from the server and forwards them to the BattleshipClient.
|
||||
* Implements the ServerInterpreter interface to handle specific server messages.
|
||||
*/
|
||||
class InterpreterProxy implements ServerInterpreter {
|
||||
private static final Logger LOGGER = System.getLogger(InterpreterProxy.class.getName());
|
||||
|
||||
private final BattleshipClient playerClient;
|
||||
|
||||
/**
|
||||
@@ -55,8 +55,7 @@ private void loadMap() {
|
||||
final ClientGameLogic clientGameLogic = playerClient.getGameLogic();
|
||||
try {
|
||||
clientGameLogic.loadMap(playerClient.getConfig().getOwnMap());
|
||||
}
|
||||
catch (IOException e) {
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("Failed to load PlayerClient map", e);
|
||||
}
|
||||
clientGameLogic.mapFinished();
|
||||
@@ -82,6 +81,27 @@ public void received(EffectMessage msg) {
|
||||
forward(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Received an AnimationStartMessage, logs it and forwards it
|
||||
*
|
||||
* @param animationStartMessage the StartMessage received
|
||||
*/
|
||||
@Override
|
||||
public void received(AnimationStartMessage animationStartMessage) {
|
||||
LOGGER.log(Level.INFO, "AnimationStartMessage was received by InterpreterProxy");
|
||||
forward(animationStartMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Received a BackToBattleStateMessage, and forwards it
|
||||
*
|
||||
* @param backToBattleStateMessage the Message received
|
||||
*/
|
||||
@Override
|
||||
public void received(BackToBattleStateMessage backToBattleStateMessage) {
|
||||
forward(backToBattleStateMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Forwards the specified ServerMessage to the client's game logic by enqueuing the message acceptance.
|
||||
*
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package pp.battleship.game.singlemode;
|
||||
|
||||
import pp.battleship.game.client.BattleshipClient;
|
||||
import pp.battleship.message.client.AnimationEndMessage;
|
||||
import pp.battleship.message.client.MapMessage;
|
||||
import pp.battleship.message.client.ShootMessage;
|
||||
import pp.battleship.message.server.EffectMessage;
|
||||
import pp.battleship.message.server.GameDetails;
|
||||
import pp.battleship.message.server.ServerInterpreter;
|
||||
import pp.battleship.message.server.StartBattleMessage;
|
||||
import pp.battleship.message.server.*;
|
||||
import pp.battleship.model.IntPoint;
|
||||
import pp.battleship.model.dto.ShipMapDTO;
|
||||
import pp.util.RandomPositionIterator;
|
||||
@@ -124,4 +122,27 @@ public void received(EffectMessage msg) {
|
||||
if (msg.isMyTurn())
|
||||
shoot();
|
||||
}
|
||||
|
||||
/**
|
||||
* Received an AnimationStartMessage, logs it, and sends an AnimationEndMessage, bc it can't be displayed
|
||||
*
|
||||
* @param msg the StartMessage received
|
||||
*/
|
||||
@Override
|
||||
public void received(AnimationStartMessage msg) {
|
||||
LOGGER.log(Level.INFO, "AnimationStartMessage was received by RobotClient");
|
||||
connection.sendRobotMessage(new AnimationEndMessage(msg.getPosition()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Received an Message, if the BackToBattleState is active, checks, if it's his turn and fires, if it is
|
||||
*
|
||||
* @param backToBattleStateMessage the Message received
|
||||
*/
|
||||
@Override
|
||||
public void received(BackToBattleStateMessage backToBattleStateMessage) {
|
||||
if (backToBattleStateMessage.isMyTurn()) {
|
||||
shoot();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package pp.battleship.message.client;
|
||||
|
||||
import com.jme3.network.serializing.Serializable;
|
||||
import pp.battleship.model.IntPoint;
|
||||
|
||||
/**
|
||||
* this class represents the AnimationEndMessage, that is sent from the clients to the server, to say, they are finished with the animation
|
||||
*/
|
||||
@Serializable
|
||||
public class AnimationEndMessage extends ClientMessage {
|
||||
|
||||
/**
|
||||
* the position, where was shot at
|
||||
*/
|
||||
private IntPoint position;
|
||||
|
||||
/**
|
||||
* this private constructor is used for the serialization
|
||||
*/
|
||||
private AnimationEndMessage() { /* nothing */}
|
||||
|
||||
/**
|
||||
* this is the constructor for this class
|
||||
*
|
||||
* @param position IntPoint
|
||||
*/
|
||||
public AnimationEndMessage(IntPoint position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
/**
|
||||
* the getter for the position
|
||||
*
|
||||
* @return IntPoint position
|
||||
*/
|
||||
public IntPoint getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
/**
|
||||
* the accept-method for the ClientInterpreter
|
||||
*
|
||||
* @param interpreter the visitor to be used for processing
|
||||
* @param from the connection ID of the sender
|
||||
*/
|
||||
@Override
|
||||
public void accept(ClientInterpreter interpreter, int from) {
|
||||
interpreter.received(this, from);
|
||||
}
|
||||
}
|
||||
@@ -26,4 +26,12 @@ public interface ClientInterpreter {
|
||||
* @param from the connection ID from which the message was received
|
||||
*/
|
||||
void received(MapMessage msg, int from);
|
||||
|
||||
/**
|
||||
* Processes a received AnimationEndMessage
|
||||
*
|
||||
* @param animationEndMessage the message processed
|
||||
* @param from the connectionID
|
||||
*/
|
||||
void received(AnimationEndMessage animationEndMessage, int from);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package pp.battleship.message.server;
|
||||
|
||||
import com.jme3.network.serializing.Serializable;
|
||||
import pp.battleship.model.IntPoint;
|
||||
|
||||
/**
|
||||
* This class represents the AnimationStartMessage, which tells the clients, that they should display their animations
|
||||
*/
|
||||
@Serializable
|
||||
public class AnimationStartMessage extends ServerMessage {
|
||||
private IntPoint position;
|
||||
private boolean myTurn;
|
||||
|
||||
/**
|
||||
* this empty constructor is needed for the serialization
|
||||
*/
|
||||
private AnimationStartMessage() { /* nothing */}
|
||||
|
||||
/**
|
||||
* this is the constructor for the AnimationMessage
|
||||
*
|
||||
* @param position the position, where was shot
|
||||
* @param isTurn of the receiving client
|
||||
*/
|
||||
public AnimationStartMessage(IntPoint position, boolean isTurn) {
|
||||
this.position = position;
|
||||
this.myTurn = isTurn;
|
||||
}
|
||||
|
||||
/**
|
||||
* getter for the position
|
||||
*
|
||||
* @return IntPoint position
|
||||
*/
|
||||
public IntPoint getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
/**
|
||||
* getter for myTurn
|
||||
*
|
||||
* @return boolean myTurn
|
||||
*/
|
||||
public boolean isMyTurn() {
|
||||
return myTurn;
|
||||
}
|
||||
|
||||
/**
|
||||
* this method accept ServerInterpreter
|
||||
*
|
||||
* @param interpreter the visitor to be used for processing
|
||||
*/
|
||||
@Override
|
||||
public void accept(ServerInterpreter interpreter) {
|
||||
interpreter.received(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* getter for the Info text for each state
|
||||
*
|
||||
* @return String InfoText
|
||||
*/
|
||||
@Override
|
||||
public String getInfoTextKey() {
|
||||
return (position + " to be animated");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package pp.battleship.message.server;
|
||||
|
||||
import com.jme3.network.serializing.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* this Message tells the clients, that they should return to the BattleState
|
||||
*/
|
||||
@Serializable
|
||||
public class BackToBattleStateMessage extends ServerMessage {
|
||||
|
||||
/**
|
||||
* the boolean describes, whether it is his turn
|
||||
*/
|
||||
private boolean isMyTurn;
|
||||
|
||||
/**
|
||||
* the private constructor is used for the serialization
|
||||
*/
|
||||
private BackToBattleStateMessage() { /* nothing */}
|
||||
|
||||
/**
|
||||
* the constructor for the message
|
||||
*
|
||||
* @param isMyTurn indicates, whether the client, that receives this message, has his turn
|
||||
*/
|
||||
public BackToBattleStateMessage(boolean isMyTurn) {
|
||||
this.isMyTurn = isMyTurn;
|
||||
}
|
||||
|
||||
/**
|
||||
* getter for the MyTurn
|
||||
*
|
||||
* @return boolean myTurn
|
||||
*/
|
||||
public boolean isMyTurn() {
|
||||
return isMyTurn;
|
||||
}
|
||||
|
||||
/**
|
||||
* accept-method for ServerInterpreter
|
||||
*
|
||||
* @param interpreter the visitor to be used for processing
|
||||
*/
|
||||
@Override
|
||||
public void accept(ServerInterpreter interpreter) {
|
||||
interpreter.received(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* returns info text for this Message
|
||||
*
|
||||
* @return String
|
||||
*/
|
||||
@Override
|
||||
public String getInfoTextKey() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@@ -33,4 +33,18 @@ public interface ServerInterpreter {
|
||||
* @param msg the EffectMessage received
|
||||
*/
|
||||
void received(EffectMessage msg);
|
||||
|
||||
/**
|
||||
* Handles the AnimationStartMessage
|
||||
*
|
||||
* @param animationStartMessage the StartMessage received
|
||||
*/
|
||||
void received(AnimationStartMessage animationStartMessage);
|
||||
|
||||
/**
|
||||
* Handles the Message, that sets the clients back in the BattleState
|
||||
*
|
||||
* @param backToBattleStateMessage the Message received
|
||||
*/
|
||||
void received(BackToBattleStateMessage backToBattleStateMessage);
|
||||
}
|
||||
|
||||
@@ -1,31 +1,88 @@
|
||||
package pp.battleship.model;
|
||||
|
||||
import java.lang.System.Logger;
|
||||
import java.lang.System.Logger.Level;
|
||||
|
||||
/**
|
||||
* this class is the model for the shell, that hits the Battleships
|
||||
*/
|
||||
public class Shell implements Item {
|
||||
|
||||
private IntPoint target;
|
||||
private static final Logger LOGGER = System.getLogger(Shell.class.getName());
|
||||
|
||||
public Shell(IntPoint target){
|
||||
this.target=target;
|
||||
/**
|
||||
* the Target, the Shell will hit, displayed through: x,y
|
||||
*/
|
||||
private int x;
|
||||
private int y;
|
||||
|
||||
/**
|
||||
* the constructor for this class
|
||||
*
|
||||
* @param target the target, the shell is fired at
|
||||
*/
|
||||
public Shell(IntPoint target) {
|
||||
this.x = target.getX();
|
||||
this.y = target.getY();
|
||||
LOGGER.log(Level.INFO, "Shell has been initialized");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* the accept-method for a generic visitor
|
||||
*
|
||||
* @param visitor the visitor performing operations on the item
|
||||
* @param <T> cause it is generic
|
||||
* @return T
|
||||
*/
|
||||
@Override
|
||||
public <T> T accept(Visitor<T> visitor) {
|
||||
return visitor.visit(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* the accept-method for the void visitor
|
||||
*
|
||||
* @param visitor the visitor performing operations on the item
|
||||
*/
|
||||
@Override
|
||||
public void accept(VoidVisitor visitor) {
|
||||
visitor.visit(this);
|
||||
}
|
||||
|
||||
public IntPoint getTarget(){
|
||||
return target;
|
||||
|
||||
/**
|
||||
* getter for the x coordinate
|
||||
*
|
||||
* @return int x coordinate
|
||||
*/
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
/**
|
||||
* getter for the y coordinate
|
||||
*
|
||||
* @return int y coordinate
|
||||
*/
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
/**
|
||||
* setter for x coordinate
|
||||
*
|
||||
* @param x the new value of x coordinate
|
||||
*/
|
||||
public void setX(int x) {
|
||||
this.x = x;
|
||||
}
|
||||
|
||||
/**
|
||||
* setter for y coordinate
|
||||
*
|
||||
* @param y the new value of y coordinate
|
||||
*/
|
||||
public void setY(int y) {
|
||||
this.y = y;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,15 @@ public void add(Shot shot) {
|
||||
addItem(shot);
|
||||
}
|
||||
|
||||
/**
|
||||
* adds the shell to the ShipMap
|
||||
*
|
||||
* @param shell the shell that's added
|
||||
*/
|
||||
public void add(Shell shell) {
|
||||
addItem(shell);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes an item from the map and triggers an item removal event.
|
||||
*
|
||||
@@ -181,8 +190,8 @@ public int getHeight() {
|
||||
*/
|
||||
public boolean isValid(Battleship ship) {
|
||||
return isValid(ship.getMinX(), ship.getMinY()) &&
|
||||
isValid(ship.getMaxX(), ship.getMaxY()) &&
|
||||
getShips().filter(s -> s != ship).noneMatch(ship::collidesWith);
|
||||
isValid(ship.getMaxX(), ship.getMaxY()) &&
|
||||
getShips().filter(s -> s != ship).noneMatch(ship::collidesWith);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -194,8 +203,8 @@ public boolean isValid(Battleship ship) {
|
||||
*/
|
||||
public Battleship findShipAt(int x, int y) {
|
||||
return getShips().filter(ship -> ship.contains(x, y))
|
||||
.findAny()
|
||||
.orElse(null);
|
||||
.findAny()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -227,7 +236,7 @@ public boolean isValid(IntPosition pos) {
|
||||
*/
|
||||
public boolean isValid(int x, int y) {
|
||||
return x >= 0 && x < width &&
|
||||
y >= 0 && y < height;
|
||||
y >= 0 && y < height;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,5 +22,13 @@ public enum Sound {
|
||||
/**
|
||||
* Sound of a ship being destroyed.
|
||||
*/
|
||||
DESTROYED_SHIP
|
||||
DESTROYED_SHIP,
|
||||
/**
|
||||
* Sound of a rocket
|
||||
*/
|
||||
ROCKET,
|
||||
/**
|
||||
* Stops the Sound of the rocket
|
||||
*/
|
||||
ROCKET_STOP
|
||||
}
|
||||
|
||||
@@ -60,7 +60,6 @@ public void testRemoveItem() {
|
||||
map.remove(battleship);
|
||||
final List<Item> items = map.getItems();
|
||||
assertFalse(items.contains(battleship));
|
||||
//TODO
|
||||
verify(mockBroker).notifyListeners(any(ItemAddedEvent.class));
|
||||
verify(mockBroker).notifyListeners(any(ItemRemovedEvent.class));
|
||||
}
|
||||
|
||||
@@ -18,13 +18,11 @@
|
||||
import pp.battleship.game.server.Player;
|
||||
import pp.battleship.game.server.ServerGameLogic;
|
||||
import pp.battleship.game.server.ServerSender;
|
||||
import pp.battleship.message.client.AnimationEndMessage;
|
||||
import pp.battleship.message.client.ClientMessage;
|
||||
import pp.battleship.message.client.MapMessage;
|
||||
import pp.battleship.message.client.ShootMessage;
|
||||
import pp.battleship.message.server.EffectMessage;
|
||||
import pp.battleship.message.server.GameDetails;
|
||||
import pp.battleship.message.server.ServerMessage;
|
||||
import pp.battleship.message.server.StartBattleMessage;
|
||||
import pp.battleship.message.server.*;
|
||||
import pp.battleship.model.Battleship;
|
||||
import pp.battleship.model.IntPoint;
|
||||
import pp.battleship.model.Shot;
|
||||
@@ -118,11 +116,15 @@ private void initializeSerializables() {
|
||||
Serializer.registerClass(Battleship.class);
|
||||
Serializer.registerClass(IntPoint.class);
|
||||
Serializer.registerClass(Shot.class);
|
||||
Serializer.registerClass(AnimationEndMessage.class);
|
||||
Serializer.registerClass(AnimationStartMessage.class);
|
||||
Serializer.registerClass(BackToBattleStateMessage.class);
|
||||
}
|
||||
|
||||
private void registerListeners() {
|
||||
myServer.addMessageListener(this, MapMessage.class);
|
||||
myServer.addMessageListener(this, ShootMessage.class);
|
||||
myServer.addMessageListener(this, AnimationEndMessage.class);
|
||||
myServer.addConnectionListener(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -210,6 +210,60 @@ private Geometry makeCircle(ColorRGBA color) {
|
||||
return circle;
|
||||
}
|
||||
|
||||
/**
|
||||
* this method returns a dot in the color given
|
||||
* @param color the color
|
||||
* @return Geometry
|
||||
*/
|
||||
public Geometry makeFilledCircle(ColorRGBA color) {
|
||||
if (circleMesh == null) {
|
||||
circleMesh = new Mesh();
|
||||
|
||||
// Setze den Modus auf Triangles, um den Kreis aus Dreiecken zu füllen
|
||||
circleMesh.setMode(Mesh.Mode.Triangles);
|
||||
|
||||
final float[] pointBuffer = new float[3 * (NUM + 1)]; // NUM + 1, da wir den Mittelpunkt hinzufügen
|
||||
final short[] indexBuffer = new short[NUM * 3]; // NUM * 3, da wir Dreiecke erstellen
|
||||
|
||||
int j = 0;
|
||||
// Mittelpunkt des Kreises (0, 0, 0)
|
||||
pointBuffer[j++] = 0f; // x
|
||||
pointBuffer[j++] = 0f; // y
|
||||
pointBuffer[j++] = 0f; // z
|
||||
|
||||
// Außenpunkte des Kreises
|
||||
for (short i = 1; i <= NUM; i++) {
|
||||
final float a = TWO_PI / NUM * (i - 1);
|
||||
pointBuffer[j++] = 0.5f * cos(a);
|
||||
pointBuffer[j++] = 0.5f * sin(a);
|
||||
pointBuffer[j++] = 0f;
|
||||
}
|
||||
|
||||
// Dreiecke setzen (Mittelpunkt zu jedem Paar benachbarter Punkte)
|
||||
j = 0;
|
||||
for (short i = 1; i <= NUM; i++) {
|
||||
indexBuffer[j++] = 0; // Mittelpunkt
|
||||
indexBuffer[j++] = i; // aktueller Punkt
|
||||
indexBuffer[j++] = (i == NUM) ? 1 : (short) (i + 1); // nächster Punkt oder zurück zum ersten Punkt
|
||||
}
|
||||
|
||||
circleMesh.setBuffer(VertexBuffer.Type.Position, 3, pointBuffer);
|
||||
circleMesh.setBuffer(VertexBuffer.Type.Index, 3, indexBuffer);
|
||||
circleMesh.updateBound(); // Mesh-Buffer aktualisieren
|
||||
}
|
||||
|
||||
// Erstelle das Geometry-Objekt mit dem Kreis-Mesh
|
||||
final Geometry circle = new Geometry("circleMesh", circleMesh.clone());
|
||||
|
||||
// Setze das Material
|
||||
Material matWireframe = new Material(am, UNSHADED); //NON-NLS
|
||||
matWireframe.getAdditionalRenderState().setFaceCullMode(RenderState.FaceCullMode.Off);
|
||||
matWireframe.setColor(COLOR, color); //NON-NLS
|
||||
circle.setMaterial(matWireframe);
|
||||
|
||||
return circle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an ellipse with the specified color.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user