|
|
|
@ -0,0 +1,148 @@
|
|
|
|
|
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 SLBrowser/9.0.6.2081 SLBChan/130 SLBVPV/64-bit" version="26.1.3" pages="2">
|
|
|
|
|
<diagram id="C5RBs43oDa-KdzZeNtuy" name="用例图">
|
|
|
|
|
<mxGraphModel dx="1173" dy="742" 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="WIyWlLk6GJQsqaUBKTNV-0" />
|
|
|
|
|
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
|
|
|
|
|
<mxCell id="Y9_ikizi0OurOr7PjpoN-1" value="<span style="color: rgb(64, 64, 64); font-family: Menlo, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, Courier, monospace, Inter, sans-serif; font-size: 14.0018px; font-weight: 600; text-align: left; text-wrap: wrap; background-color: rgb(236, 236, 236);">AI System</span>" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
|
|
|
|
<mxGeometry x="630" y="120" width="70" height="120" as="geometry" />
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="Y9_ikizi0OurOr7PjpoN-3" value="<div style="text-align: left;"><span style="color: rgb(64, 64, 64); font-family: Menlo, &quot;Roboto Mono&quot;, &quot;Courier New&quot;, Courier, monospace, Inter, sans-serif; font-size: 14.0018px; font-weight: 600; text-wrap: wrap; background-color: rgb(236, 236, 236);">Player</span><br></div>" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
|
|
|
|
<mxGeometry x="120" y="130" width="70" height="140" as="geometry" />
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="Y9_ikizi0OurOr7PjpoN-7" value="<div><b><font style="font-size: 14px;">Start New Game&nbsp;&nbsp;</font></b></div><div><b><font style="font-size: 14px;">Select Game Mode&nbsp;&nbsp;</font></b></div><div><b><font style="font-size: 14px;">Set Difficulty&nbsp;&nbsp;</font></b></div><div><b><font style="font-size: 14px;">Make Move&nbsp;&nbsp;</font></b></div><div><b><font style="font-size: 14px;">Check Win&nbsp;&nbsp;</font></b></div><div><b><font style="font-size: 14px;">Exit Game&nbsp;&nbsp;</font></b></div>" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
|
|
|
|
<mxGeometry x="294" y="130" width="240" height="170" as="geometry" />
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="Y9_ikizi0OurOr7PjpoN-11" value="" style="endArrow=classic;html=1;rounded=0;entryX=0.208;entryY=0.235;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" target="Y9_ikizi0OurOr7PjpoN-7">
|
|
|
|
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
|
|
|
<mxPoint x="270" y="170" as="sourcePoint" />
|
|
|
|
|
<mxPoint x="280" y="170" as="targetPoint" />
|
|
|
|
|
<Array as="points">
|
|
|
|
|
<mxPoint x="190" y="170" />
|
|
|
|
|
<mxPoint x="270" y="170" />
|
|
|
|
|
</Array>
|
|
|
|
|
</mxGeometry>
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="Y9_ikizi0OurOr7PjpoN-14" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
|
|
|
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
|
|
|
<mxPoint x="240" y="190" as="sourcePoint" />
|
|
|
|
|
<mxPoint x="340" y="190" as="targetPoint" />
|
|
|
|
|
<Array as="points">
|
|
|
|
|
<mxPoint x="180" y="190" />
|
|
|
|
|
</Array>
|
|
|
|
|
</mxGeometry>
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="Y9_ikizi0OurOr7PjpoN-15" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
|
|
|
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
|
|
|
<mxPoint x="180" y="227" as="sourcePoint" />
|
|
|
|
|
<mxPoint x="360" y="226" as="targetPoint" />
|
|
|
|
|
<Array as="points">
|
|
|
|
|
<mxPoint x="220" y="227" />
|
|
|
|
|
<mxPoint x="260" y="226" />
|
|
|
|
|
</Array>
|
|
|
|
|
</mxGeometry>
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="Y9_ikizi0OurOr7PjpoN-21" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
|
|
|
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
|
|
|
<mxPoint x="184" y="211" as="sourcePoint" />
|
|
|
|
|
<mxPoint x="363" y="209" as="targetPoint" />
|
|
|
|
|
</mxGeometry>
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="Y9_ikizi0OurOr7PjpoN-22" value="" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;rounded=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
|
|
|
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
|
|
|
<mxPoint x="603" y="260" as="sourcePoint" />
|
|
|
|
|
<mxPoint x="453" y="262" as="targetPoint" />
|
|
|
|
|
</mxGeometry>
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="Y9_ikizi0OurOr7PjpoN-23" value="" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;rounded=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
|
|
|
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
|
|
|
<mxPoint x="614" y="243" as="sourcePoint" />
|
|
|
|
|
<mxPoint x="464" y="245" as="targetPoint" />
|
|
|
|
|
</mxGeometry>
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="Y9_ikizi0OurOr7PjpoN-24" value="" style="endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;rounded=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
|
|
|
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
|
|
|
<mxPoint x="613" y="224" as="sourcePoint" />
|
|
|
|
|
<mxPoint x="463" y="226" as="targetPoint" />
|
|
|
|
|
</mxGeometry>
|
|
|
|
|
</mxCell>
|
|
|
|
|
</root>
|
|
|
|
|
</mxGraphModel>
|
|
|
|
|
</diagram>
|
|
|
|
|
<diagram id="0Ts23mYa7cmA9VF2OK3c" name="类图">
|
|
|
|
|
<mxGraphModel dx="1173" dy="742" 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="iSzGSqXZwBOpnUvpUEQd-24" value="<strong style="font-family: DeepSeek-CJK-patch, Inter, system-ui, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Noto Sans&quot;, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, Oxygen, &quot;Open Sans&quot;, sans-serif; font-size: 16.002px; text-align: left;">GameState</strong>" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;fontColor=#000000;" vertex="1" parent="1">
|
|
|
|
|
<mxGeometry x="230" y="25" width="240" height="182" as="geometry" />
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="iSzGSqXZwBOpnUvpUEQd-25" value="<pre style="font-family: var(--ds-font-family-code); overflow: auto; padding: calc(var(--ds-md-zoom)*8px)calc(var(--ds-md-zoom)*12px); text-wrap: wrap; word-break: break-all; margin-top: 0px !important; margin-bottom: 0px !important;">- board: char[SIZE][SIZE] </pre>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontColor=#000000;fontSize=14;" vertex="1" parent="iSzGSqXZwBOpnUvpUEQd-24">
|
|
|
|
|
<mxGeometry y="26" width="240" height="26" as="geometry" />
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="iSzGSqXZwBOpnUvpUEQd-26" value="- currentPlayer:char" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontColor=#000000;fontSize=15;" vertex="1" parent="iSzGSqXZwBOpnUvpUEQd-24">
|
|
|
|
|
<mxGeometry y="52" width="240" height="26" as="geometry" />
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="iSzGSqXZwBOpnUvpUEQd-27" value="- difficulty:Difficulty" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontColor=#000000;fontSize=15;" vertex="1" parent="iSzGSqXZwBOpnUvpUEQd-24">
|
|
|
|
|
<mxGeometry y="78" width="240" height="26" as="geometry" />
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="iSzGSqXZwBOpnUvpUEQd-28" value="+ initGame()" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontColor=#000000;fontSize=15;" vertex="1" parent="iSzGSqXZwBOpnUvpUEQd-24">
|
|
|
|
|
<mxGeometry y="104" width="240" height="26" as="geometry" />
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="iSzGSqXZwBOpnUvpUEQd-29" value="+ printBoard()" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontColor=#000000;fontSize=15;" vertex="1" parent="iSzGSqXZwBOpnUvpUEQd-24">
|
|
|
|
|
<mxGeometry y="130" width="240" height="26" as="geometry" />
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="iSzGSqXZwBOpnUvpUEQd-30" value="+ checkWin():bool" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontColor=#000000;fontSize=15;" vertex="1" parent="iSzGSqXZwBOpnUvpUEQd-24">
|
|
|
|
|
<mxGeometry y="156" width="240" height="26" as="geometry" />
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="iSzGSqXZwBOpnUvpUEQd-32" value="<strong style="color: rgb(64, 64, 64); font-family: DeepSeek-CJK-patch, Inter, system-ui, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Noto Sans&quot;, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, Oxygen, &quot;Open Sans&quot;, sans-serif; font-size: 16.002px; text-align: left;">AIPlayer</strong>" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
|
|
|
<mxGeometry x="540" y="360" width="230" height="80" as="geometry" />
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="iSzGSqXZwBOpnUvpUEQd-33" value="+ aiMove()" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontSize=15;" vertex="1" parent="iSzGSqXZwBOpnUvpUEQd-32">
|
|
|
|
|
<mxGeometry y="26" width="230" height="54" as="geometry" />
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="iSzGSqXZwBOpnUvpUEQd-36" value="<strong style="color: rgb(64, 64, 64); font-family: DeepSeek-CJK-patch, Inter, system-ui, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Noto Sans&quot;, Ubuntu, Cantarell, &quot;Helvetica Neue&quot;, Oxygen, &quot;Open Sans&quot;, sans-serif; font-size: 16.002px; text-align: left;">Player</strong>" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
|
|
|
<mxGeometry x="30" y="360" width="230" height="80" as="geometry" />
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="iSzGSqXZwBOpnUvpUEQd-37" value="- symbol:char" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontSize=15;" vertex="1" parent="iSzGSqXZwBOpnUvpUEQd-36">
|
|
|
|
|
<mxGeometry y="26" width="230" height="54" as="geometry" />
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="iSzGSqXZwBOpnUvpUEQd-41" value="Extends" style="endArrow=block;endSize=16;endFill=0;html=1;rounded=0;" edge="1" parent="1">
|
|
|
|
|
<mxGeometry width="160" relative="1" as="geometry">
|
|
|
|
|
<mxPoint x="510" y="400" as="sourcePoint" />
|
|
|
|
|
<mxPoint x="270" y="400" as="targetPoint" />
|
|
|
|
|
</mxGeometry>
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="LTekjpAPQ-f138zFtqp2-2" value="" style="endArrow=open;endFill=1;endSize=12;html=1;rounded=0;" edge="1" parent="1">
|
|
|
|
|
<mxGeometry width="160" relative="1" as="geometry">
|
|
|
|
|
<mxPoint x="260" y="40" as="sourcePoint" />
|
|
|
|
|
<mxPoint x="220" y="60" as="targetPoint" />
|
|
|
|
|
<Array as="points">
|
|
|
|
|
<mxPoint x="150" y="40" />
|
|
|
|
|
<mxPoint x="150" y="60" />
|
|
|
|
|
</Array>
|
|
|
|
|
</mxGeometry>
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="LTekjpAPQ-f138zFtqp2-3" value="<font style="font-size: 12px;">has a</font>" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="LTekjpAPQ-f138zFtqp2-2">
|
|
|
|
|
<mxGeometry x="0.6567" y="2" relative="1" as="geometry">
|
|
|
|
|
<mxPoint as="offset" />
|
|
|
|
|
</mxGeometry>
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="LTekjpAPQ-f138zFtqp2-4" value="" style="endArrow=open;endFill=1;endSize=12;html=1;rounded=0;exitX=0;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="iSzGSqXZwBOpnUvpUEQd-24">
|
|
|
|
|
<mxGeometry width="160" relative="1" as="geometry">
|
|
|
|
|
<mxPoint x="225" y="25" as="sourcePoint" />
|
|
|
|
|
<mxPoint x="100" y="350" as="targetPoint" />
|
|
|
|
|
<Array as="points">
|
|
|
|
|
<mxPoint x="100" y="25" />
|
|
|
|
|
</Array>
|
|
|
|
|
</mxGeometry>
|
|
|
|
|
</mxCell>
|
|
|
|
|
<mxCell id="LTekjpAPQ-f138zFtqp2-5" value="<font style="font-size: 13px;">uses</font>" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="LTekjpAPQ-f138zFtqp2-4">
|
|
|
|
|
<mxGeometry x="0.2601" y="2" relative="1" as="geometry">
|
|
|
|
|
<mxPoint as="offset" />
|
|
|
|
|
</mxGeometry>
|
|
|
|
|
</mxCell>
|
|
|
|
|
</root>
|
|
|
|
|
</mxGraphModel>
|
|
|
|
|
</diagram>
|
|
|
|
|
</mxfile>
|