-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathChess_Class_Diagram.xml
More file actions
134 lines (134 loc) · 14.8 KB
/
Copy pathChess_Class_Diagram.xml
File metadata and controls
134 lines (134 loc) · 14.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?xml version="1.0" encoding="UTF-8"?>
<mxGraphModel dx="1042" dy="469" 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>
<object label="" id="0">
<mxCell/>
</object>
<mxCell id="1" parent="0"/>
<mxCell id="2" value="Board" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1">
<mxGeometry y="39" width="200" height="244" as="geometry">
<mxRectangle x="40" y="39" width="60" height="26" as="alternateBounds"/>
</mxGeometry>
</mxCell>
<mxCell id="3" value="- _board_arr[8][8]: Piece*" 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;" parent="2" vertex="1">
<mxGeometry y="26" width="200" height="26" as="geometry"/>
</mxCell>
<mxCell id="65" value="- _turn: Side" 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;" parent="2" vertex="1">
<mxGeometry y="52" width="200" height="26" as="geometry"/>
</mxCell>
<mxCell id="4" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="2" vertex="1">
<mxGeometry y="78" width="200" height="8" as="geometry"/>
</mxCell>
<mxCell id="52" value="+ Board(string board)" 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;" parent="2" vertex="1">
<mxGeometry y="86" width="200" height="26" as="geometry"/>
</mxCell>
<mxCell id="5" value="+ operator[](string): Piece* ex: board["a1"] " 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;" parent="2" vertex="1">
<mxGeometry y="112" width="200" height="40" as="geometry"/>
</mxCell>
<mxCell id="x4KpR0xQQ6zRvD2m9FDT-73" value="+ operator[](Location): Piece* ex: board[loc1] " 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;" vertex="1" parent="2">
<mxGeometry y="152" width="200" height="40" as="geometry"/>
</mxCell>
<mxCell id="18" value="+ move(string src, string dst): void" 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;" parent="2" vertex="1">
<mxGeometry y="192" width="200" height="26" as="geometry"/>
</mxCell>
<mxCell id="19" value="+ is_check(boolen _side): boolen" 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;" parent="2" vertex="1">
<mxGeometry y="218" width="200" height="26" as="geometry"/>
</mxCell>
<mxCell id="ghZ3AYGfgmQ1U60FKdTR-74" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;entryX=0;entryY=0.25;startArrow=cross;startFill=0;endArrow=openThin;endFill=0;endSize=12;jettySize=auto;orthogonalLoop=1;strokeWidth=1;startSize=12;" parent="1" source="20" target="ghZ3AYGfgmQ1U60FKdTR-72" edge="1">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="20" value="Piece" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;rounded=0;swimlaneLine=1;shadow=0;rotatable=0;" parent="1" vertex="1">
<mxGeometry x="240" y="39" width="360" height="150" as="geometry"/>
</mxCell>
<mxCell id="21" value="- _color: Side" 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;" parent="20" vertex="1">
<mxGeometry y="26" width="360" height="26" as="geometry"/>
</mxCell>
<mxCell id="42" value="+ field: type" 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;" parent="20" vertex="1">
<mxGeometry y="52" width="360" height="26" as="geometry"/>
</mxCell>
<mxCell id="22" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" parent="20" vertex="1">
<mxGeometry y="78" width="360" height="8" as="geometry"/>
</mxCell>
<mxCell id="23" value="+ is_valid_move(Location src, Location dst, Piece[][]): boolean = 0" 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;" parent="20" vertex="1">
<mxGeometry y="86" width="360" height="30" as="geometry"/>
</mxCell>
<mxCell id="43" value="+ get_letter(): 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;" parent="20" vertex="1">
<mxGeometry y="116" width="360" height="34" as="geometry"/>
</mxCell>
<mxCell id="59" value="<div style="box-sizing: border-box ; width: 100% ; background: #e4e4e4 ; padding: 2px"><b>Enum: MoveResult</b><br></div><table style="width: 100% ; font-size: 1em" cellpadding="2" cellspacing="0"><tbody><tr><td>GOOD_MOVE<br></td><td>0</td></tr><tr><td>CHESS_MOVE&nbsp;</td><td>1</td></tr><tr><td>NO_PLAYER_TOOL_IN_SRC<br></td><td>2</td></tr><tr><td>PLAYER_TOOL_IN_TRGT&nbsp;<br></td><td>3</td></tr><tr><td>SELF_CHESS_MOVE<br></td><td>4</td></tr><tr><td>ILLEGAL_INDEX&nbsp;<br></td><td>5</td></tr><tr><td>ILLEGAL_TOOL_MOVE&nbsp;<br></td><td>6</td></tr><tr><td>SRC_AND_TRGT_SAME&nbsp;<br></td><td>7</td></tr><tr><td>// MAT_MOVE<br></td><td>8</td></tr></tbody></table>" style="verticalAlign=top;align=left;overflow=fill;html=1;rounded=0;shadow=0;" parent="1" vertex="1">
<mxGeometry x="640" y="39" width="180" height="181" as="geometry"/>
</mxCell>
<mxCell id="63" value="<div style="text-align: justify"><font style="font-size: 10px">Use</font></div>" style="endArrow=open;endSize=12;dashed=1;html=1;edgeStyle=orthogonalEdgeStyle;arcSize=10;" parent="1" source="2" target="20" edge="1">
<mxGeometry width="160" relative="1" as="geometry">
<mxPoint x="220" y="140" as="sourcePoint"/>
<mxPoint x="380" y="140" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="ghZ3AYGfgmQ1U60FKdTR-72" value="<div style="box-sizing: border-box ; width: 100% ; background: #e4e4e4 ; padding: 2px"><b>Enum: Side</b><br></div><table style="width: 100% ; font-size: 1em" cellpadding="2" cellspacing="0"><tbody><tr><td>BLACK</td><td>0</td></tr><tr><td>WHITE</td><td>1</td></tr></tbody></table>" style="verticalAlign=top;align=left;overflow=fill;html=1;rounded=0;shadow=0;" parent="1" vertex="1">
<mxGeometry x="630" y="230" width="80" height="57" as="geometry"/>
</mxCell>
<mxCell id="ghZ3AYGfgmQ1U60FKdTR-83" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;startArrow=none;startFill=0;startSize=12;endArrow=block;endFill=0;endSize=12;jettySize=auto;orthogonalLoop=1;strokeWidth=1;dashed=1;" parent="1" source="ghZ3AYGfgmQ1U60FKdTR-76" target="20" edge="1">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="440" y="340"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ghZ3AYGfgmQ1U60FKdTR-76" value="King / Queen / Knight / Bishop / Rook" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=35;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1">
<mxGeometry x="630" y="310" width="140" height="60" as="geometry"/>
</mxCell>
<mxCell id="ghZ3AYGfgmQ1U60FKdTR-84" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;startArrow=cross;startFill=0;endArrow=openThin;endFill=0;endSize=12;jettySize=auto;orthogonalLoop=1;strokeWidth=1;startSize=12;" parent="1" source="2" target="ghZ3AYGfgmQ1U60FKdTR-72" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="430" y="192.5" as="sourcePoint"/>
<mxPoint x="520" y="324.5" as="targetPoint"/>
<Array as="points">
<mxPoint x="415" y="210"/>
<mxPoint x="415" y="259"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ghZ3AYGfgmQ1U60FKdTR-87" value="Pawn" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=20;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" parent="1" vertex="1">
<mxGeometry x="630" y="380" width="140" height="46" as="geometry"/>
</mxCell>
<mxCell id="ghZ3AYGfgmQ1U60FKdTR-88" value="+ _moved: boolean " 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;" parent="ghZ3AYGfgmQ1U60FKdTR-87" vertex="1">
<mxGeometry y="20" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="x4KpR0xQQ6zRvD2m9FDT-65" value="Location" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;" vertex="1" parent="1">
<mxGeometry x="30" y="325" width="140" height="164" as="geometry"/>
</mxCell>
<mxCell id="x4KpR0xQQ6zRvD2m9FDT-66" value="- _row: int" 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;" vertex="1" parent="x4KpR0xQQ6zRvD2m9FDT-65">
<mxGeometry y="26" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="x4KpR0xQQ6zRvD2m9FDT-67" value="- _col: int" 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;" vertex="1" parent="x4KpR0xQQ6zRvD2m9FDT-65">
<mxGeometry y="52" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="x4KpR0xQQ6zRvD2m9FDT-69" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;" vertex="1" parent="x4KpR0xQQ6zRvD2m9FDT-65">
<mxGeometry y="78" width="140" height="8" as="geometry"/>
</mxCell>
<mxCell id="x4KpR0xQQ6zRvD2m9FDT-70" value="+ Location(string) " 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;" vertex="1" parent="x4KpR0xQQ6zRvD2m9FDT-65">
<mxGeometry y="86" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="x4KpR0xQQ6zRvD2m9FDT-71" value="+ get_row(): int" 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;" vertex="1" parent="x4KpR0xQQ6zRvD2m9FDT-65">
<mxGeometry y="112" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="x4KpR0xQQ6zRvD2m9FDT-72" value="+ get_col(): int" 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;" vertex="1" parent="x4KpR0xQQ6zRvD2m9FDT-65">
<mxGeometry y="138" width="140" height="26" as="geometry"/>
</mxCell>
<mxCell id="x4KpR0xQQ6zRvD2m9FDT-75" value="<div style="text-align: justify"><font style="font-size: 10px">Use</font></div>" style="endArrow=open;endSize=12;dashed=1;html=1;edgeStyle=orthogonalEdgeStyle;arcSize=10;" edge="1" parent="1" source="2" target="x4KpR0xQQ6zRvD2m9FDT-65">
<mxGeometry width="160" relative="1" as="geometry">
<mxPoint x="140" y="300" as="sourcePoint"/>
<mxPoint x="250" y="122" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="x4KpR0xQQ6zRvD2m9FDT-80" value="<div style="text-align: justify"><font style="font-size: 10px">Use</font></div>" style="endArrow=open;endSize=12;dashed=1;html=1;edgeStyle=orthogonalEdgeStyle;arcSize=10;" edge="1" parent="1" source="20" target="x4KpR0xQQ6zRvD2m9FDT-65">
<mxGeometry width="160" relative="1" as="geometry">
<mxPoint x="110" y="293" as="sourcePoint"/>
<mxPoint x="110" y="335" as="targetPoint"/>
<Array as="points">
<mxPoint x="400" y="300"/>
<mxPoint x="120" y="300"/>
</Array>
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>