[LIB-9] Separate chesshog-hedgefish module
[chesshog.git] / src / test / resources / org / hedgecode / chess / ascii / ASCIIParserTest.xml
1 <?xml version='1.0' encoding='UTF-8'?>
2
3 <!--
4   ~ Copyright (c) 2018. Developed by Hedgecode.
5   ~
6   ~ Licensed under the Apache License, Version 2.0 (the "License");
7   ~ you may not use this file except in compliance with the License.
8   ~ You may obtain a copy of the License at
9   ~
10   ~   http://www.apache.org/licenses/LICENSE-2.0
11   ~
12   ~ Unless required by applicable law or agreed to in writing, software
13   ~ distributed under the License is distributed on an "AS IS" BASIS,
14   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   ~ See the License for the specific language governing permissions and
16   ~ limitations under the License.
17   -->
18
19 <config>
20     <tests>
21         <test>
22             <name>Initial Position</name>
23             <ascii>
24                 <![CDATA[
25 +-------------------------------+
26 | r | n | b | q | k | b | n | r |
27 +-------------------------------+
28 | p | p | p | p | p | p | p | p |
29 +-------------------------------+
30 |   |   |   |   |   |   |   |   |
31 +-------------------------------+
32 |   |   |   |   |   |   |   |   |
33 +-------------------------------+
34 |   |   |   |   |   |   |   |   |
35 +-------------------------------+
36 |   |   |   |   |   |   |   |   |
37 +-------------------------------+
38 | P | P | P | P | P | P | P | P |
39 +-------------------------------+
40 | R | N | B | Q | K | B | N | R |
41 +-------------------------------+
42                 ]]>
43             </ascii>
44             <asciiType>HYPHEN</asciiType>
45             <position>
46                 <initial>true</initial>
47             </position>
48         </test>
49         <test>
50             <name>Initial Position</name>
51             <ascii>
52                 <![CDATA[
53  ___ ___ ___ ___ ___ ___ ___ ___
54 |_r_|_n_|_b_|_q_|_k_|_b_|_n_|_r_|
55 |_p_|_p_|_p_|_p_|_p_|_p_|_p_|_p_|
56 |___|___|___|___|___|___|___|___|
57 |___|___|___|___|___|___|___|___|
58 |___|___|___|___|___|___|___|___|
59 |___|___|___|___|___|___|___|___|
60 |_P_|_P_|_P_|_P_|_P_|_P_|_P_|_P_|
61 |_R_|_N_|_B_|_Q_|_K_|_B_|_N_|_R_|
62                 ]]>
63             </ascii>
64             <asciiType>TIGHT</asciiType>
65             <position>
66                 <initial>true</initial>
67             </position>
68         </test>
69         <test>
70             <name>Initial Position</name>
71             <ascii>
72                 <![CDATA[
73      a  b  c  d  e  f  g  h
74    +------------------------+
75  8 | r  n  b  q  k  b  n  r | 8
76  7 | p  p  p  p  p  p  p  p | 7
77  6 | .  .  .  .  .  .  .  . | 6
78  5 | .  .  .  .  .  .  .  . | 5
79  4 | .  .  .  .  .  .  .  . | 4
80  3 | .  .  .  .  .  .  .  . | 3
81  2 | P  P  P  P  P  P  P  P | 2
82  1 | R  N  B  Q  K  B  N  R | 1
83    +------------------------+
84      a  b  c  d  e  f  g  h
85                 ]]>
86             </ascii>
87             <asciiType>DOT</asciiType>
88             <withNotation>true</withNotation>
89             <position>
90                 <initial>true</initial>
91             </position>
92         </test>
93         <test>
94             <name>Initial Position</name>
95             <ascii>
96                 <![CDATA[
97 ╔═══╤═══╤═══╤═══╤═══╤═══╤═══╤═══╗
98 ║ r │ n │ b │ q │ k │ b │ n │ r ║
99 ╟───┼───┼───┼───┼───┼───┼───┼───╢
100 ║ p │ p │ p │ p │ p │ p │ p │ p ║
101 ╟───┼───┼───┼───┼───┼───┼───┼───╢
102 ║   │   │   │   │   │   │   │   ║
103 ╟───┼───┼───┼───┼───┼───┼───┼───╢
104 ║   │   │   │   │   │   │   │   ║
105 ╟───┼───┼───┼───┼───┼───┼───┼───╢
106 ║   │   │   │   │   │   │   │   ║
107 ╟───┼───┼───┼───┼───┼───┼───┼───╢
108 ║   │   │   │   │   │   │   │   ║
109 ╟───┼───┼───┼───┼───┼───┼───┼───╢
110 ║ P │ P │ P │ P │ P │ P │ P │ P ║
111 ╟───┼───┼───┼───┼───┼───┼───┼───╢
112 ║ R │ N │ B │ Q │ K │ B │ N │ R ║
113 ╚═══╧═══╧═══╧═══╧═══╧═══╧═══╧═══╝
114                 ]]>
115             </ascii>
116             <asciiType>CP866</asciiType>
117             <withNotation>false</withNotation>
118             <position>
119                 <initial>true</initial>
120             </position>
121         </test>
122         <test>
123             <name>Dilaram's Mate</name>
124             <ascii>
125                 <![CDATA[
126 +-------------------------------+
127 |   | r |   |   |   |   | k |   |
128 +-------------------------------+
129 |   |   |   |   |   |   |   |   |
130 +-------------------------------+
131 |   |   |   |   |   | P | P |   |
132 +-------------------------------+
133 | K |   | n |   |   |   |   |   |
134 +-------------------------------+
135 |   |   |   |   |   |   | N | R |
136 +-------------------------------+
137 |   |   |   |   |   |   |   | B |
138 +-------------------------------+
139 |   | r |   |   |   |   |   |   |
140 +-------------------------------+
141 |   |   |   |   |   |   |   | R |
142 +-------------------------------+
143                 ]]>
144             </ascii>
145             <asciiType>HYPHEN</asciiType>
146             <position>
147                 <squares>
148                     <a5>WHITE_KING</a5>
149                     <h4>WHITE_ROOK</h4>
150                     <h1>WHITE_ROOK</h1>
151                     <h3>WHITE_BISHOP</h3>
152                     <g4>WHITE_KNIGHT</g4>
153                     <f6>WHITE_PAWN</f6>
154                     <g6>WHITE_PAWN</g6>
155                     <g8>BLACK_KING</g8>
156                     <b8>BLACK_ROOK</b8>
157                     <b2>BLACK_ROOK</b2>
158                     <c5>BLACK_KNIGHT</c5>
159                 </squares>
160                 <move>WHITE</move>
161             </position>
162         </test>
163         <test>
164             <name>Empty Position</name>
165             <ascii>
166                 <![CDATA[
167  +------------------------+
168  | .  .  .  .  .  .  .  . |
169  | .  .  .  .  .  .  .  . |
170  | .  .  .  .  .  .  .  . |
171  | .  .  .  .  .  .  .  . |
172  | .  .  .  .  .  .  .  . |
173  | .  .  .  .  .  .  .  . |
174  | .  .  .  .  .  .  .  . |
175  | .  .  .  .  .  .  .  . |
176  +------------------------+
177                 ]]>
178             </ascii>
179             <asciiType>DOT</asciiType>
180             <position>
181                 <empty>true</empty>
182                 <move>WHITE</move>
183             </position>
184         </test>
185     </tests>
186 </config>