From 54eef831b26ca56e2dcf27dd3c36c351dad0dd0e Mon Sep 17 00:00:00 2001 From: yevrowl Date: Sun, 22 May 2022 20:29:45 +0300 Subject: [PATCH 1/1] First commit --- LICENSE | 121 + README.md | 4 + dicend.ico | Bin 0 -> 80734 bytes dices40/dice0.png | Bin 0 -> 165 bytes dices40/dice1.png | Bin 0 -> 143 bytes dices40/dice2.png | Bin 0 -> 146 bytes dices40/dice3.png | Bin 0 -> 149 bytes dices40/dice4.png | Bin 0 -> 146 bytes dices40/dice5.png | Bin 0 -> 149 bytes dices40/dice6.png | Bin 0 -> 144 bytes dices40/dice7.png | Bin 0 -> 152 bytes dices40/dice8.png | Bin 0 -> 152 bytes dices40/dice9.png | Bin 0 -> 148 bytes dices48/dice0.png | Bin 0 -> 175 bytes dices48/dice1.png | Bin 0 -> 144 bytes dices48/dice2.png | Bin 0 -> 150 bytes dices48/dice3.png | Bin 0 -> 156 bytes dices48/dice4.png | Bin 0 -> 151 bytes dices48/dice5.png | Bin 0 -> 155 bytes dices48/dice6.png | Bin 0 -> 149 bytes dices48/dice7.png | Bin 0 -> 157 bytes dices48/dice8.png | Bin 0 -> 157 bytes dices48/dice9.png | Bin 0 -> 149 bytes figures40/arrow.png | Bin 0 -> 190 bytes figures40/bishop.png | Bin 0 -> 189 bytes figures40/cannon.png | Bin 0 -> 207 bytes figures40/checker.png | Bin 0 -> 238 bytes figures40/dragon.png | Bin 0 -> 243 bytes figures40/draught.png | Bin 0 -> 228 bytes figures40/general.png | Bin 0 -> 245 bytes figures40/horse.png | Bin 0 -> 205 bytes figures40/king.png | Bin 0 -> 236 bytes figures40/knight.png | Bin 0 -> 208 bytes figures40/pawn.png | Bin 0 -> 199 bytes figures40/queen.png | Bin 0 -> 240 bytes figures40/rook.png | Bin 0 -> 183 bytes figures40/tokin.png | Bin 0 -> 218 bytes figures48/bishop.png | Bin 0 -> 219 bytes figures48/cannon.png | Bin 0 -> 241 bytes figures48/king.png | Bin 0 -> 242 bytes figures48/knight.png | Bin 0 -> 234 bytes figures48/pawn.png | Bin 0 -> 198 bytes figures48/queen.png | Bin 0 -> 269 bytes figures48/rook.png | Bin 0 -> 186 bytes letters40/0.png | Bin 0 -> 181 bytes letters40/1.png | Bin 0 -> 201 bytes letters40/2.png | Bin 0 -> 160 bytes letters40/3.png | Bin 0 -> 182 bytes letters40/4.png | Bin 0 -> 155 bytes letters40/5.png | Bin 0 -> 159 bytes letters40/6.png | Bin 0 -> 157 bytes letters40/7.png | Bin 0 -> 172 bytes letters40/8.png | Bin 0 -> 187 bytes letters40/9.png | Bin 0 -> 160 bytes letters40/A.png | Bin 0 -> 178 bytes letters40/B.png | Bin 0 -> 179 bytes letters40/C.png | Bin 0 -> 172 bytes letters40/D.png | Bin 0 -> 172 bytes letters40/E.png | Bin 0 -> 160 bytes letters40/F.png | Bin 0 -> 159 bytes letters40/G.png | Bin 0 -> 162 bytes letters40/H.png | Bin 0 -> 153 bytes letters40/I.png | Bin 0 -> 152 bytes letters40/J.png | Bin 0 -> 169 bytes letters48/0.png | Bin 0 -> 189 bytes letters48/1.png | Bin 0 -> 211 bytes letters48/2.png | Bin 0 -> 160 bytes letters48/3.png | Bin 0 -> 190 bytes letters48/4.png | Bin 0 -> 155 bytes letters48/5.png | Bin 0 -> 158 bytes letters48/6.png | Bin 0 -> 157 bytes letters48/7.png | Bin 0 -> 171 bytes letters48/8.png | Bin 0 -> 201 bytes letters48/9.png | Bin 0 -> 160 bytes letters48/A.png | Bin 0 -> 183 bytes letters48/B.png | Bin 0 -> 187 bytes letters48/C.png | Bin 0 -> 175 bytes letters48/D.png | Bin 0 -> 176 bytes letters48/E.png | Bin 0 -> 160 bytes letters48/F.png | Bin 0 -> 160 bytes letters48/G.png | Bin 0 -> 161 bytes letters48/H.png | Bin 0 -> 153 bytes letters48/I.png | Bin 0 -> 155 bytes letters48/J.png | Bin 0 -> 176 bytes numbers10/0.png | Bin 0 -> 147 bytes numbers10/1.png | Bin 0 -> 160 bytes numbers10/2.png | Bin 0 -> 146 bytes numbers10/3.png | Bin 0 -> 152 bytes numbers10/4.png | Bin 0 -> 143 bytes numbers10/5.png | Bin 0 -> 146 bytes numbers10/6.png | Bin 0 -> 146 bytes numbers10/7.png | Bin 0 -> 160 bytes numbers10/8.png | Bin 0 -> 151 bytes numbers10/9.png | Bin 0 -> 145 bytes numbers10/A.png | Bin 0 -> 149 bytes numbers10/B.png | Bin 0 -> 149 bytes numbers10/C.png | Bin 0 -> 148 bytes numbers10/D.png | Bin 0 -> 144 bytes numbers10/E.png | Bin 0 -> 147 bytes numbers10/F.png | Bin 0 -> 146 bytes numbers10/G.png | Bin 0 -> 148 bytes numbers10/H.png | Bin 0 -> 142 bytes numbers10/I.png | Bin 0 -> 144 bytes numbers10/J.png | Bin 0 -> 145 bytes sourcdos.bas | 6712 ++++++++++++++++++++++++++++++++++++++++++++++++ sourcwin.bas | 6757 +++++++++++++++++++++++++++++++++++++++++++++++++ sourcwlm.bas | 6734 ++++++++++++++++++++++++++++++++++++++++++++++++ 107 files changed, 20328 insertions(+) create mode 100644 LICENSE create mode 100644 README.md create mode 100644 dicend.ico create mode 100644 dices40/dice0.png create mode 100644 dices40/dice1.png create mode 100644 dices40/dice2.png create mode 100644 dices40/dice3.png create mode 100644 dices40/dice4.png create mode 100644 dices40/dice5.png create mode 100644 dices40/dice6.png create mode 100644 dices40/dice7.png create mode 100644 dices40/dice8.png create mode 100644 dices40/dice9.png create mode 100644 dices48/dice0.png create mode 100644 dices48/dice1.png create mode 100644 dices48/dice2.png create mode 100644 dices48/dice3.png create mode 100644 dices48/dice4.png create mode 100644 dices48/dice5.png create mode 100644 dices48/dice6.png create mode 100644 dices48/dice7.png create mode 100644 dices48/dice8.png create mode 100644 dices48/dice9.png create mode 100644 figures40/arrow.png create mode 100644 figures40/bishop.png create mode 100644 figures40/cannon.png create mode 100644 figures40/checker.png create mode 100644 figures40/dragon.png create mode 100644 figures40/draught.png create mode 100644 figures40/general.png create mode 100644 figures40/horse.png create mode 100644 figures40/king.png create mode 100644 figures40/knight.png create mode 100644 figures40/pawn.png create mode 100644 figures40/queen.png create mode 100644 figures40/rook.png create mode 100644 figures40/tokin.png create mode 100644 figures48/bishop.png create mode 100644 figures48/cannon.png create mode 100644 figures48/king.png create mode 100644 figures48/knight.png create mode 100644 figures48/pawn.png create mode 100644 figures48/queen.png create mode 100644 figures48/rook.png create mode 100644 letters40/0.png create mode 100644 letters40/1.png create mode 100644 letters40/2.png create mode 100644 letters40/3.png create mode 100644 letters40/4.png create mode 100644 letters40/5.png create mode 100644 letters40/6.png create mode 100644 letters40/7.png create mode 100644 letters40/8.png create mode 100644 letters40/9.png create mode 100644 letters40/A.png create mode 100644 letters40/B.png create mode 100644 letters40/C.png create mode 100644 letters40/D.png create mode 100644 letters40/E.png create mode 100644 letters40/F.png create mode 100644 letters40/G.png create mode 100644 letters40/H.png create mode 100644 letters40/I.png create mode 100644 letters40/J.png create mode 100644 letters48/0.png create mode 100644 letters48/1.png create mode 100644 letters48/2.png create mode 100644 letters48/3.png create mode 100644 letters48/4.png create mode 100644 letters48/5.png create mode 100644 letters48/6.png create mode 100644 letters48/7.png create mode 100644 letters48/8.png create mode 100644 letters48/9.png create mode 100644 letters48/A.png create mode 100644 letters48/B.png create mode 100644 letters48/C.png create mode 100644 letters48/D.png create mode 100644 letters48/E.png create mode 100644 letters48/F.png create mode 100644 letters48/G.png create mode 100644 letters48/H.png create mode 100644 letters48/I.png create mode 100644 letters48/J.png create mode 100644 numbers10/0.png create mode 100644 numbers10/1.png create mode 100644 numbers10/2.png create mode 100644 numbers10/3.png create mode 100644 numbers10/4.png create mode 100644 numbers10/5.png create mode 100644 numbers10/6.png create mode 100644 numbers10/7.png create mode 100644 numbers10/8.png create mode 100644 numbers10/9.png create mode 100644 numbers10/A.png create mode 100644 numbers10/B.png create mode 100644 numbers10/C.png create mode 100644 numbers10/D.png create mode 100644 numbers10/E.png create mode 100644 numbers10/F.png create mode 100644 numbers10/G.png create mode 100644 numbers10/H.png create mode 100644 numbers10/I.png create mode 100644 numbers10/J.png create mode 100644 sourcdos.bas create mode 100644 sourcwin.bas create mode 100644 sourcwlm.bas diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1625c17 --- /dev/null +++ b/LICENSE @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..1fb5c52 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +## Known issues: +1. Occasionally can impose a piece in the 4th pair. +2. Sometimes does not give a piece to white or black. +3. Can form positions that are not consistent with the rules. diff --git a/dicend.ico b/dicend.ico new file mode 100644 index 0000000000000000000000000000000000000000..6ef70b4c7310483a651796050a7f098eee442869 GIT binary patch literal 80734 zcmeFab$nLG_P4!=aVIyyNeDp-B$O5>5Hz?4iU$bR;#xFliwD=D0gAg8hf=Hr*W$%W zp+NB#El`?wuAQu~xeMoap6B^|p7)RU%{kMVJ$q)`^<8V$%-#tiNyJl9rWBJqq@AZo zgou3fQT+BYhsaJ-mp^~Pc5;z6CY31@zn#-hBzY#0L4(--NOC%oNN9*iPIC-%NK+Hv z&SVs1ujxyoOsZV5vMgP+MEdlMk`+sqN{y;jW%u{nrD?+m*|D^v#4c+jhqjEDK0SKN zxZ%+CvsHEMK}@a((it?Ao?X zYS*YOUD`*=n0{f>wPjw}zp#c}-cVD%9nn;}v}-FrZeC{2KUgAa)|9hH4odORA~HOB zge;snOPY1Q|(A!{<`D`D2+f?YMLq8zYrApOPkruSuir zC#1)PyE6IrKPBegQ^{Vqm?TRo64`2kNUDzF>EBhHSw>5N3OnSpFK$bgEajv~WLqgY zce^y)e?=M}xFlcwa$klWJ0qhm-IQvLn@g#pAyTQv<(snq;#E0%;Gj5@2Z@_+L-9`EN<33F zkUZrMOPenb$ZzM*$rsD_N}k~hrSjTC((8|ZB>K0zGUV!Q8T9L2S^NDDvipZU;_YJ$ zP*O-gNF`fj%ayNCu~OwKRjY+pukl&U`~?bz z6e=8Aq-e3?B}#^sD*aK`Y}tc?b9|ihlTUNy&XYG^%2cV-q)q4NpFSW%V8%?Dvq%y* zcMngmqz-Q%XENX9DH0#V|7HO{`;kdyOu~O#KOX<~v-r3bOP0vrFaDD5Um7i&AAH_F z|NJ9|_V1Sr=>z21)2C9kQYFb5{IQG}G(Zk+93dO#b&^(%a>>C~=+j2=Ex#(gu*_`#YI*`T46D^*55$(Bw|ZfYg> z_eIM7r41zRx1KU>;&_=dW{jLUe?rowNo(p_NtE%I{d#nlUyW@noIOiU?AswBd2-25 z2M@~Ujhjd>;}?6kD=6cmD#_#1?PcTC8q%yri0s+CUV=0FNvc$-q+xhY8PKhed^f(5 z{Jg%dtXVKwI<{;n8&)op?dw)ZqsCuI{sQG>%f`*}@vmo933|OFomU z*M1itPj_*8`$&VfZDsu6Vsh*Is`BHUYBGQN6lvYEwesmGi5NZ~i_)LULu0 zG``+)^5|WeWbC*7xJgpBM3{tB-7ldHUrD<@kELeKC|PFwYwzD*$fz54rOT>Ka{tz2 zxoK?v`N5j9ZgdG5^JO0CG5nd7X!6GR$;&cy(jRjD(p`x${;1vlbJF4aLo(vo8=1Uv zy@VACls(hJq(c3JQmFblDcvegs!RgjudUyO}brwAkpU9rr&)k4ZiFuc`NRd<$KNe`e&T+ z>wikmpMRGbw;#xor!OT}NDoPqcbych`KL7K^p`|7n=7f)<(Afaj!N4bFQwi2yVB{@ zZ&It&$KpueQM@uwkxY4Gq<#C*(&oxD>2U8KX?Ofr=`wk)ac!-{E8__93g|86n!S)5 z^;%1#Q}?C8*27X`$wry}{Ec{~Z6)q$I!MPJho#QfW2DsLSgE=3s5IU8v(yRq;89!C3p8R(&Y4AsWNMY3_pEYW_-IqywWt3q$#UPrN+NXo~B)-c+3{* zfAFMKZgfG4j9DU4eFlktPzOokRY^uoU1<68Ic7}VzCBjFd{ar$Z`R1ApKpkpTUtrt zjF23mOXc8QXQzt2dk+FJ^zfVyAw- zxOeZxRWYk~T-wn%zuE6-)B305j?1S{H*bB#D|h(%?b{E;#?J2EVq{EA%$RVG>Uq-~ zELZ;g=_RLsyihb%@VRcWC%4CLT-c)fnxi9I#_Xz){&;l{k5k_*Tefy+?_%NSym}ls zd2;)LnX@LfYT0tlnqz(ykDu^3HDmYgJ>Q+_+ppo5XU82lc_4P-!kMEM?`*lVdygDH zRj7XI^y#&0_k1^R`Pk3B+>RXBzJ2AUSqqOIU9)pv_hWgg9Y1k+_wHqL_AJ}hcY5bs zxr&*~Td;c5!rA-Q?AtlIaXL>QGXU*gx_0-{Wj}uZ{fv)m?2X;HY2~I(Eq3l}HEDEz z50C1*`YoHYcFx?TYxjRYd`5VM?Hg9E{$a=JnJq`}oHTljNA>EvwtlyJ?b5m5?dkR7 zkCPiFS-)Yy#!U-nb!{WOCm z=*8lmA@AC`bG}`&-NudH0x*v+df0gaN8(DraEGKuY(+N&mBB0h#~zuy+%h#RXbw=gW<=JU z#XZV5@-F-F$7yqwEmt8;olF5q(o`x?pl&_Wzi|DClC>ImWb|?i^6*IF_-tW_&l^Gf64 zk<=?sxJR&;-^U(lyn>7QB+cPoykLqFB@2gTEmiu{BxQn12jtFGHnm@R&)^`*nOQh9r&CjLlbW@-QL z{t%~_DWrUEQevFq{qH!XVZHiNsX`^$x@n92^X4CU`sY*QOOwdB(PK=UazMO2JtdhL zn*;s)<-*wu^6P$YNfQ%OjFKV!`^n9p=E#zHlcdn6{*pD&PoA1_t61Ss zN##st%`@v%50^zVr_0eFzn7WQW=Qu=?d9H$E0Q;FAz8J0y>u{Rf1!dQ^3Tg>GJMET z6Nh{%x3-4M`K@0_+^x=X=U`j8y1R{ByLv-@zxBIRt5Cs=2M;8ji9v2$ydc|*ub(t- zqKt|jDPMN$CL30*lz(pZlqI7oO6>M+a`x~+IdlB9_@(lZPl9vE(PO7&$FgSf_s?zQ z`Qb)VzHl~KICs80xp!Aa4>fb&ZUyAvvIv>jx0+)%abCH-01KTKpr$>i;g`k*B157Aw(rUdj|R zpIg3pn~dq(L5kMCAceyZOH}ka1Ej>>9JpV_$(zcYmrPfL3 zs0q?_`FiPi;eqrsv6NTFk@9Krr4rHZwxkaFRBCTHBoUjBNP}ayBx=(S@_Be66BkVq zub_nz_{nG~*nNbwx%t|PjYj^kSCVF(DycKJlQw7Xh-W(Huf3#R%S&?p>-Xe8YZkD!tj>+ij_av!_amGzqDuqWalA;q=OVU);rF_jzCf3<3;`@a-G7b|r zX9M}PYCXw2YN>?H-zCL{#Yokd#WHQt3UPCk6L&{3Ngr5UIz5h)^x1kz=KOVKmC^F- zzvHA863y+73o-n@DDYP&WLhqrghNe}+|>#t0On+1fX zOqDrv`C=vV+;`99=`cT@Dcy(Et2e|wTNuqxMs9LAHa&j4>4jQkDq(6 zr=zvQ+cVU(A2MW!zh^tsK61@RC4YW&`O2fn7cYkYb+e5*WNXvDp80Vv>}k3?T9>$I zj_+O~z31(lFHS~|dHnOEomZYdjp<5pK70K5*^?*p zk6tkyVj?52HnQ4>dE8HyC->+6G{4aO-u?Uchuq8S>DlJb$JWo4qeqWkKKeA~XyJB0 zo2zN<8J0V@vs9^qVVJ<7Ke02TqGqgH7kg~_vD;j7{_KSc-_Bmu z`;QCf&h0yQX6^}d$`tNH_MAO?>e0@#hmKso9yKE>YUaGCaWm(KWE!6I^MbAEcIU#r z{rmQx>o|Ay9dFM-_aQe=T{?93;>Cxt*AJT$jGs4i=B=oxSuHs|Ekj` z*6$s(WZI3k_wEn*eC@@bc3wQYYuB#bvB!>goq4Nw*XUleLQ6PHW%V{sX5ao3=TDgS z`v>%#Htnu?q=jNGUfy|X>#oa(%?0&7eyi7nZO4x<3`pv9-fVs6+=UCL_n$xU%Zcs# zM$MfztzYrt1w4N{b@|ZQU0Y9WxxRbdw(+;3xAndiy*4Cc)&e8RTz3y+WS4DuWVj9ef;wA+ZHT{?rH?>>3Q|!`t!e>*tg0w-+%4b zo&%@N?btlMU&TXbH}5`mBzDV|qtjPLE$`K9`GN^UP3zXJ%SWz1cW(RX_1o8~~ z&3ElyxpHNfE-Rqr;3(%G1?c$vE>f z%=|Nspr>o1}Ak-=3d@&UR0N%^T*8? zHf(`e3>!1MR;@{C)7GlBxY?2(oqF`|KXS^*PMwwx==Am1OO_QjF7or%ZKlr{8Z&do zu<^5^#}tk*M^8I@c0}VkH466Z(W%pbk>7sXsnfS}zMeZ^aJ_6H?Fto=43WczjU6|P z34>?y7U2<-CQWMm@i&#eX+PPtpEA|l?0{*VI&}=o66BG@SaoLiA$__GHOp?%1&0qG z(YSH-77U=Wu=II{X6v-Icn6%ft^N=$RMh z_MXknaVoew^XK_1?BVf_we%w^Yl!T%;_hd-ucaPrFlNJ!z;CH)v8XJR%zVpnbk+}uNai2 zLdxVB^7=*=3h~XF&Brr;?jZLNV{J+EHLg@Uymok#GG&_9s8gqzxfWmZRLrHj=k;_n zFXqk|=Hr$$YoTl*zLF$IpkMv!5e>{wnKEVSR<0i69^{^)WLUc5K|u}kN~07F^HfO2 z)wsJmYk7KRb$545A6DI5PW2j9ikiony0CxVYQ_t?CC`u}bG>}-nbR8#*}}2~XHJqm zbJBnSUtg~z{^8ZbYm_OIE9Ylbisq}C!^hv8B9(a}8I7g*I06bK$!sdjsOfJ2n!zxe zyIFnx?m;Dt%ky%tP|zsC&D}kzPm*jQg)$co2zASlBzevvIg92j zQY2@Nbj6AX1ZT*RzJz;Fv6AT=ZbA7z%8)f{K(-9o4YuI;7$b+drqtGYZ)&sPOJtJI z%{QrgfFpnY0`5W9yv$s^mpKP(z8)<4#xDvd@iRA+K7D}M zUwZ<~Q_Gk%$fU%1s(F#=`rdNX@Db9bTX)HyuYhdXyjAYsy>I5D=jGY6S5m!3Epan* z)_}BWCC1Dx|9SI9V!z)ksgfm=1F`$f8hd5w-qEa;59u!pX2wXLs9w^oT}?T4@PJvT zUT)@usU>OBG-mGmL?(|JZQkX0m^o~qHJ5AABvQ(hC@BxG|17VcJdhhdpO;J-0<3vz z!-xjr^m54WS5L?vCpya6EgjALt-7q3(pq9hRForIXULQL_pN#Gr12A_ZL2nB4Zoi? z|C~2xzSIe?Ca=%8mG36klz+?`{fom5W$nVLvTX4ZNuSCof8D<$w{F~$l-}-g>Ed;% zT_wLP9a&K(^{pbGW>06$%l|fWf~BiB$+4C7&HI8Z@@2yUGO$!AjV11vNcrjH zDY^T{a|z0rTDE+D(3-EFSy5FMPAV_G+lR>V4O?W@sFG%G;*9!v280kULZQF*q% zw*3Bm4arrghg56xx6E32Q#$nMA9li^3t$ml~SrC^2iQmOU^Nt>aL^!k3U zG@7|srkJ_4f1bkfN$59Hx5I0*iuQ?A?>$0#n|ba~liD3PFHsk6%dDqw45Q@cU4@_g zdhC0N8hBaqMs}56w_i%bEeE9UsY|lr^*<66n9R)GPn&h}oATNCX>#f(bKU3eND}V| z$yI!{lyCN0Ce2(XKknQsTVfBHcR%eD*Y8{Pd?6h!K9ZX24vU9(5%J1C-^^oYNSff0 zX6|}UJ~4B`cDMeP#y_4Fcb}>f5ELc#+TNC;!)8jW8*i++Z)Y>_WFFi0_rIme^u=b5 z{EfVL@KlOTS}l=h9!kAsTcmie5mIZ(TB*Kti?ycjnYNwm-tj<+&Dbon%{{PA5%6(s zY1n+GjG8iC>b2`CJvaX#Ve@uM-fpAJd)Sr|ws4PBFz-AwS8gbwqZUi|11DvsnfDiH z-CIKXPnAi_*2s#jdnB)UKYPTy*S&W2x|A9+I&torbVT!)FDpOW^=u)NHHV{O#k+e( zjMy{c?(hQcO+NBW=I4_-O&TA+QW87C!&w=f`gMTfLk;Vnmbf9MEd*%v32;rJzjC5{?}4HJP24Dw#uEa{4(Ox0_cs z{kwFzS8-wg=fC`U?dLaL|N5)d%a?opa&WcgKUtiWoI$3&Ge0$sHaQ$(`kS*~au#$r z8vgatTz;2(>y90J{^rfKH_x|qT-Rk+h0`j(P+cucqj`WW@d2%@OzjQfr z1Uk}p@3PKZ{ITc1JpcLXRjdD-`AN(HLQMBS^T^x+F10OHs#KXWJ?OsVc+xqQ>V zki$2yO~ZBT9zHky`#=8k+SRKY%ne-Iw&7ZmE_d?*+gw3NThq79>)l_wneGRF_~Fsk z-%MYl0CPkBOBViaP2<-+eE4en$`vcFZMe2=+na40%oW_W9+x?P8PC_RU+-@IvTA(y zlY>WoZ~9kqI^7(B_soSqeDUh$&6^J{Z{HXb)3@)_4I8dqdwODi_oU|h70vl8lquu6 z`(>fKKc@Jdvp@P_&dAAC-Lj-8oH@16=P#f9VfylO`R8*R`o=64hGj~55d9bdkDY)s68 zp-;#5-MC`Ke7SqKg!}8>?zA;OZBE{}apTdA*hfDtp1dQyuWw))XV|6R#@xL5>Y@4H zAFr;QJ-c%G@|XoNGv?i2upnmW#@V$?1qGDysN5zH?xuUJ^>gE=om(f)HD*x4$nf?2 zn-5;x{NwVA2UpHsIQR2L)9vZTTN^jtTCm{OEI-e`&7-dzfA)h*Zp7Yrbntp??4zwa zC+_fVQ_<5%@b!$F>t6lw;MKYVS1w#Qdwg0<%)PEdV}?Gx)hA}bY(LLZr93^|&0}!1 zIe2i%!RrT4p1dBr_mO#ZGwCNs2oPV-d-dv%%QsKI`1R~@bAV+FVxD&GdMjquty>HF z&Gt+8x9Q)?2)WI{lS>Ys-)rvwVC<1clXh;MG&p^*)A)eb&t5(GW8I4=_i-ZTsW}ZT*CZ5+cuh+{QVhE7mV#!$h}FE*RLyAM0Mu5pT8J8m;SLkb}l|T zdGv3_uAFI-JbCrv#lr_z&RluE;oR|aD~H}UkFL+t`~A8N9a^YWZKFK*ijI?y&Y%3@ zhrN4auU}shYt|$dFP?L1&X>D)r_1JWym<2J;ll%0&i(r9ujkI5UH^2RIsNQ;_g5`g zFgvw-lh@6C3Jgy&_tE+EORnFz7<=A4guQ#`?%ev#(K-8u1p4}?a6EkS>cP#M7tWl% zaQcKfz>FDBqoeOXowZ=<%=z9aGM6=rX1iYgWX>P^=*Gp12OpW&hkI{q-FfQN(S37E z`}#g}Jb&@xz~uwy4qQ8T;@XDw>({TEalh+d^JaFNIdg^u-VvDpWv3el_wM~6_Q(y+ zZXV#A#gondemDJ_hCIIf}vj# z>GtUS!C1QQ-TTuI-!7i>?a@(-=$~Zafd_wFxp3w5x$S@c`Rj`H)2?>AwQ0t@RkK(1 z>xT!U|L#uatV_z~`F ztsl1P*352wrbcg^>Th`R}L&&w(R(}zRRZ1y0vQ6?C5UyR~i4p5%Q<|hD*P3KKAh8 zy>pNBj2bv_>*U3!7M=Q?y+h2?GyRX7TiCwh>V}_}?VlNatIyO;-G)Zzb2xmn1pk=g z_U{+ZABv^_jT;jOnxCkFqq&1SDN|MqYGckd1fyngu5p(9Jo6ZmOjPx=oWxbx_#kw(EzGXR}Fal!PzaQyf=a|7o5)Asj^ z?z5@iY}4PpL~*}l$+83t^c-ox)?D4bb)}K4O ze%iEU>!2WEsa^XGbxT=eRTr_Es)qm8{#rrCyHg4$H zh7J4296xbj`-$V*SFG=ABsi?k_)X@gTS%5HS=xP8t!n9$hYlZ#{b|R*o;?RInh>>U zKvY!Jpq(R6E&e`BprfH<>9Y0aq$^iWUq5}rv<)l99au4T69?$CaP#WTYd-sI^JdO} zWMa>#D7p_c{dW!;w6pWkkza1!y{Ad?-7}||3tv7gW*GlBD>7rpj_)>m_SEQwo7dF+ zY)!k(dCaF$-wrU`zTFWOH85(@w}X0`?mHLnn_QaM!r6V?^7YfUuUNTa<;wN+9~vFq zt=stVNmg%e*RI`~H6eY2OXIV7B^j|b_!h{K?e^k$J26yf`sPmxCqrdlb zRx(G(-ecIbVbjKKoZgr2{Wf*$*KK@K({oL`y5>KdOV-^o&|Lk5!Gi~XJJ{Su&!|P_ z4tfq6w6%GDr$GA)G ziw5`X+4GwLod=l<=oOZ)ZPUC>ojwi&Vfl&~^H&aw89K|DZvT{-Ir*9jtJ_tm|5f`2 z;cI&hDcR@jJC6c+fa`$m_bDK9UX8!yI!-mbAJ$v3lNB@YL_07X; z*RF2sj$ehhZcskMM05Iqi=s^Do;?Rl?%a9toF#RfVF4*kgc0cQtCY7CAE!+>U#In( zT_Q=E;Wb;ds29D@b3y%seawP;cQi^vWgT37p`W39S=o<=%7qXzIH+`wK_ zlBM=3D9O@!n0qHkbgxt@Z<(RPh7FA#o}sA;7$WM`jHq9;Mg31BBfn_>MP%!8t&>$6 zVdNjx*?ch9b4=TyAg42L$v}ViCZ&Rn8;cK8t&is%Nu6HKbTw->Y7|kkMMRAbt-t!B zef#hR9rHMyX1y+|^Pqu)hh%UD1%)}2`(|vG!{0xod6VSH{gR~VB5BNb0cA56%wHgB ziirB=%h-q(jaqm7qC>G-<-VvDStDP*vgQlDs9s+dEbNm!UAC~Gf{v0UO^D-2;`9h` zCczhlv_;NhVxEY05iM#))Qf1};nN18RXT=7hSo5FYen-VU)CUJ28XYA#t^@BbqW@+ zT%?aPpi-t3go_2}@97&@KcZf}7L97wiwG~)ph4uP#Udj^YqlxrA6THRGgDS)=D>{J zC7XHDwm{}2NeZNK_bcI^AzzB5DS}(MCvW2ERF)~Cga)hLp|&o4v444xl>7v{>3w+-~8(kdPd~LCzp&-h3HDLYk#15S*q^33pEd`RpEE z0cMV2`loR=G5zZs3DgXa3=IvfQvTDNWk1TAHO$<(cgE5MgTlgs{QNU!Y!;Hv9I1dK zNA`Rrq(IUVO+1^XW6U%&o?P`JA{y0fRI^%SXk;<-3_o?t8e}w=C5N}a!_R3LW_Eb{ zI#M}3Jc82YF!~i|fU{7=>>+MG?mihZ__(L4SHDqBqoL1=)QW5zTBTNv!e)7{RJOud z$_5wq%hn`avJ7?nQcIc)9(e--80H#!nkx}g$l}FqIvPeqm;=ZTzJ~@&eVY!eI4lD8SL;a9azX27UoP-I-@hd(>;m1IfxOh!`zwEnVf=8fKScv znzf3C<}C6_&d|`D`{?U}4#opi}-rz?=6aN)AaJ_-xUTfq^S)Xm=!;xsp(F0i7n zv4nttyl#R1MjRg1!gE#+HD}LRq(;%u&m1Yu^_o-r`<6`S%zq-4ghQpqJ{UUMg@ zOZx@}CUa)ZWFD1qHyKRp>>d_D-$1tjGuI6^ca!wvoH-M|zjc}>{(<>2nIq@-F5vDg z7?>p_B%7h3-^)0>tpg=ze}W%j^jB&5}CVM_K){ zNV;rhdGP=L`Ty_}V4Zjn_iuiOh2MLL|4H(8oj9S!tjESpjae4A|HzrRE!+3Ut&2Tm z<&;-$-4nNT)AxxfX6eSbrK>i_k(1~*GG>XD*Q!-J&a5f_ZzpdL&$yJ{9&w$!N5%bg z{G@dqT+4q-oZGAs$K|VDH_n+Vopo+shj*O$U6Z(bckjpj_S>&<5AOXDXTFh&`{(b! z-{zEE6K(9t>~B~Vr?(ENT z&+gxgd-dS2xHnIp#J&0Rp_Mq#cMGS*aewy2v(jyQnL3#0K6`G~*sXKCdGhM*c{taH zlDP)!dbk#CW6E5Uc|VZIif0agc*9-Uvu$a>Fo(OcUodAu+{9&T68XcSOW)|kssk^7#Fs}jp-0k)dBW}Z9STqoDTy|j#MXx$%dj_mot($jAj&&QF_7QA4> zGZ@mZPh97gkrr$7ej!d1tb259Z?)$f=;+UffBsuH2|9v_#ay4W$zUg5tKGw2ZJ%e3 z9l+mwTll}Efpj?w#*y?nkQXhG-tsrF#`n0|zp}UI=;hMo>z2L4N__#xLsMyzr?jq( z+hc@8%?CHyQxf?%0U7}5yXC7ZR8b~b1`vAMGDMw|i=hy8I<@BR1 zy5@NAoWpiLc-yr>JJo>Z_&9W#Ez3uV&%x8f$Fd!swc5Pqu0Ee_m}}}XbD_l^{^&^W z=|ef^f_cV@4dQ~THjFFWv8R>8i9WfqIW6B}A9qv(u6nR*0AHZn=AEZ?Eam8WE%xWE zzLs3e`n>V+Ja3*^ylufZKDpM#Z>tX8K6m-DG}m2rHo*Yx(> z@6%!;e{((fKkR@653a36(^l5=v)eso_4#W1cDqLd-N#H$t zuFo6hsslL3+n_#ovyZw&jo3IOjJ3oIdVKpeQ1`xiZKL~?KjR4JhUHuKw)0uqe7har z=Iu7)6aDemoCE%P4cLs@yymb+1InIU`73wLVOAreW8(4jxa4;3*gNdWE03INu~!XH z2Y+I$FIR4OM+2j`|Cp$S_vrxkj05mj9deKM>(J+FuSfq{Pg{Fg?cehMiF^}yo9C#^ zEp3=>^$m9a%s!2c?Z?*Za;?*CdyXE_z}_8u614X=26(Fj^r);=o4Os}UfVK`aDK)^ zy$;TSJ=@vy%-_d8(f1qXa3@vo6lL+ZkG(wGj0M9j+s4;p<1mM}=GZ=o?OMw=Sh|3p zHLjSkMg4&K0@&M=`T=~vfqe%p{@fqWPsbGHs`tu1%4+BK{p{0v<@So%r*$5+ zfBP7~^F#w`_jU~=ayMM;b`O8zZtS19g8RYd;SEb=kA1_Qx+?ufSiF_J>HrOpls~!p z0`&o!s~^xD4d4g37IbLmZ-2&=m9d?LmUZ7-{_)RPHQ+iPytVsy-|%+Z%mMy<5ND4^ z^c-A+y=>p6Uiay>a17;Zu{6G3^LOnYo3}C7F~P8>p67$zb6n-G&xSd!a@YKQ{24#& z{Nb*N7*OLn_!H-;&&S5q_tzRTC6PbuX+xr(ZJ4VDD3iFB5BY;Fo3>an06u_gbA6tA zkNRBo8LRfSo_6ZPnEzpKmi;IA_qXW>|2Eg_)3Kkm2>88a z9)C`IUHrbc{8bm!yUsFaF8&{jhACT-CP#vIw*<&jt`T#qBE$euou^`uHzb7p#V|}(-@0zRMc+3A?yS6ju z`Kv}KyQb?`e~ZI+a}L#->-j#kO?&O5*P{G2cRin718>XmaRAq;a}jL+ef+Uw_$zmN z%!dZxp|<~7-D%di4|`Ifc6}4adU#^{a3|sK;fpTdUSjsPclcAMzTe7?AE14st@|vW zV4X8zEYR`5mA{Sy)GKTIv$fZ$23+fCug`_JooALf=DXPYyK4aPI-ri{&RP-nM?7ke zv+URNKb2vx*Mg?G7FX`Nt@*opc-I%urfiuCiDSPW+kPF`tm~YQ=c)E@X&@oygDE_9 zK8NquaUXW*LHXkYsAF3>D|3#4Ur>Lb`)N--+ljg}8kjMvtF^s&`rCOT*SK-jia5pr z${Eu7zB2}JkILMBzgln4^|>%7R{rGgKHFE;8j$k7|L1dy4bPaw`ZH^W#O!)J*Yp0T zZS&jKaef)9$C1;HwM^yj%G$pDwj9qsemlN=`{wU)tReFpKIH$=9JXe+e>;2j!JVZ3 z9!@Z1+$Sk>d#-(ytv#ndi8|GUYC&~@A7C6n2g=_nPo4I!n1E-caj5+nt6!&1{i^PN zpC5R;-WJc=(n5j_V&6Pla(jX~3BS+t=34X||84H>l{3zKpB$Gw>*%;oLnm0gh-;L; z>hLY=_;JV1I=)T3-`DtsbsyqBW&a^vGGBe4-`6?5+I)c?V-m-DY~9YEeaav9j1Owd z%HDkMoahVew$6Ty3FxC5u=<&C0Syu#kdx2>HqW}W#sV61yK;uX`&irSHRdMfvY6ZE zdf5BZ$4@NA%Gx!DJ?qg&4?nloOa5E#w1d5ycV&xzVD`>&p>=+bOXHu%(i42`3C5~{ z_vi6*P>uccosW+FAL5S>SD(*%56_tSJ={sKh9~}B*Kw`!K4Gp8cf0SWOh2`4|AqY&$v&S zXKp{ohpq{oDtq`-hI>SZ=Wz{MoqmVAvQ|H!xoYFBF5b0&#xu^Z{O$gbdahIL1zX1l zz#Y5(q(F~2Y?=g1)^*h0RTqp0u%->UYJeP`RxD@OMl9cK*}ZO)vmY&yt1eUnY{MUo z={_`oU*S5@0MFSz9#pMZ=^g&6_4l!Gt<$#HzuLMohdT-8Bp7SL-m!bw>$^#=k7ujT z^+Wve_i!gA@o8w;KjT0ATlIcr`4Z*(zFajBpTFfEKL?EW6Zk~#mHX55q3hvU^UPra zU)YjhtGVjIp3{f@XhV;o?BQ%ru+(kk%eK89J7=F=7qnpx0Dtub?dhY5F@$|ZM=yzI zXE>_uT6|+KB(hiLa3-nGR~?X3Z{OBF*ca^W{233}ejk7CQR{gI_WM`vn&U(8>vrDC zoad>`SyNN)#A$p#!TK5Nk<6#<=lECIX7kEib9_P7hDR;__yP3wKHGP#Q%%Hc!K_^y z{>+WIFYcN9C)f2qo{7cK#vR7$*AqD>_yUWuX$xcev0u4UR;|Fk&4F`q-4C8l^!?be z`hRjb+LQWxyB6S1!romqz%i7+YC!ob$A3L@V{=+Z8`pNK3-~L0_3L)-l$E>Myt3DK zXCI0~ta)7md-eIso!ld3TWc(+Qg@>@2Ix58%KAgw*gyL;_Tyb9_pIMQ*!ipdT09M7 za%Gz|RaJ|zZYyj20%dYIo4@B1pAyQ&rfsy=c)mP$C$9I?f8s{Ij!)+A8^uk1`6iBf zbOBHG?dSl#yrY=}|8Lp9DO)js$yHPIvGio>M)d8N=m$Pz|7!cL%y~9ir#bI!;17E{ z|M%Iua>wprul)60wCar<_UiNP%#}Or&EK1}VnE_9#((&e-Zu_da};Ca|0&mah1&x>`7>VgeE%v@-UG( zEE(6)M3-&vYJobE`UN|G)d0*{-y{YYJYZ1bI==ncD_eaA_HEUG*1=BgU32UlAFqBM z?)Z6fR}Cft`P3_cs=M;s6ppg=-_{do^MmVtdwzv2$W!67wOx z86amZgSO~^zPytN^!K-}o#&;DS*Nqs>y>c=&qVuHJ5Q*$vsdn{?b06poge=b*Wu0^ z%f_*Jn8RLu!Z+9NT4i#yK!PW%@dK1$O}#y*o`g=cj2}?;ZrgM9|HRA6 zU46aX_Tg=n+!i0T6F9EULi{yH|O9(260G+=yMfO2e6NKZT2yseAB~LAvv`@=teO@Ma=@$ZAkxo5^PS3hs(t7R+pH}gH>n2aW;-p-zF_@j^7n~%qj z{f2oWf8zt-slMJ`hP^%ECt!{SuyNM*NOm2lR^X2RSN>>%KKh;*w)$-l<2Sz-0$=@} zhg{e9SmRL*{Gak?4Hx$6-<7qp)m(Yo_fuv+{2A|w0o3-{#wX+sJCLYPwS652&;WJW z1JhV@7}qrc)d1g2z@NFba(2zl-=ayJ>%o`(IuBI4C%0_h#C?pr_`sUip&~3u346v1`C?_sWy~#DKhiAcyfR zQ^$4EUo|lKX}pghR~^u9+P$Y%!Y8mE%=(x50Dcb$*1C=lb9?$fwSQ$#tPekBZ|C~H zvbNKlHuQ(F+CKb4!%td?7yuuj-w4=!fUfPm{f04qJ?O0#;@=VIn1`L|7@#%{M`FJB z#RitGo4EmgK>5?2`97TC?V6}(TwwggPF=a%8Nzbh#osJDhNrey4ZxK)^wFfp({0*X zIx*i3!k^y-!?yANYV*onnUkyi^WDRLGsfH7D0}=i{9$S5`7iFN&0OCk+P|+I{D~hK z_tpN@2cQG^^PK?f)#vN@&vn^RDTbmDT<|ZQ%-k_Pg>|AE09a`qBBU>Hr_W zc&9c`{2xCD&=~NE|(8{MbOHCOiVSNn%Q>$cYK0w;_C zA7YON;E!Kb#vjVzL&D#~)7oa-H;lE8=R`e>HHWXYZQ5FW%zkVh|6tGY0n7pI{3*kn zxuE(0#t9tMxg2VQ<-cf-Ycg#R3WA17(u6 z-e=>F2H=jZs}}6`PZ{R0RJ&HL#C_Be`x7f_{IBg{uKq#!+ciL0{XTtY%i1mcnFG4| z0OhVZ&jXF{4v%sCL;RJqvbW}X_yMB}>ez;d74xA1W7p^)(FfSHKpnmV?soQ+IS>3< z1F&m=F#rvy4?qKq37j7d=#3cJ`Ff z1NLv%0A-HDw?6naUH4V)nk#?3S90b%@P?~$hP&Fg73&+jr%u-cEWISOVXRmF@3VOw z1ITI18V&XhKX@xU{6A~(_ox8HPxMSxDi8vpPVD}`rQb#;s{`PdD@2AdsS7GekYHRvq`?S|J zfcNod%qGE|gipX%@ZQ31_sU!UE)Co4xAVu|tg+n2AHL{;cu;NLt`EwL6&mNkUpZ4} z`Fxi(U>ygD0a@FF9jxFAYu>3TbGuzDTk06!(GD8I7oZc}4|^RC;LrFEOLXAM-<3Vj z1O6m5qhqO#0c!7dpRep;2zSllXt8IGpJ4y$+o`w8W}g)^Cd~6J-I#vbj+})3yUqcz zf9iO@$T!01fV^(&->uli;?M7Wnq)6qTCjc}G(P^*F@QOs#ozG6zG1Jn4}0Zr<))3L zjfA!u^ILx3jP3Y#Y|}m;RPN;XfB3Uj&w2p-VT$dOC|iEP%nOt&Ib7Mtm=5z5ri^~j zuKERQ>^Jj9+H(wkZ2D*t^~5D|ccc661v{e^|M)xARYAZ*%}-i+=)p%dRP# zeb~CiI)OiY--#6x{Dtbkngf{iUiAU6C&5~6pZCOQpiPgv)^|dDy9j%}0aLqwM+asf z_X&Rz?*Xx8G(bE@4r5*8QU0n8_QO}%+vj=o=er_eO8kKO1Xm5{yE-_*)$R{8E>!+% z)3k#*3I4>1l&PmJ+F;!PJ#Y;8WB=9|V3@+6`-M0B$?bNp`#!`U-kONrVGbWe8hJ!w`)N8WA`MqfIrZ0#y|8;So~b@mE~*kx2zSA z=>{xw2J^`MZvmXtR zWBb@S2|t5=s3*~%dirYoul!jDgg*)US0A9ZPt2_Lk6vJ+zMmYXYVXRN_{`#Iw7@=X zV{x?GvHAhSTD4*6$DD)n;42vKmA~dz3}E*0EubrZ?49@@-mpgl@W%&G$M-7sZ^5{K z{-zrD$-Ud}jWV{)8oixAW!8JtrmeZ5*`}S^zQ%pnI`7^&4rP41jsdRR*@i#*(Dfhe z*v=pJFxMQu*4)pm4XE!&3)nsyP#>W_L+xLEzxsdfUzyu&U+eGz%>Rj_u?@cC;F}QU z;>z8!cf%ZR@Pwh28~fI{9=9 z2GN6#0rqhKyN5rCF<<9&_yDzed#*arbs_k}9zCE7Wlm08j)$&@|F8pP@9O`t19-C^ zTj5&~<{x~s$+vrq10>=jY*2l^<@XJH7*S_EN1H9bGybdX8~)0Z{+91BeXL`cHp*Xf z<&WlIY4`oaeq4`^0oXh~K>Y#s&wkd0c^6<$)S&~{-%o+B+CO|P9VGCFxvmH37@^!X z?t?XcLg#q!Cq^gM!``X4Yk)N(_R$aSFte}uz!J7<{}yvI-@`{x&)5%ZP51yE3sf6u z3;pvhoNs=3udn_9U0~PzO&tDyq3e8~{rb01;E%moHqCgQzz;_115_K9&6|4oCfa`j zU$uXH1qrs)!CZYrV%Z$SDsv9g4(8ao`T=-TcGUpvl|T2SHgDGeWnw=2-zQ+)F1K`F z;yABIblS_5bi^otCizKMpszYCMMqlqt5( zKGC+b739EWdAfSUSMJn*_(i_}=E@ ztv1*`$<$jcGk+6r_ZkD5ZL2;(1IjzGy=uUmN8bY|bNoGJSnK$&V*z!n1t@=44Y18O z5ZHy@JMZ4GZTP~TWX%H-Y#;Xc1(+&#a=5~s@dF)bJiyowd+OoKe9vNU?B1>c%4h&P zhbPQn2~)PQd-eCk^OR|WA7DQTZNQv;_z~s+_f+{mv2o*gwo+Y{df!?D74U?VEkHQQIenKfm{lUMOSh8V|5dLJJ&|*uWYO zTr|-C?%Q}D9WZx9GjJv`E~xEe*LL3zf3yJiMbG}Wa;CG{8P|V0g2Seysml{isjSi0g3}Tc{(UC(f_z$?*sHe#+K2 z!lq38$2Lj%!(Q!QbLG#wE@E8n9bIDI@YVHx%69f>LTw+$TBaT!p!QF0FT))BXTHX` zkIlRK0PGe2t$qNT#(qg~RG$D_>aca%!(4O52Gs}0qpd4fw$%tr_ChdWxK|A+W1cUR_GPtNa= z!5{YI@Yk5!m665LFtcpmu+*3kyM;Sip^mb(_HWv#ZGTV)=*o=y#Qx+QLv5R!co6p3 zy!r;d6@)uE37b~Gj}}Pk1N6HW=06$-;=^^0XXj5DAFk{*ha>W;URvlR5fZ1>N3yHirPC~N$h|LG+Iuq=zcp*Ux_3qv9H{(V*<<_m^*-f{CNi3N1GY__y&mTHd+S|5!nm*FfX0Gq`>Y3$ zh$CPNZ}{31b;JS01F+V8j0N}z)q|yzgf(Ew+^;L=4>6}+*F%&)V?X?{Gwh#nJTXp7 zuw&|p2kC3E=KUUQjUL|d`}Cz=bC|PjV^10W^y9edOV9yhKDG~M?3-NuKm3(FIWd8K z4xrp!?VtDHjCDLCY#IM-=Wopc%)CHtUVS|Fj&0-9?Y6HvPN`ueQ!MwvLb2SO8tHt#bp~{x|hyq3oQOd6Y2|SPt2>#$<-h5{sY^G zKleyIY&7Om4Pg7!sr@To#(4W0FZ=NWI`*@TJu7eKf@llQXhGM8)CXwJw_$ef_OiwV z)G^)@Cy*$U@EsZ_pbvh>jo$@C+y5&*fVTGdkMW=Nqj&flPS_-DbiS9!*w{Dhm7V3^ z)#f#K)q(l|b6nLF{b8uT?*Z3DJGc1&w4mREP^JyKAXnz90sH{T?*A#X?ujplx1Bv} z!PeZ(@KoD}F=IRJVX9-i#`kDMV?T5NTl|0~w15WK#t&fkB+BsDbzIHu8nBm@JGt6E zK7oW*;Lm-zvR6I0=5{{-Z;k)S@&6Y81b%S0#sk9(Kaj{??H{{0et|xT`{--qpBMug z_LfG>u~ai0oA3Jy*N^}GAKn4NSl4>h{x#N9ZJ-y{fpjcjtzVhjbN&8-cOZNZ&;9Be zKq7zR_hHYtfRDHHhb#4H06S+Jrs#sU8Uw7bt&M*8kJC#XsSFA^s76VDVOdhA+MxJ0~e)D^Fk#f7<9iyYE-_ znxhlg6X#>^aJMJseXzyPv%ZIYzcUt?*boh{PDD(oYk?n%0bT8%_k+9#cC~*P>)c-X zTlQ^u!c=V?uEc|Az~Y~<-*vu^7MKIzE6D9*KRRHWV_?H}?sn#|#@92xGxn<=pbhaL zV}RPf#)-!TAHcg0{zd`z!gqA!Fu|Xz2AB(C z*KoJ9*BF4Dv49+wuw^XJcYxTlW%~(pJ+@(t-^XX*1L()^f~pUo%zA>Z@xa#3p0e6H zb3f%z9kBqhA9io?H#zrc=W4fmSZlJ^Q-(k9gt2{c)&moLx$)Q7Dhc18?Bj)&jiU`6 z7bsh8j9tTAeSpQ?=m0yn{Dv7vc(;VjzR&LM?C}9?!xsL!Cd^oX2G9j{>_-c_tudcH z25`M!w$Xvce`o;PSN^Wd)%NZ6>I3KpYaQ?3moo+s8=^aHtMu$`~m#gul^rD&b{f{?}vC(k8SW?oZmy?S->2-C$XK#-|)n?E&EQedyB8p1^g+) z+4BF!A1HhE|H_{J*gV|%z5e2j-&nbwxxK9Xi3L;xkybYS@he7>fHe)tTYHNG6~B;{-`Yn^M34$uIci3ipHYfMNEf7r8M|NTS!7-Jc~ z3*l-LY@-8R17^%uzwhe%l{G%V)eq=+4{Pk3`y{SpJ%ITlcCEf2{`dj-tN&LWu+29- z@3VhctKZi$@c=P{@<%6>iT_}1PmF!m`<(>euHXJJ-s^W__P7BJ*!e4S*Bt(|gFAMG zf49ba;}_KC@ee!`>|R;BYQU8@+c4L5lr0Syzrh#}YqX$$D+d0sSN?ntn)o*_68>JC z>Y7{=?<*|+#`gak{@A{1z%^$qKqtfk*t*7gIu^hj_Uva2aOIB|iWl{RgHnX02PtbABHLTVPw6Q^xjb%im1HCiK}TPgmylZ7T*ee0h$H6)?AK z-`Ks5^}NT?IXyh>Tmtl$yNXl2odNje@l5;W!*zKM&?MV1?_5G>?*sA@LGtY;) z#sHM*gFj%r<69n!?I!bYh#9_i-jqpv8;M^eM;q{mJ+YH&fOXk-Vm+Jxe@6%Sd6VF8 z#e2*VOj4U?oF^$qJ7?;N2XyXl-=}tO^)u}8`_z#$*4zC*T0j%TgBE}O_7C6wn}jb= z=BfkDv48wCI#B;_*8pWS0Ov&huvh*GWq8vDhW0st>Ht5W_D`LizizW1ZPEW|1M#;*^>;sDPdtF8 zmAUGhZP@c3h}g}QJ3N&=xhCbCn45NX_R8EfM+2_hmA&SS4b10tE-p|3A zcZiGwv}YX&{~kH2!)JaMj5VpbM>2_Uu#M)M-6y0mO^C7Jxlt=gJ<& z>I105@3SVLV}{y4>ss71zZcKH`E5_sTN*Gr;NKNO2YeSyTjh@ZGgs32pR)c?u67SY z)@;?^tL>`}l&A96@d37!SrgDU)KMm-Yn5O>FaflccJ}vs-$Azuh*Jzxw_6vA1G9GtT4h8T&Juc`j_j zKL5u`@T06u$rT?>J^ zYMeUN0zMZz!WUqF%9orqLdFN;H_P^o4p{FYG4E&IK&+2O&<}m!iA~docps)(M?JbA z)+e!T{cSk=wkgA&^?>*BwsY70@TU*_v0we$$;=1!_n!DSv4R4VSurAcc%ckdLIWiD z>-f*}vB!U|I^exMW4&ebhPm~=CV@SST-j5Hjq5sqojqlZ1C+IEp2*&?Rr|-*)!v!= zsRr0j3;=&L&%Lk~#C+d1u{Okgvo_28947FBi#@?l6I|^Yp}o%YRS&A2jK(Hd8{oL; z1dS2nv7fdiG(ys2(w4Ctp72%P>i_L^>KE__%Afn;cRKI`Bv@r^+7 zwavUi?SY)sn508R8C@!0yi0BByn_u{!|;vUfj_o?>{Cz!+2t^u`O<*&NHZtZ33cd$$y z{8UFA2bS6nKSQFP^D$>fJ0!Nr*^kEPr>yP%UiF~tX@fQxEAVC954>SbDq0}Dl?vtZ zk0U96dro_v6?K%c3;SBX+P`v#7xv6}udJ0N%+&sstLjACxb{I8@Fy-*4XB-48c_Bw zIjqqDV*p9t6_PXeg*{2pg~)Tsuv z&B3)3<^>@WaYj`MT!1A6Cj<%gWwfuYCWT91W=Nx7Zuj z*fwR=0CPYR*QU(cNN?7RT?f#I4pYi8E0>-W3<%-rkQ zC#>LDZZL7~{v4yO9bf!52vcLieq%gveqIkg;D9*bcR~gJ&V!0&{(pAwD*N9_UipH* zmvfFEzOUgP#v9Mert|;X##h_Z*01~7_8kY@tH|To@+`281NndVodv=_K8X7;XWRUE zz8}Ww@j#uA2>bj44%i>U-*@;hC-ESggpG1yzioc;WAo&S3umA3C+|3bTjEL_&~M{C zW4`)@eSRRx2f!Wv>V6Nmw_)cK|MS{CZT?QoZ=!NE_`yF8#EE1vTka-yS6mmv`4X|* z9Cx^D3wKg~IETG6V0iNfY@ZL<_P%61(B>=%?l8}m!#=sOUVr}y>y7uS>syI4B>d&- zd_Z{8@x*>&tKFV%$N9y9iEaJ#$<`+i&idrQ6Z?EZ*e4Ia;5@K6z#p^^oY>F$$phE@ ztuQ?0c;P=K+~BGYyyf<;;jXQ717|t%UU}Xf{u6tAgZG)|XWww<8z%nhVm{oR{lP9C zgnQCG_D#Z^tll*#UlIrWtuXAxWpTy%3JfP+;mO~#+j)O-pn4p@iFi?+bYC%-SRfy) z4gcccos28ii388G;Po2-{~qoz4);4LFSJjf2Ux--f1m9?v0V4!fPTuh>Ff6xe&jXm zn*#@oE9T=s_D{kX?&W^jJ)aLhcq_1lHR(Fsllq3gx*XqiZPO2k4ff7(b;b(wa0v5> zY4M(v%b!KxIbMC@J?r)32Nby0Hs$0%@gNC*V@YShzWWS+GTdidb-y3azY}EBunPNR zZLrg4pCK$PwZq(RzS`qNc%M@Kub(ln4SV)37G(2yz&Gdv`*5F_YnyT3J-AK|z~1%T zBWP3f)ouO*RMJ};hyh@ zJG^m1oo|4N=o{~Lpek>{8S71N)_NU#4JqdgG!WrJv_SwGzd;fN&y?J<&`S5I?9hdLV ze)Y}%!(Mx1wSDnjSbpDcz+$=If?zGj$At>a)%*Ws=pzSU`^w}13@7&L`G0;wy!V@IXL{ts zUEl0J3Hy9JpE0lb0ENx>|2X8Evi%cZxEIe)4#3?#W8l2^150W%AFTi8%b(fU!(R~t z>;?SYl=IcsIG}xE5dLwb``Iaf@Trv-(^(vt2=_g~oi7Jv|m-A)c`r-`R*H#?p?|J-&hYQX! z!kW$I2jaq%a1Q_a;fFrXIEwRdX6qy#@B>|IbIk|ffNzJ`?!-7Qz#txIbG_|+eG3cY zPn0Vc47*d}0qk*rKYtB-?Q#^)Vsrk!i_h=dFS1l+CHAwvY1no@zW-zYY+sSr!F3jKLHqfwoNuR$Ilra0FLn=J{QvX?d^-H` z@Z9^c`|MvX$=2EQ_WLWhBk{oalXLQV>-gMffB4N`{LxRp`SXu{VoP;=m|TGG#Jsw8 z{D3jsVLJ<(hr71$XaBDIotS?4Am5*{H#oOHoVFhi{D#QihiUCypE7*4vwLT`>L>QD zVQ+5dlz#INpRKKL|DJN$zxeK24t47GUDy48rNjeyA|JtjC~^cCmjmSg+xLkR;z2eK z`}}@bC)qaa@d3a159e?EKIxk8hBNFHxQBo855MqZnB}1JMQ{NA**mNz#_kvEVHHPC++D*yto4Qe#9cky+ZV9;$2ryyZv1`U z#&^%yuMR&24~nVcx|m*k?;4NH={?y$+#5e74%lC?>-+$_hPhad2mS_R;;*mv;(X`5 zu=lia#I#R2Q;oac%E!rnUJF3*Em zaXs9Po5kGoTQPe(OrrKs}-e2SbA-s~IJao~COd*uP{v45C{yYn9V`mk4*qu|vn za(`#?;XWn2f9dCbXx~?Nk5q7j|CiTIyT9WA`=9YY?DhTbH-ByOAs^tIQg$XMzyWp+ zuS(dHXMV78UtEwIi0`oW{g$!WeQ^Nx+MPeh>tV;n{YE1{XP@lZUd{f-_pH`6i+=+g z{@E_vjAP&J>-aU8leOW;=>v=n`^|^{{?F|n*k^k}c_FMTlNapV-)eNuXB?c_eS44U zWcT>mV*hFHY`xg-Ubx4D6aPCNz*>wi?(3rs_ISbe|KlHieM>%I``IhU#sP6U-yYtt zaR9az*z)C{T4w=%cZYxW?w)$za!pKk{d#^j$!_2(Hd&v1PW-lKnR|V<%&$7@WcTpS z-qpjOEZ+GpfbW>t#1RKg!u!XLKTJvoa$<^B4Fd;M_- z_J8twAHMnCzx?Lz>pTGd>0ccO!~)pEIu4Ne1npr@X6s~oe04EFOtg<@uRZ5A9_W`% zv+J{Dw-YaGW>@hA-q}AHC&7u-8z1P*9}FFe2VkB_qb`pWN&?_M~6@1K5oFV1N_7M#9zCy&IFxJi7V$bK5@N#4{mriKToG8_O8VO zKHT~$;w#R|9l|^O`G8sA{R=CwBS z{?Fo)@w-kgPODot4B^YR;SGOvxQqSSJv{Zx_QT)!@Q3Fa>tU|l-vRLV-6#2&zx~S3 zzrhFi;}9E&tv7v9h7<@dv%9*xDF zlLOP<*qrke--W8n8LU~JU%@4MuQ>0Kb82U=`YSk;offm%uzzpfKES>J?qa{SSqG_z zJEV6t)?DWHOnI*NQRFlEeo|>K0C(5n9sc@{dFW~MuY`KyxYFF1T4jbFtq_r#ZV)k8uxtI^zc;vk* z+B_GJ=nWUm*IKPjF)tiRSZ4R9ox5h|alv(c;SXLfjoY}x)D*2Z~HvN$i7alP-YK74?Ay>Ii;K|UUi z>iL7y&bxo&FFx46!5hA?uT1>i;|s+3u+Q$Z`K0@DgYXZdWPG6i{ae90x8v*W=j2Xw zv3>XzzaRDg-S(Xg-%0a&21!?)L+$ylxp0V&U{mZBH`3=R!;YkDKAD|Q%x4`|=7nuz z&pErcKKnfDX?^B~yKD8QT=;u-yec;k6N>rpop!Ar2VkC`2!G?Uf4&3OFedqZa^eqD zyx{j=!~bdjt1lZ1=WzG#wI!X&`OQ!q-0xdH7xtHAC*q-ZhrM@K?s!m+Cteu0`BQFq z>DROJv*LET4IlFK*?h)b9LOh-=9Qlr+dIa|WNY`#&ZOHTWb;#6r`Tq^c}ZjW`LBNT zQ_r05#NRc%al<~~?mk{j`_J!B{P7~p#dT+We0=urUiZm={<~j&zI!^L&)&Z_*mqnrd~-uP>~TeVJ|Qj`LuWhB`_|{T&BKqa z<3RpCto5_MiwE|6_0KV?mkB6Gl8yFRWJeH8!JfO{2v zl;+W=vGxGv|DMf8_{V;i-~;$Uc{rRE*z)6XK$~m7d$=bzP{Lmw2lS^;Sbx0mhwqI4 z6Mxu#{BOUrF?JS+2jT%=FWwuA4>%|Oo%q8HHc8LTXTl;pChpbYPtV>xtnZ{b>83O2 z?3{egfAAn1<+s_JnC|Rm#`b-lx9-8ga~tz63A^n0U9$Ld&Q-khJU$5T{CiBe;r-;| zFeKvvUk+0_eLkO0fHz!b{ErvLz#P6Xgn2eyd%2x>!}j5>z@5xjz@I;{-ic4RXSetv zp3eN|RSsO(v9IEPF@8S7+}iaKE9iXU|5}}%=^l6N7vK(O+^mTE+W2{Pt-p6Pw)}AB zeD3R~zd6j=TwVL!0pHlZ{>{~V+7z58;UACq1o*)p_BfDj!=3HBuILAU@+|gBFwFkL z7N+o*6Xe&$5tw_P68`QRCoiB!YrZSq5f|LE7lZ$6xXgC_#AtY%Kiv6yMO#wcdBAJ- zKIc`pmN?+wPlE}(m5G^a`;&6cv){)PhT?IJd586XLHT^TpRw&kIaQTY!L== zfP^>upT0hu=M&=09XTr2#AHQ&w>IF`aM!welgpkFTER zcik`6$&>u8k^D=){#`<{Jv%@7bf9dEJ%t0_5<-IjHb+Hi`nLaUD6!<0;!GO z!auyvYirgQXB6Z4fb1Wh)r$enH~C`Nw>Oj@;DP=Moxm6NVVZy6oLGKAT+j#ho&oFn z>Z8B?2tB_ureAwHn6YcR7q^S&r|ce_aQ?NqwPzFM0dSlg2zzawBTk8<^zE!tnYi%* z^v&n0!z%l8-F|FxXL103`Rs5v-hAeQp*o4P6Yu7k9JA*AZx_cTPkHd;v~`zrJF3emz{L?4Edl2mFg?J^QS@Ukt#}usHLqY*#z{*|hicUVIP< zvoLq9STlQs?rSZ@y%8oGXOK$v?_PTV zWAi6dHs|((&9&qnyJ7%a4*%kR*RX~?|E$e@F@Q9V{o_h_pAx>>cD}dl9QN{ldjavl zp5K|U{E`mn^@(}@{@{Uicb;=+^Wj9-){iscbt~6%*n<2a>}MU1YNyM-1vVEOtay%k zz8}tToLFR!+II|D_6<*VZVhadpHSqI{G2-M`aVQIF+nkwfAfqub4t(DRvu)`_NPma z<_+8Mg{k^H17!F4hUx$94fN0c%j>iE_@EsZAqjweM;lKsu8x*5?~=gfE44 zu|JMzgJZTH=64bg#CnC@vwzQ{3+roLFXUzayKU8R*E_+7PRO&skIwRWJC^j`=Bs{5 zXQJL2x2=Ota7Vqf2YEJ3;olw*{&ZO3m(@LwU0RoQDBe*~#|g!?+yF;m6Q6K`PrwE5 zfP?X7%I0ma@Z!BLz3sKFHOv2Sg6{S^u6?NA7PJ-5#d~%y2T*7C{5w0Fc|Q)g#w%E| zVP*fm$LB9xU*iN0^;y8o|8`)~SY3#7fP_3!U_7EU;CY&HNRMVr`2 ze@gR`uI(Z9V>jm9XR1q2+c#diQ-^n$;{siwoEBu03?l--1IGBs+_M`TA zFf&)}^1jZ4Db!n%6caLVb@yS;~T^OHN5nJtNF?iCjREtjvsjUoDcSRaB#r- z$~mm1lF!~g_R@Jiz!+SG6`g1QVK*gg;mpUu&^W$JY@ipvEwEkvTo;?@nvYSu55L%+ z5jU+R{v`7O#Y}7SKE(jGF6U>*LNLPJ}<|^1+iiCXmNp5 z@(t$L-+C{8(z&%;M>wV9r1jzyfAPfU4y!dEe-8V`z9#8ROnHI-iT#>SAKbGBcHeyA zK6$WpzPMmcSXf6`tJ@cNS2)6$?K|r=zcaA>Qe&pfPvDjUQ_tgXiWlZK7f#GG2t4;Z zk{95>A8n$^9JT>b5OuY6~(ef{min$NvrJp5Q=Pjl4pi>@3XWru4mae$B5A zvv4zy{>Go!$74RC{|C|bTXNoOo#DwB@$Id5&SmYcN$>3adOq&*&G6$3*gn6V&4=TZ zIN`p0u)f;ldFH_%ST}}0zzN)Be=FT-P z9!=@}i#6qgVkSF;XStSV%EMf{Cw3ZV4f$-(tfcoaGq*U9uCw{AckjD+;GXpuYo009 zXE}3#bKhewF~>aNZLRqgZSJv^t&gE2?FZ}OiA90lZdJj5fe~+rTN{%#l4<|^C{y}zQp@@ z7xNhJS}_k@_Fj$iUVH$Y?y#R&s_*=L*}q(&oWFW=oMZSEe*Y!@Z~gxh|ABq$YwwcZ zhy$k-gSUUY$q&u%z3Gu&CjQmgb!E@B`tNaUW!Q`FeE1Cdq~Gw$*22uXJrn+u1AC3b zhnEA)xy)(4aBHq~a&o{mA7M>OYa(kS?G5h6il2No{7>wkG44p8CHyHSN~(6?0D9%yoyow$2dQu{hN}kCgMtx!^AM@&5TRwxI4^6g-?9fZHtL zFHW#~m?}6C?)8U#b+bMxZhn)#TF>O=_5o{t_J8_-a7$W~=M=ZM{Vy)>IhHIp^p128XJD@G{k(U13Ebdi z4`)BfAFvB+4R5+NmpSt}JBAM5rQO_jAzVvi%%X#Vu$ z9qHO$Fr39`HtZefjZeZ)?@SMJ6xbKr%t6mj%$BWg{IgkdaKJr!vxfLX!rnaQHYdGW z(^Gf!cNO!&-uF1xY0Rn1c`Z)d*=_Gk?i~EXpV{^aWA9E6`}ymBear9W{MD^n{h8m5 zaeMs50ldSRbmzV4BRy(om!0!Y+~J5DPd~A8{&Io(O^FA52F}_JQ6ZZg@xbVDII=_ugkZtIyM3<3RXd*VgWRAO7d<-x_;=Jn&3&r?WVa z!~=H8pL(V>;1ruQjxVn`zg4$hGJmVCKV2A)L)yaml<~kk-Zjj!r?7Odc^-OryHAAs z=J3*y^)^p)WS8bv%mcT*|6l%FU95+1F~58JeE*0Q`i1?T=i=k`^$QE{$dQ_z3IuTVC(j{7?H|&%`5pT>j!=|Bv5vJk#^Ce}3o1c=7#O=KjvtBJfbUo z)AhtY8^ASwiM_*;o%8ds%-_Rzmv24%z_k7P`Q9}BJUA)Od%Tmp1-{k+5BgWa!d|NL z;>q9UnSPb;kh`;Qc4qCpci7>P=kaenFCEeWjL4b$hxyhWovspwjTLwO4S<*+-|KwX z-md(Q9*pyDo)PEN!>`yK2hvmTA$H&GJItY&pKsc0U3@X#TPIRmkzyCcvuJATMr$<#~Q_n{r-(3*~5~( zC#+!*9>$3aY{9#hd$Aw)dUtEIUYv=CVp8$u`J7_NCFw>ygN1dbck{!%5)Vjovhm4* za0|O)n0MRH_MTViUByXr(3No$xA246w2kIS;;CG!dAx(7EuB~k-QgteI%nkrVCp@c ztFj|D*O`asXS-x}|KfeZ@dp3wKl_A}_qFccf6ukCf9n^m$+L}ryvqk$KfNEE%p*>S z(cVYSv2&~oQ+4sfJ+WOsePH)u{c9~d)+{@h2YN@kVt4Sx#q3_aQoe|%>4}cwJ{;{~ z%;|me0b!Qyo;g4^(>$biz!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSK$uZf!>a)(sNw127$R{w`2gEL zX2bvO|NqEyOyXd<*y{P{daGvlZJC-~1+$x(BqSKJT)nr>Jt=Gk)WhKE>gTe~DWM4f D#qchm literal 0 HcmV?d00001 diff --git a/dices40/dice1.png b/dices40/dice1.png new file mode 100644 index 0000000000000000000000000000000000000000..45f569d21c1ec20fa60585e979264ceeadaecf1d GIT binary patch literal 143 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSK$uZf!>a)(DCFtl7$R{wd4cT@ ge!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSL74G){)!Z!ps1&dV~E7%?gQg5(zkJ$iu@>bdmp~XZcYjpaKR@S3j3^P6!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSK$uZf!>a)(DBzWWJDKV`I?w6@S_3FFgaOhQZU-&t;ucLK6V9jwTQQ literal 0 HcmV?d00001 diff --git a/dices40/dice4.png b/dices40/dice4.png new file mode 100644 index 0000000000000000000000000000000000000000..433e6d6c81414cd5d95671f646a07f5414b480e9 GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSL74G){)!Z!ps1&dV~E7%?gEk@UD0y$HvC+WRv{Ezx%WI02MHJy85}Sb4q9e0GeSaWB>pF literal 0 HcmV?d00001 diff --git a/dices40/dice5.png b/dices40/dice5.png new file mode 100644 index 0000000000000000000000000000000000000000..13d1a8abf5415d262d842f98a1624d9ba2cadce3 GIT binary patch literal 149 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSL74G){)!Z!poFK3V~E7%?gDpH2+tbWKzP<%*?P*PyJ@6=#9rfH4L7velF{r5}E)65hzjs literal 0 HcmV?d00001 diff --git a/dices40/dice6.png b/dices40/dice6.png new file mode 100644 index 0000000000000000000000000000000000000000..c96665f7df3f6bd6581146e3e2cc1c1569b70088 GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSL74G){)!Z!ps=TlV~E7%?gFfwOI1-FoZ4Azu2lBBMy{i@O1TaS?83{1OOusB{l#6 literal 0 HcmV?d00001 diff --git a/dices40/dice7.png b/dices40/dice7.png new file mode 100644 index 0000000000000000000000000000000000000000..13e24118df6dc5247140a6dc39b44cb70af34b3e GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSL74G){)!Z!ptPrpV~E7%?gDp%>FFDrXga|vUiCI3=G0@<|qHE-URAlVDNPHb6Mw<&;$UlJ}U13 literal 0 HcmV?d00001 diff --git a/dices40/dice8.png b/dices40/dice8.png new file mode 100644 index 0000000000000000000000000000000000000000..b81fd3284bdfefac08d6dc4f0d34f5e78cc10ef8 GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSL74G){)!Z!ptPrpV~E7%!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSL74G){)!Z!ptz@tV~E7%fuV=pedkPpMt`6Z22WQ%mvv4FO#tLWC&&N* literal 0 HcmV?d00001 diff --git a/dices48/dice0.png b/dices48/dice0.png new file mode 100644 index 0000000000000000000000000000000000000000..9013904ed86303802938e4717a00994c33a07dfa GIT binary patch literal 175 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBugD~Uq{1qucK_gEW#}JM4$p;vJ z*e3*>ssCYrLteqb&>$fof>-$zn@-z7&6KH2Za7>pSR=w`e36lvnZZEBeFVdQ&MBb@0D==L@c;k- literal 0 HcmV?d00001 diff --git a/dices48/dice6.png b/dices48/dice6.png new file mode 100644 index 0000000000000000000000000000000000000000..8037204b1b80182c4b423985c8e7a2f8ce40d361 GIT binary patch literal 149 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBugD~Uq{1qucK?zS6#}JM4$qI4? m{}U57*gII6HsvHFFfatZ)W4Xxa>+TM8U{~SKbLh*2~7Zc0Vyc} literal 0 HcmV?d00001 diff --git a/dices48/dice7.png b/dices48/dice7.png new file mode 100644 index 0000000000000000000000000000000000000000..4016c5522de66cde82fc75e9036d73c80de9d3e4 GIT binary patch literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBugD~Uq{1qucK?P42#}JM4$qI4? u{}U57*gIIccJcm^Kk&<+nLNwG5uFelF{r5}E+n$Sa}% literal 0 HcmV?d00001 diff --git a/dices48/dice8.png b/dices48/dice8.png new file mode 100644 index 0000000000000000000000000000000000000000..803daa7dc4144ee4b587acabc02717aaeb74468b GIT binary patch literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBugD~Uq{1qucK?P42#}JM4$qI4? v{~!KOsBb9g5|NgWIPlA330tqcgapHZ@Ae191iteC)iQXx`njxgN@xNA{P-+# literal 0 HcmV?d00001 diff --git a/dices48/dice9.png b/dices48/dice9.png new file mode 100644 index 0000000000000000000000000000000000000000..3fba13c88e4b21c0e2162548385bbc891c2dc05a GIT binary patch literal 149 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBugD~Uq{1qucK?zS6#}JM4$qI4? n{~!KOsBb9AV!3(X00YC1I`^H)wm-iE)i8Lv`njxgN@xNA#FH!L literal 0 HcmV?d00001 diff --git a/figures40/arrow.png b/figures40/arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..4b1a21686f15f80c25a67f0cac21f5b9d5646bc0 GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+K$tP>S|=w^(9zSyF+}2W@&R6z zf(d38C#+mF` Zb@Gj-{-wqr>w$(bc)I$ztaD0e0stxrKuQ1r literal 0 HcmV?d00001 diff --git a/figures40/bishop.png b/figures40/bishop.png new file mode 100644 index 0000000000000000000000000000000000000000..54af7099ba4d14f24ea65ce7b61525d200474dce GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSK$uZf!>a)(=-}z%7$R{w`2erV z1P^JIO?;hy`V}Pqn;-Ce_MiQM$|j3VRU*YX1rthNJaayi0yNI!6Ofqn=fAvmC$E74 a1H+~rsw+G`TJ8m!#o+1c=d#Wzp$Pyqh&&1a literal 0 HcmV?d00001 diff --git a/figures40/cannon.png b/figures40/cannon.png new file mode 100644 index 0000000000000000000000000000000000000000..e4d1c71edd606eec27fbb25602c5f9d82330c34d GIT binary patch literal 207 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+L6~vJ#O${~!5~i;#}J9j$p?7< zHFG@s&+9Ph|9?h>Od#R$<3IZZgN{e;N{UJXkt@79^g1{NE_bL)9^5tKpxOp!U*?%Q u|Npb!_+#&|>ED0*4b}gWRW~xSu`!(OcFx;pt<(xMox#)9&t;ucLK6Uw_e8P) literal 0 HcmV?d00001 diff --git a/figures40/checker.png b/figures40/checker.png new file mode 100644 index 0000000000000000000000000000000000000000..a24619b509e48d92929fa4af32cb63cf4f522247 GIT binary patch literal 238 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+L6~vJ#O${~!9q_L#}J9jrG18c z4GID*(*pwT@qbaaJ9Fy6d5=FFvbsy}?%X6MRyEz{0biN;e$l-XPHJb~J9*Q;D3MuP zZPVd~fQd#)HWbx$bkFKp8~5sZz=T;-o+=$b9_u;9i*st& d$^BeA7_NBOp6~QHu?=WBgQu&X%Q~loCIC8ORuKRI literal 0 HcmV?d00001 diff --git a/figures40/dragon.png b/figures40/dragon.png new file mode 100644 index 0000000000000000000000000000000000000000..d3595e757263f53e6fa7c5c121e0cf859be1e6db GIT binary patch literal 243 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSK$uZf!>a)(Smx>C7$R}G^z3fl zW(NV+i|rgf4H4}rTOKe?$mrzyQIgi_cEW>`Q%A1cGe^bdAZM9d`PceWmw#>feKFqq z_~Kh1SA3V7e^%+BqvpP^2O=56TaR-4%`5oQQ4%J4L+ki-qncw!9CTF`gpApkf}Zk9 h*RQj`S7CmM@%#;!e)azwflgsy@O1TaS?83{1OVJYRGt6; literal 0 HcmV?d00001 diff --git a/figures40/draught.png b/figures40/draught.png new file mode 100644 index 0000000000000000000000000000000000000000..e89ac6dd821df179b5d403d3e0020ca189827595 GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+L6~vJ#O${~!E{d-#}J9jrG2}3 z8w_|{_yd=G;gD2a%xdPGB!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+L6~vJ#O${~!3s|o#}J9jrDqNK znhkhZFZ3H3l$|~1y5?I_sK>H-T$(|8PW}OA5(4urLRuBSeo*-xZT4@vuGdA;%8PSX zZr!D|s8^U*<4>i}yH97zHl>^uXjC((nBgIOvCg7@$HY1NmdKI;Vst0NI3Bm;e9( literal 0 HcmV?d00001 diff --git a/figures40/horse.png b/figures40/horse.png new file mode 100644 index 0000000000000000000000000000000000000000..e09aeeb2ba54800afe12576a5ad25e9e1a0cab0a GIT binary patch literal 205 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSL74G){)!Z!V1TEKV~E7%^5j|BlKt|H~in`uG3;{KiH>4>JbVf6T2n8lNz;)hYaBW6GwA4#_wYTGgkFRw-_gH!^eb{5NAt0u3QP9$iiEMl#wwDgLOjP21 wBjUWI(R{Ab-OyhudiTHcN8H~jFCTk^G0#i5)aiOcE6{ibPgg&ebxsLQ0Bepy+yDRo literal 0 HcmV?d00001 diff --git a/figures40/pawn.png b/figures40/pawn.png new file mode 100644 index 0000000000000000000000000000000000000000..9e85cfa61e944870f75e1e7c68c27c7f4bf56518 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSK$uZf!>a)(=;i6+7$R{w`2g>$ z15fG&4*uBB=wbBVolr*<{an^LB{Ts5tpip+ literal 0 HcmV?d00001 diff --git a/figures40/rook.png b/figures40/rook.png new file mode 100644 index 0000000000000000000000000000000000000000..5527877cbe414eb5402a95b023ed3b8bff466eb4 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+K$tP>S|=w^(8|-rF+}2W@&VQ# zxB2b=IB@;^|Gz#*#rg05dWXkv{{Ls3^yz!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DjSK$uZf!>a)(80+cc7$R{w`2cH$ zgo*@@#E-@&>}=nd&Cc*k+_1m#!9F43UvPRogO}02|Nr+hdKoczvPoqA|IaVQDVEMQ zi5;w7gH!O}dTuAB+pTZdI#w&_wd@dkRJ5j{k&!{wB5-2fkFsc>MGT&*~f^nWMjv*T7m-cSt zZ7|?rY1RlzYw4ME@lZz3A&w~`8sa~{>UwnK`%SC;_hnwG_$S3F!7HX;$Xm$I$i$tq z(6K|(Nk<^5RY1DsMxw{$7bmUbZ+#a3U()=$?$F!$AE!)FOHj%ZT~s3P3$%&B)78&q Iol`;+0C-DE^#A|> literal 0 HcmV?d00001 diff --git a/figures48/cannon.png b/figures48/cannon.png new file mode 100644 index 0000000000000000000000000000000000000000..35198a85f70fd31076ee9aae76f8ea870f8d0cf2 GIT binary patch literal 241 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBuf-vKbiP>*~f+e0Vjv*T7TQ6+n zZBP(ky;M1& literal 0 HcmV?d00001 diff --git a/figures48/king.png b/figures48/king.png new file mode 100644 index 0000000000000000000000000000000000000000..2d9ebd093f188ed67ece551a7c021beec7d82746 GIT binary patch literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBuf-vKbiP>*~f~B4=jv*T7=bqch z+n^xO`p{VH)?DTpJKCn|r7e=)Atb$nNqNr3jRrRIN5U5WJ1fq_exms1loPRwK5%ZG z9+IV+c{R&uMXAb)-aQgoGgOZ6Ipo=x+APj$yl%#Gxni4>KYBTiyDLnPv+!Vk^Kqxe ix8~R9&fifjV!HLK_>x4}qDr6x7(8A5T-G@yGywoh`d7OE literal 0 HcmV?d00001 diff --git a/figures48/knight.png b/figures48/knight.png new file mode 100644 index 0000000000000000000000000000000000000000..574234cbcd955fe4c106b526a96a4440502e8c9a GIT binary patch literal 234 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBufG}g$wN6f;V6LZ&V~EE2x#xBZ zHYkX=1WGVFdu|p76|1o&P)TbJmfw3F7lq*!T>Kx)_q0 zTnz&Znwk<0?(u%=cks_Ao%xp@o=#jEcE@+6@{~la$)cud+4(NgD?hF{J^5q%_NRAP YH?2wA$G+Rb6KFAmr>mdKI;Vst02p{s$^ZZW literal 0 HcmV?d00001 diff --git a/figures48/pawn.png b/figures48/pawn.png new file mode 100644 index 0000000000000000000000000000000000000000..b2e54f8e8bbf311834b3387fa55d3f311a3099a0 GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBufG}g$wN6f;pr@ycV~EE2>D(H$|s!q$3J7$e|I_7t9+(B^DqAY-|TVh|9|NQk+>#}JM4Q_mT4 z9X8-$4G`s*t8MP5GPj;$( zyF=xwr=FG1r0Xtu)AoqA?o>LwV1A$PgGImXUbSwtTjp@h`1lorHJrVdC#AlT-jX)+ z#o651=jE*){5&dJp&|Ytj+-fJf=<9|sf2v~3xWsU-Ir;7!D{W_6n@XjWgpOO44$rj JF6*2UngAS^W6l5o literal 0 HcmV?d00001 diff --git a/figures48/rook.png b/figures48/rook.png new file mode 100644 index 0000000000000000000000000000000000000000..02f9733e6ec09b35b9eb37b0980a8a6ae18cb4d0 GIT binary patch literal 186 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBuf-vKbiP>*~g0`M6jv*T7lMk@Z zu>Z61xxEA1S9y*T3nV1|{b!H%(K`C$e?9Ywy#mfR{{OFMSn>mCphE*wq&HtHw*k;S Yhr(Kpe-N3xA7~JRr>mdKI;Vst0R3J)+5i9m literal 0 HcmV?d00001 diff --git a/letters40/0.png b/letters40/0.png new file mode 100644 index 0000000000000000000000000000000000000000..35a3fcaac3aa95658a9ef9a7f2bed8402dcec045 GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+K$tP>S|=w^(8ANjF+}2W@&VQv zK*jY9jj|qg2@lvO$tOHvWJ^=HdEfwtO5-cGmX;fQg`AUaE39kXA)}p;z`$@t&T?hl Sf4zL584RATelF{r5}E*DKsIgw literal 0 HcmV?d00001 diff --git a/letters40/1.png b/letters40/1.png new file mode 100644 index 0000000000000000000000000000000000000000..0f4642c2e7a955b186b1f1c73ae2c294c23839aa GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+L6~vJ#O${~K_5>S#}J9j$p?6| z4m^<;ILM(k^PtLaIf0Y;%t}uWEa9E8hGDY2gUVxOfs-{1E}P67JnGm4PO__29#CPQ ok+NXM6QC9U*>zOH4jf=$XbO_uS;oU)4m6j+)78&qol`;+0P~DJu>b%7 literal 0 HcmV?d00001 diff --git a/letters40/2.png b/letters40/2.png new file mode 100644 index 0000000000000000000000000000000000000000..5b24a577dce1ed9c86669db2d50937e2775b64c6 GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+K$tP>S|=w^P}$SPF+}2W@&VQ# xK*j$VxjC7hOxkhgN&5{Cxz6KrB^nwT84~YU9$)G literal 0 HcmV?d00001 diff --git a/letters40/3.png b/letters40/3.png new file mode 100644 index 0000000000000000000000000000000000000000..b02700eae49ca4f20a8bd9e6f6ecc385d58d8764 GIT binary patch literal 182 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+L6~vJ#O${~K}$~;#}J9j$p=_} z02S9W_}DQ_mS3PEV9@O8W^mGh!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DkxL735kHCP2GDCgwnUq`vD;V>sFK0c)z4*}Q$iB}-47`# literal 0 HcmV?d00001 diff --git a/letters40/5.png b/letters40/5.png new file mode 100644 index 0000000000000000000000000000000000000000..2800ea7e4c882422e961562a59b8b10ed9a73fc9 GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+L6~vJ#O${~K_yQY#}J9j$p=_} w02Tjdl;)hM+J7WbjbnoMBV%D^0|N$z`gF_Vio&OpfvOoiUHx3vIVCg!0PDvrJOBUy literal 0 HcmV?d00001 diff --git a/letters40/6.png b/letters40/6.png new file mode 100644 index 0000000000000000000000000000000000000000..29d29e9e0e27053679ffbab8824c3a3843786bc6 GIT binary patch literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+L6~vJ#O${~K?P42#}J9j$p=_} t02Tjdl;)hM+J7Wj?WPK!@kS;#HimWXR!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+K$tP>S|=w^P~X$VF+}2W@&VQ# zK*j$Vxj9*S_#IR}GYXu%#}LMIO^IDC_dp8k3>k-~5sb{t3~N`&$$!07u@k73!PC{x JWt~$(696A}Ft-2z literal 0 HcmV?d00001 diff --git a/letters40/8.png b/letters40/8.png new file mode 100644 index 0000000000000000000000000000000000000000..c1040eb4b6d461df1ebaa56281ac03b8ab09797e GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+L6~vJ#O${~K|4FwRgWtEd-jx;OXk;vd$@?2>{@nIG+Fj literal 0 HcmV?d00001 diff --git a/letters40/9.png b/letters40/9.png new file mode 100644 index 0000000000000000000000000000000000000000..19f4b562691f3668e499d6000264c82f022ab422 GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+L6~vJ#O${~L1j-D#}J9j$p=_} x02Tjdl;)hGJo`wZ8gs-n8=?6#B^nwT8KMt5t3P|<*9}z8;OXk;vd$@?2>?52E=~Xd literal 0 HcmV?d00001 diff --git a/letters40/A.png b/letters40/A.png new file mode 100644 index 0000000000000000000000000000000000000000..061afc564c08f23d774594c32a119b3d17f31a20 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DkxL735kHCP2GXzJgTe~DWM4fFHtf@ literal 0 HcmV?d00001 diff --git a/letters40/B.png b/letters40/B.png new file mode 100644 index 0000000000000000000000000000000000000000..4c8fb279815453d431e347b34e4ea3032bcafae7 GIT binary patch literal 179 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DkxL735kHCP2GXy)nS7$R{w`2gz= zpyGN4A3KK0@(C);%*HcPSSIthOz0_yEx63LV3z-`nH)klb3L9Vv-0pTNIN^7Y%_dc Q3p9bj)78&qol`;+03!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DkxL735kHCP2GsPF0G7$R{w`2gz- zpyL0Hjj}$Ulqa)0Z2H5SFe$OYqvNf>bcLO~kD@wGZ)9R)V_1DbdEug)*L#6l89ZJ6 KT-G@yGywo}K{P7> literal 0 HcmV?d00001 diff --git a/letters40/D.png b/letters40/D.png new file mode 100644 index 0000000000000000000000000000000000000000..d00b9f495f31855996a3230cf395a06bb2dbbcad GIT binary patch literal 172 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DkxL735kHCP2GsPF0G7$R{w`2gz= zpyGN4A3KK0@(C);%*HcPSSIr@yBHmcZF*z2Bbz_ry9hHg!;bmpfjtEiL0TC+UHx3v IIVCg!0H(q&bN~PV literal 0 HcmV?d00001 diff --git a/letters40/E.png b/letters40/E.png new file mode 100644 index 0000000000000000000000000000000000000000..f28d7bb0778cd1f9de67725520101921f011fa59 GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DkxL735kHCP2GsO;(D7$R{w`2gz= wpyL0G(wq}j`~UoBxAvSk^TypyQ3C@825(JGQ-0Ozopr0M~OYC;$Ke literal 0 HcmV?d00001 diff --git a/letters40/F.png b/letters40/F.png new file mode 100644 index 0000000000000000000000000000000000000000..8fffbec90d73a5bc148807b0004f342ca8a68080 GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DkxL735kHCP2GsO0J57$R{w`2gz= vpyL0G(wq}j`~UoBxAyFuY2mS^p^=e6)>^XhvXAyoplSwBS3j3^P6!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DkxL735kHCP2GsOstB7$R{w`2gz= ypyL0G(wq}jCqH4I-Qa0tFv0gxfqK}113<0+j20fA7gPw;z~JfX=d#Wzp$Py$xGpRJ literal 0 HcmV?d00001 diff --git a/letters40/H.png b/letters40/H.png new file mode 100644 index 0000000000000000000000000000000000000000..c2df4f01fcdaeb25d8e24366a191469eeb120612 GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DkxL735kHCP2GDC6nk7$R{w`2g#W o#vjaEPXcu$t7ayMhaETo)M%r9HQ{5nC{P`Pr>mdKI;Vst0H--BbpQYW literal 0 HcmV?d00001 diff --git a/letters40/I.png b/letters40/I.png new file mode 100644 index 0000000000000000000000000000000000000000..7288a78f5e052be7da3bca709c3f819d0c5b43e8 GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0vp^8X(Nb3?#Q1Xz2kd#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=Dh+K$tP>S|=w^P}!lvI6;R0X`wF|Ns97GD8ntt^-n>1s;*b3=DkxL735kHCP2GsN?D47$R{w`2f3J zz|1Gh#cm!rz@fr#V8DD5sQ0i(nZnP8MoAC31Md{s*ce2-v_I#X+64ghF?hQAxvX*~f)1W8jv*T7lMk>< z{AYG#W;X7yI&gq*k(|MY<`w)rf7m4?W;BK{2S`p}(v*KCaz#6!-*FG;R}&MC1&mF? b20$l8vU|+E9k}ch&@2W|S3j3^P6*~f?=L6jv*T7_a5EI z+2A0+a-devg88G>1vi%4LOv|g)f)s4vdQTUxxn6rJfi^IBy85}Sb4q9e07@!E Am;e9( literal 0 HcmV?d00001 diff --git a/letters48/2.png b/letters48/2.png new file mode 100644 index 0000000000000000000000000000000000000000..f92d8a05844332259936731410f9d03d782f922a GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sEXgD|57Yp@DXP}$SPF+}5h@&WcA y|CtZ6zY&qRFy&CXwf&VwlO-HKWu+4m7#IxCd2avl%j6zVIfJLGpUXO@geCxB94*~f{vapjv*T7lMk@} z_|NRf++xMBP|jfme?ny%$5D=j5-Xe>d6VlHlpL=$tz;8<#V|?e){TFR&wNw-zopr057m9M*si- literal 0 HcmV?d00001 diff --git a/letters48/5.png b/letters48/5.png new file mode 100644 index 0000000000000000000000000000000000000000..b22c028b85f914c67207208f9d473b3eeff7d4a6 GIT binary patch literal 158 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBufG}g$wN6f;prWUXV~EE2m;e9( literal 0 HcmV?d00001 diff --git a/letters48/6.png b/letters48/6.png new file mode 100644 index 0000000000000000000000000000000000000000..b5a925572c34f7cd54f8e7dbb81c3b4b93147dc3 GIT binary patch literal 157 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBufG}g$wN6f;pn|81V~EE2MM}| literal 0 HcmV?d00001 diff --git a/letters48/7.png b/letters48/7.png new file mode 100644 index 0000000000000000000000000000000000000000..7e15dd6b5b3994c51515c6ed0fe7c28dbb5f3e7b GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sEXgD|57Yp@DXP|wrFF+}5h@&WcA z|CtZ6zY*auuww{5!+t=dn%PCzWxY(xrp5qKfvg!BhdCuA7|trHiR)OHd(S54(iKjK&b=0LckVn#<=jNgU%d`o(xAYK8KJJ4}I2 o+_w|unk$4~Wrl2jz{11BknI*(*mZpc&;kYqPgg&ebxsLQ0Dl%cs{jB1 literal 0 HcmV?d00001 diff --git a/letters48/9.png b/letters48/9.png new file mode 100644 index 0000000000000000000000000000000000000000..b92377d259f66a628d9a477fa10b4a9922519003 GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBufG}g$wN6f;pt7fnV~EE2(S54(iKjK&b=0LckVn#;{tw{mE^a{umFR=~u@#_-3} VLpyx3yAjY722WQ%mvv4FO#mceF;V~k literal 0 HcmV?d00001 diff --git a/letters48/B.png b/letters48/B.png new file mode 100644 index 0000000000000000000000000000000000000000..def2c1b8f33b72f2bedb963870caa51a95366331 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBugD~Uq{1qucK|4l%`BnRi7m@XAR2&A!8Yq7833x8H#S a3=CzuAwRjFK79%_iNVv=&t;ucLK6V%**Hl6 literal 0 HcmV?d00001 diff --git a/letters48/C.png b/letters48/C.png new file mode 100644 index 0000000000000000000000000000000000000000..c7d5103411dcf35229f85e266fc3002536c81951 GIT binary patch literal 175 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBugD~Uq{1qucK_gEW#}JM4$p_da z{xctBXG`Na%D3>x!Yhm$g#NK{95vw4SP{NJ&iSK>3C9A)CSe1hBQCmWf6W(-YX<6O N@O1TaS?83{1OPvHF`NJZ literal 0 HcmV?d00001 diff --git a/letters48/D.png b/letters48/D.png new file mode 100644 index 0000000000000000000000000000000000000000..c381257739bf006a831de91893725c7fddec0a29 GIT binary patch literal 176 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBugD~Uq{1qucL1RxB#}JM4$p_ef z{AYG#Zn0umDCe+(pXZN5Wg5p(j)f9!j7K{@NL-oiG0%>HTVPH@BO}ATVz)$#j5(Kq P+8I1u{an^LB{Ts5ks~v4 literal 0 HcmV?d00001 diff --git a/letters48/E.png b/letters48/E.png new file mode 100644 index 0000000000000000000000000000000000000000..bb42355ac0ef8dba9c01f04d28c8faf1682b400d GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBugD~Uq{1qucL1j-D#}JM4$p_ef y{AWJME+Z1c$-DCZfBpwcUL;!k?SIU|!^1Ek$z-D|w=z&Q1B0ilpUXO@geCxy`7JvD literal 0 HcmV?d00001 diff --git a/letters48/F.png b/letters48/F.png new file mode 100644 index 0000000000000000000000000000000000000000..eeae55a882e4fd51a518bacaa6b80585cb466a85 GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBufiR<}hF1enP}$SPF+}5h@&WcA y|CtZ6%ZP+<@~-^228Ot;ii|FbEB*kLGkCiCxvX*~f-0Uajv*T7lMk@} y_|JThT}C8?(^qqaYlJ2n+pVCAKYhXmKx-{*oF?Admi8E^p25@A&t;ucLK6U%;w>it literal 0 HcmV?d00001 diff --git a/letters48/H.png b/letters48/H.png new file mode 100644 index 0000000000000000000000000000000000000000..cf090c78f58c6e2bfbfb6eff0c71f5338159350d GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBufiR<}hF1enP{z~6F+}5h@&WcA pjz`)V7yn~s)XQ>+Z4)*CTIY7c{N%o`F={|{44$rjF6*2UngH#^DIx#> literal 0 HcmV?d00001 diff --git a/letters48/I.png b/letters48/I.png new file mode 100644 index 0000000000000000000000000000000000000000..a70d8508ca138016f9918d6282d5a969ecaf62bb GIT binary patch literal 155 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBufiR<}hF1enP|nlEF+}5h@&WE2 rK*bH+NeOlgVa73gTe~DWM4fdqgU* literal 0 HcmV?d00001 diff --git a/letters48/J.png b/letters48/J.png new file mode 100644 index 0000000000000000000000000000000000000000..7f96fc7564608942af15124a542417348289bcba GIT binary patch literal 176 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDH3?y^UWFG-ijKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCils0(?ST|Ns9FWQHEPTnD5$3p^r=85sBufiR<}hF1en(Ad+(F+}5hvI2)4 z4`0{(Zz0Ug%*qq24jeeZv*aK1L3Xw>fv*jXk}k3d2`quUJQj@1%nY5A%=!BYJf;G* OGkCiCxvX&U>c zv7h@-A}f&37T^=&`v3obAT#vPO>_%)r2R7=#&*=dVZs3W|BUIEF}EPF|6p l@T0!rAp;u|*EMqnhMNocYV9{%l?SR|@O1TaS?83{1OQx1D4GBO literal 0 HcmV?d00001 diff --git a/numbers10/1.png b/numbers10/1.png new file mode 100644 index 0000000000000000000000000000000000000000..946df70972dc24465a1830d371a30a4fb8859335 GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2xGmzZ=C-xtZVk{1FcVbv~PUa<$!;&U>c zv7h@-A}f&37T^=&`v3obAT#vPO>_%)r2R7=#&*=dVZs3MzZLIEF}EPJWP> zFd;EvLt?^-!~~1O2QD0D5Mo^PpIzdgJOhK#ch>zs?O9uZ${9Re{an^LB{Ts5;HEDs literal 0 HcmV?d00001 diff --git a/numbers10/2.png b/numbers10/2.png new file mode 100644 index 0000000000000000000000000000000000000000..700a46edecf087e07ab08c3c235cd5484767ed4f GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2xGmzZ=C-xtZVk{1FcVbv~PUa<$!;&U>c zv7h@-A}f&37T^=&3Z(!4|G)I+{JTIFXMsm#F#`kNVGw3Kp1&dmC@AXb;us=vIk}+Cnm`$02MHJy85}Sb4q9e03$ml>i_@% literal 0 HcmV?d00001 diff --git a/numbers10/3.png b/numbers10/3.png new file mode 100644 index 0000000000000000000000000000000000000000..85f590cf197a8f476f56293c3526de3ad3bab476 GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2ZGmxy8xzq=w7>k44ofy`glX(f`u%tWsIx;Y9 z?C1WI$O`1M1^9%x0_p$%|1Z5c|1OZlS>O>_%)r2R2!t6$HM|;tg3_KYjv*44lNlJ@ p*f<1Om{>T4+9z@pS|lW}FlZJrMl!p7pAA&T;OXk;vd$@?2>|1zBX$4) literal 0 HcmV?d00001 diff --git a/numbers10/4.png b/numbers10/4.png new file mode 100644 index 0000000000000000000000000000000000000000..cec025e623f0e1ec43774b5ff1427de413ae2378 GIT binary patch literal 143 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2xGmzZ=C-xtZVk{1FcVbv~PUa<$!;&U>c zv7h@-A}f&37T^=&3Z(!4|G)I+{JTIFXMsm#F#`kNVGw3Kp1&dmC@AFV;us=vIeA06 hg9677e&_#^3`R;UKkb(WJq5}#c)I$ztaD0e0sy^RCm;X- literal 0 HcmV?d00001 diff --git a/numbers10/5.png b/numbers10/5.png new file mode 100644 index 0000000000000000000000000000000000000000..0c615ef5bc58fcfea0753b54144cd2ab041e8412 GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2xGmzZ=C-xtZVk{1FcVbv~PUa<$!;&U>c zv7h@-A}f&37T^=&3Z(!4|G)I+{JTIFXMsm#F#`kNVGw3Kp1&dmC@AXb;us=vIk|!1 kH?sl@&U>c zv7h@-A}f&37T^=&3Z(!4|G)I+{JTIFXMsm#F#`kNVGw3Kp1&dmC@AXb;us=vIk|!1 kH?smuYO|n#fdK=9o&r&U>c zv7h@-A}f&37T^=&3Z(!4|G)I+{JTIFXMsm#F#`kNVGw3Kp1&dmD5&h|;us=vIk};s yo`&U>c zv7h@-A}f&37T^=&`v3obAT#vPO>_%)r2R7=#&*=dVZs3QBppIEF}EPF|6p p@T0!rA%g_tO$U}lX4coz45u1-t54lCWdf>V@O1TaS?83{1ONwIDenLP literal 0 HcmV?d00001 diff --git a/numbers10/9.png b/numbers10/9.png new file mode 100644 index 0000000000000000000000000000000000000000..58fc35a84572920364006270078de2447a82002e GIT binary patch literal 145 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2xGmzZ=C-xtZVk{1FcVbv~PUa<$!;&U>c zv7h@-A}f&37T^=&3Z(!4|G)I+{JTIFXMsm#F#`kNVGw3Kp1&dmC@A9T;us=vIk|zM j+Muc7e*y~&4-bRv0;XDtZ~qSf&U>c zv7h@-A}f&37T^=&`v3obAT#vPO>_%)r2R2!t6$HM|;tf)buCjv*44lUL*? n{HSku$iVa0zTttK1p~u&U>c zv7h@-A}f&37T^=&3Z(!4|G)I+{JTIFXMsm#F#`kNArNL1)$nQn3QBmoIEF}EPEIID mU|^~?VA?2~ki*8t#?B!7fbnli>+vT*H4L7velF{r5}E)&U>c zv7h@-A}f&37T^=&`v3obAT#vPO>_%)r2R2!t6$HM|;tg5sVojv*44lULXu m`0$_MFe6(Di^v*#28Q_yxN5(2m!1YHVeoYIb6Mw<&;$Td<0xeS literal 0 HcmV?d00001 diff --git a/numbers10/D.png b/numbers10/D.png new file mode 100644 index 0000000000000000000000000000000000000000..c0ead759747259aeee94602d99841a057c15d7aa GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2xGmzZ=C-xtZVk{1FcVbv~PUa<$!;&U>c zv7h@-A}f&37T^=&3Z(!4|G)I+{JTIFXMsm#F#`kNArNL1)$nQn3JQC=IEF}EPEIID hU|_1|VPWCnV~}%X{H=HEEE7&U>c zv7h@-A}f&37T^=&3Z(!4|G)I+{JTIFXMsm#F#`kNArNL1)$nQn3W|BUIEF}EPHtfM j&8%>Q!7ady83-5x7O>Wa7%xf&s$lSR^>bP0l+XkK?Exgx literal 0 HcmV?d00001 diff --git a/numbers10/F.png b/numbers10/F.png new file mode 100644 index 0000000000000000000000000000000000000000..1931c22fef0fb814412d740d7c0ea547a0dde875 GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2xGmzZ=C-xtZVk{1FcVbv~PUa<$!;&U>c zv7h@-A}f&37T^=&3Z(!4|G)I+{JTIFXMsm#F#`kNArNL1)$nQn3W|EVIEF}EPHtfM k&8%>Q!R?ztN<9NZm?V4kq2rsxfC?BqUHx3vIVCg!0QBxAi~s-t literal 0 HcmV?d00001 diff --git a/numbers10/G.png b/numbers10/G.png new file mode 100644 index 0000000000000000000000000000000000000000..7e1762a8b9ad75f22a5eb1deaa536c1da3c521c9 GIT binary patch literal 148 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2xGmzZ=C-xtZVk{1FcVbv~PUa<$!;&U>c zv7h@-A}f&37T^=&3Z(!4|G)I+{JTIFXMsm#F#`kNArNL1)$nQn3W|HWIEF}EPHtfM m&8(1ekiqF&0t*Wd4}-}IrnjdP7rX;1VeoYIb6Mw<&;$TT*C*Qm literal 0 HcmV?d00001 diff --git a/numbers10/H.png b/numbers10/H.png new file mode 100644 index 0000000000000000000000000000000000000000..04fe71c56b28afd37a6aad6d44569bf812b131b6 GIT binary patch literal 142 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2xGmzZ=C-xtZVk{1FcVbv~PUa<$!;&U>c zv7h@-A}f&37T^=&3Z(!4|G)I+{JTIFXMsm#F#`kNArNL1)$nQn3JQ9&U>c zv7h@-A}f&37T^=&`v3obAT#vPO>_%)r2R2!t6$HM|;tg2J9Ijv*44lQ*O@ gD9Z7$h-^s*itS-^eQ>Rl8z{}->FVdQ&MBb@0A&U>c zv7h@-A}f&37T^=&`v3obAT#vPO>_%)r2R2!t6$HM|;tf+C(Sjv*44lM^f& in)nV}_|MGqm6xGAoa?{uw+-Atc?M5cKbLh*2~7ahkta6* literal 0 HcmV?d00001 diff --git a/sourcdos.bas b/sourcdos.bas new file mode 100644 index 0000000..0c44a49 --- /dev/null +++ b/sourcdos.bas @@ -0,0 +1,6712 @@ +Screen 12 +DefInt A-Z +Randomize Timer + +declare sub dice1 () +declare sub dice2 () +declare sub dice3 () +declare sub dice4 () +declare sub dice5 () +declare sub dice6 () +declare sub dice7 () +declare sub dice8 () +declare sub dice9 () +declare sub dice0 () +declare sub number1 () +declare sub number2 () +declare sub number3 () +declare sub number4 () +declare sub number5 () +declare sub number6 () +declare sub number7 () +declare sub number8 () +declare sub number9 () +declare sub number0 () +declare sub numberA () +declare sub numberB () +declare sub numberC () +declare sub numberD () +declare sub numberE () +declare sub numberF () +declare sub numberG () +declare sub numberH () +declare sub numberI () +declare sub numberJ () +declare sub letter1 () +declare sub letter2 () +declare sub letter3 () +declare sub letter4 () +declare sub letter5 () +declare sub letter6 () +declare sub letter7 () +declare sub letter8 () +declare sub letter9 () +declare sub letter0 () +declare sub letterA () +declare sub letterB () +declare sub letterC () +declare sub letterD () +declare sub letterE () +declare sub letterF () +declare sub letterG () +declare sub letterH () +declare sub letterI () +declare sub letterJ () +declare sub king () +declare sub queen () +declare sub bishop () +declare sub knight () +declare sub rook () +declare sub pawn () +declare sub cannon () +declare sub lance () +declare sub general () +declare sub tokin () +declare sub dragon () +declare sub horse () +declare sub dame () +declare sub checker () +declare sub cells () +declare sub dices () +declare sub chessboard () +declare sub makrukboard () +declare sub xiangqiboard () +declare sub shogiboard () +declare sub draughtsboard () +declare sub chess () +declare sub makruk () +declare sub xiangqi () +declare sub shogi () +declare sub draughts () +declare sub chessfen () +declare sub makrukfen () +declare sub xiangqifen () +declare sub shogifen () +declare sub draughtsfen () + +Common Shared x, y, cd1, cd2, cn, cl, cf, cb1, cb2, cb3, cb4, cb5 As Integer +Common Shared dc1, dc2, dc3, dc4, dc5, dc6, w1, b1, w2, b2, w3, b3, w4, b4, fw1, fb1, fw2, fb2, fw3, fb3, fw4, fb4, row, col, index, count As Integer +Common Shared fw1x, fw1y, fb1x, fb1y, fw2x, fw2y, fb2x, fb2y, fw3x, fw3y, fb3x, fb3y, fw4x, fw4y, fb4x, fb4y As Integer +Common Shared fig1w, fig1b, fig2w, fig2b, fig3w, fig3b, fig4w, fig4b, mas1, mas2, mas3, mas4, mas5, mas6, mas7, mas8, mas9, mas0, lin1, lin2, lin3, lin4, lin5, lin6, lin7, lin8, lin9, lin0, fen As String +Let cd1 = 2: Let cd2 = 15: Let cn = 7: Let cl = 14: Let cf = 1: Let cb1 = 7: Let cb2 = 6: Let cb3 = 3: Let cb4 = 13: Let cb5 = 9 + +Dim Shared board(8, 8) As Integer +Let index = 100 +For row = 1 To 8: For col = 1 To 8 + Let board(row, col) = index + 1 + Let index = index + 1 +Next col: Next row + +Dim Shared xiabo(10, 9) As Integer +Let index = 100 +For row = 1 To 10: For col = 1 To 9 + Let xiabo(row, col) = index + 1 + Let index = index + 1 +Next col: Next row + +Dim Shared shobo(9, 9) As Integer +Let index = 100 +For row = 1 To 9: For col = 1 To 9 + Let shobo(row, col) = index + 1 + Let index = index + 1 +Next col: Next row + +Dim Shared drabo(10, 10) As Integer +Let index = 100 +For row = 1 To 10: For col = 1 To 10 + Let drabo(row, col) = index + 1 + Let index = index + 1 +Next col: Let index = index + 1: Next row + +Line (2, 2)-(122, 4), 14, BF: Line -(120, 338), 14, BF: Line -(2, 336), 14, BF: Line -(4, 2), 14, BF +Line (4, 42)-(120, 44), 14, BF: Paint (20, 20), 8, 14 +Line (128, 2)-(248, 4), 14, BF: Line -(246, 338), 14, BF: Line -(128, 336), 14, BF: Line -(130, 2), 14, BF +Line (130, 42)-(246, 44), 14, BF: Paint (160, 20), 8, 14 +Line (254, 2)-(394, 4), 14, BF: Line -(392, 386), 14, BF: Line -(254, 384), 14, BF: Line -(256, 2), 14, BF +Line (256, 42)-(392, 44), 14, BF: Paint (300, 20), 8, 14 +Line (400, 2)-(637, 4), 14, BF: Line -(635, 338), 14, BF: Line -(400, 336), 14, BF: Line -(402, 2), 14, BF +Line (402, 42)-(635, 44), 14, BF: Paint (440, 20), 8, 14 +Line (2, 344)-(248, 346), 14, BF: Line -(246, 432), 14, BF: Line -(2, 430), 14, BF: Line -(4, 344), 14, BF +Line (4, 378)-(246, 376), 14, BF: Paint (20, 360), 8, 14 +Color 14, 8: Locate 2, 4: Print "1 - Chess": Locate 2, 19: Print "2 - Makruk": Locate 2, 36: Print "3 - Xiangqi": Locate 2, 61: Print "4 - Shogi": Locate 23, 10: Print "5 - Draughts" +Color 12, 0: Locate 23, 52: Print "Press number to select game": Locate 24, 59: Print "or Esc to exit" + +Color 11, 0 +Let x = 10: For y = 50 To 300 Step 48 + Call cells +Next y +Let x = 10: Let y = 50: Call king +Let x = 10: Let y = y + 48: Call queen +Let x = 10: Let y = y + 48: Call bishop +Let x = 10: Let y = y + 48: Call knight +Let x = 10: Let y = y + 48: Call rook +Let x = 10: Let y = y + 48: Call pawn +Locate 5, 9: Print "King": Locate 8, 9: Print "Queen" +Locate 11, 9: Print "Bishop": Locate 14, 9: Print "Knight" +Locate 17, 9: Print "Rook": Locate 20, 9: Print "Pawn" +Let x = 136: For y = 50 To 300 Step 48 + Call cells +Next y +Let x = 136: Let y = 50: Call king +Let x = 136: Let y = y + 48: Call queen +Let x = 136: Let y = y + 48: Call bishop +Let x = 136: Let y = y + 48: Call knight +Let x = 136: Let y = y + 48: Call rook +Let x = 136: Let y = y + 48: Call checker +Locate 5, 25: Print "Lord": Locate 8, 25: Print "Seed" +Locate 11, 25: Print "Noble": Locate 14, 25: Print "Horse" +Locate 17, 25: Print "Boat": Locate 20, 25: Print "Shell" +Let x = 262: For y = 50 To 350 Step 48 + Call cells +Next y +Let x = 262: Let y = 50: Call king +Let x = 262: Let y = y + 48: Call queen +Let x = 262: Let y = y + 48: Call bishop +Let x = 262: Let y = y + 48: Call knight +Let x = 262: Let y = y + 48: Call rook +Let x = 262: Let y = y + 48: Call cannon +Let x = 262: Let y = y + 48: Call pawn +Locate 5, 41: Print "General": Locate 8, 41: Print "Advisor" +Locate 11, 41: Print "Elephant": Locate 14, 41: Print "Horse" +Locate 17, 41: Print "Chariot": Locate 20, 41: Print "Cannon" +Locate 23, 41: Print "Soldier" +Let x = 408: For y = 50 To 300 Step 48 + Call cells +Next y +Let x = 528: For y = 50 To 250 Step 48 + Call cells +Next y +Let x = 408: Let y = 50: Call king +Let x = 408: Let y = y + 48: Call queen +Let x = 408: Let y = y + 48: Call general +Let x = 408: Let y = y + 48: Call bishop +Let x = 408: Let y = y + 48: Call knight +Let x = 408: Let y = y + 48: Call rook +Let x = 528: Let y = 50: Call lance +Let x = 528: Let y = y + 48: Call pawn +Let x = 528: Let y = y + 48: Call horse +Let x = 528: Let y = y + 48: Call dragon +Let x = 528: Let y = y + 48: Call tokin +Locate 5, 59: Print "King": Locate 8, 59: Print "Gold" +Locate 11, 59: Print "Silver": Locate 14, 59: Print "Bishop" +Locate 17, 59: Print "Knight": Locate 20, 59: Print "Rook" +Locate 5, 74: Print "Lance": Locate 8, 74: Print "Pawn" +Locate 11, 74: Print "Horse": Locate 14, 74: Print "Dragon" +Locate 17, 74: Print "Tokin" +Let x = 10: Let y = 384 +Call cells: Call checker +Let x = 136: Let y = 384 +Call cells: Call dame +Locate 26, 9: Print "Checker": Locate 26, 25: Print "Dame" + +Do + Select Case InKey$ + Case Is = Chr$(49) + Cls + Call message + Call chessboard + Call dices + Call chess + Case Is = Chr$(50) + Cls + Call message + Call makrukboard + Call dices + Call makruk + Case Is = Chr$(51) + Cls + Call message + Call xiangqiboard + Call dices + Call xiangqi + Case Is = Chr$(52) + Cls + Call message + Call shogiboard + Call dices + Call shogi + Case Is = Chr$(53) + Cls + Call message + Call draughtsboard + Call dices + Call draughts + Case Is = Chr$(27) + Exit Do + End Select +Loop +End + +Sub dice1 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF +End Sub + +Sub dice2 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF +End Sub + +Sub dice3 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF +End Sub + +Sub dice4 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice5 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice6 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice7 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice8 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (16 + x, 4 + y)-(24 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (16 + x, 28 + y)-(24 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice9 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (16 + x, 4 + y)-(24 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (16 + x, 28 + y)-(24 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice0 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF + Line (16 + x, 1 + y)-(24 + x, 9 + y), cd2, BF + Line (16 + x, 11 + y)-(24 + x, 19 + y), cd2, BF + Line (16 + x, 21 + y)-(24 + x, 29 + y), cd2, BF + Line (16 + x, 31 + y)-(24 + x, 39 + y), cd2, BF +End Sub + +Sub number1 + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (5 + x, 8 + y)-(6 + x, 1 + y), cn, BF + Line (4 + x, 2 + y)-(1 + x, 5 + y), cn + Line (4 + x, 3 + y)-(1 + x, 6 + y), cn +End Sub + +Sub number2 + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (1 + x, 8 + y)-(2 + x, 7 + y), cn, BF + Line (10 + x, 4 + y)-(9 + x, 3 + y), cn, BF +End Sub + +Sub number3 + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (2 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (5 + x, 5 + y)-(9 + x, 6 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 4 + y), cn, BF + Line (9 + x, 7 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub number4 + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 1 + y)-(2 + x, 4 + y), cn, BF + Line (9 + x, 1 + y)-(10 + x, 10 + y), cn, BF +End Sub + +Sub number5 + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 8 + y)-(9 + x, 7 + y), cn, BF + Line (2 + x, 4 + y)-(1 + x, 3 + y), cn, BF +End Sub + +Sub number6 + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 8 + y)-(9 + x, 7 + y), cn, BF + Line (1 + x, 8 + y)-(2 + x, 3 + y), cn, BF +End Sub + +Sub number7 + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 3 + y)-(3 + x, 10 + y), cn + Line (9 + x, 3 + y)-(2 + x, 10 + y), cn + Line (8 + x, 3 + y)-(1 + x, 10 + y), cn +End Sub + +Sub number8 + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (2 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (2 + x, 6 + y)-(9 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(2 + x, 4 + y), cn, BF + Line (1 + x, 7 + y)-(2 + x, 9 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 4 + y), cn, BF + Line (9 + x, 7 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub number9 + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 8 + y)-(9 + x, 3 + y), cn, BF + Line (2 + x, 4 + y)-(1 + x, 3 + y), cn, BF +End Sub + +Sub number0 + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (2 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (1 + x, 2 + y)-(2 + x, 9 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub numberA + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(2 + x, 10 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 10 + y), cn, BF + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF +End Sub + +Sub numberB + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (1 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(9 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 4 + y), cn, BF + Line (9 + x, 7 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub numberC + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (1 + x, 1 + y)-(10 + x, 2 + y), cn, BF + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub numberD + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (2 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub numberE + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF +End Sub + +Sub numberF + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF +End Sub + +Sub numberG + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (8 + x, 6 + y)-(6 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 8 + y)-(9 + x, 5 + y), cn, BF + Line (1 + x, 8 + y)-(2 + x, 3 + y), cn, BF +End Sub + +Sub numberH + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (9 + x, 1 + y)-(10 + x, 10 + y), cn, BF +End Sub + +Sub numberI + Line (3 + x, 2 + y)-(8 + x, 1 + y), cn, BF + Line (3 + x, 10 + y)-(8 + x, 9 + y), cn, BF + Line (5 + x, 3 + y)-(6 + x, 8 + y), cn, BF +End Sub + +Sub numberJ + Line (1 + x, 6 + y)-(2 + x, 9 + y), cn, BF + Line (9 + x, 1 + y)-(10 + x, 9 + y), cn, BF + Line (2 + x, 9 + y)-(9 + x, 10 + y), cn, BF +End Sub + +Sub letter1 + Line (4 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (18 + x, 31 + y)-(22 + x, 4 + y), cl, BF + Line (17 + x, 4 + y)-(4 + x, 17 + y), cl + Line (17 + x, 5 + y)-(5 + x, 17 + y), cl + Line (17 + x, 6 + y)-(6 + x, 17 + y), cl + Line (17 + x, 7 + y)-(7 + x, 17 + y), cl +End Sub + +Sub letter2 + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cl, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (32 + x, 9 + y)-(36 + x, 17 + y), cl, BF + Line (4 + x, 23 + y)-(8 + x, 31 + y), cl, BF +End Sub + +Sub letter3 + Line (4 + x, 4 + y)-(34 + x, 8 + y), cl, BF + Line (4 + x, 36 + y)-(34 + x, 32 + y), cl, BF + Line (36 + x, 23 + y)-(32 + x, 34 + y), cl, BF + Line (32 + x, 6 + y)-(36 + x, 17 + y), cl, BF + Line (18 + x, 18 + y)-(34 + x, 22 + y), cl, BF + Line (30 + x, 17 + y)-(31 + x, 17 + y), cl + Line (30 + x, 23 + y)-(31 + x, 23 + y), cl + Line (30 + x, 9 + y)-(31 + x, 9 + y), cl + Line (30 + x, 31 + y)-(31 + x, 31 + y), cl + PSet (31 + x, 10 + y), cl: PSet (31 + x, 30 + y), cl + PSet (31 + x, 16 + y), cl: PSet (31 + x, 24 + y), cl + PSet (35 + x, 18 + y), cl: PSet (35 + x, 22 + y), cl + PSet (35 + x, 5 + y), cl: PSet (35 + x, 35 + y), cl +End Sub + +Sub letter4 + Line (4 + x, 4 + y)-(8 + x, 17 + y), cl, BF + Line (32 + x, 4 + y)-(36 + x, 36 + y), cl, BF + Line (4 + x, 18 + y)-(34 + x, 22 + y), cl, BF +End Sub + +Sub letter5 + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cl, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (4 + x, 9 + y)-(8 + x, 17 + y), cl, BF + Line (32 + x, 23 + y)-(36 + x, 31 + y), cl, BF +End Sub + +Sub letter6 + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cl, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (4 + x, 9 + y)-(8 + x, 31 + y), cl, BF + Line (32 + x, 23 + y)-(36 + x, 31 + y), cl, BF +End Sub + +Sub letter7 + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (8 + x, 36 + y)-(35 + x, 9 + y), cl + Line (7 + x, 36 + y)-(34 + x, 9 + y), cl + Line (6 + x, 36 + y)-(33 + x, 9 + y), cl + Line (5 + x, 36 + y)-(32 + x, 9 + y), cl +End Sub + +Sub letter8 + Line (8 + x, 23 + y)-(4 + x, 34 + y), cl, BF + Line (4 + x, 6 + y)-(8 + x, 17 + y), cl, BF + Line (6 + x, 4 + y)-(34 + x, 8 + y), cl, BF + Line (6 + x, 36 + y)-(34 + x, 32 + y), cl, BF + Line (36 + x, 23 + y)-(32 + x, 34 + y), cl, BF + Line (32 + x, 6 + y)-(36 + x, 17 + y), cl, BF + Line (6 + x, 18 + y)-(34 + x, 22 + y), cl, BF + Line (30 + x, 17 + y)-(31 + x, 17 + y), cl + Line (30 + x, 23 + y)-(31 + x, 23 + y), cl + Line (10 + x, 17 + y)-(9 + x, 17 + y), cl + Line (10 + x, 23 + y)-(9 + x, 23 + y), cl + Line (9 + x, 31 + y)-(10 + x, 31 + y), cl + Line (30 + x, 31 + y)-(31 + x, 31 + y), cl + Line (9 + x, 9 + y)-(10 + x, 9 + y), cl + Line (30 + x, 9 + y)-(31 + x, 9 + y), cl + PSet (35 + x, 5 + y), cl: PSet (35 + x, 35 + y), cl + PSet (5 + x, 5 + y), cl: PSet (5 + x, 35 + y), cl + PSet (9 + x, 30 + y), cl: PSet (31 + x, 30 + y), cl + PSet (9 + x, 10 + y), cl: PSet (31 + x, 10 + y), cl + PSet (5 + x, 18 + y), cl: PSet (5 + x, 22 + y), cl + PSet (9 + x, 16 + y), cl: PSet (9 + x, 24 + y), cl + PSet (31 + x, 16 + y), cl: PSet (31 + x, 24 + y), cl + PSet (35 + x, 18 + y), cl: PSet (35 + x, 22 + y), cl +End Sub + +Sub letter9 + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cl, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (32 + x, 9 + y)-(36 + x, 31 + y), cl, BF +End Sub + +Sub letter0 + Line (6 + x, 4 + y)-(34 + x, 8 + y), cl, BF + Line (6 + x, 36 + y)-(34 + x, 32 + y), cl, BF + Line (4 + x, 6 + y)-(8 + x, 34 + y), cl, BF + Line (36 + x, 6 + y)-(32 + x, 34 + y), cl, BF + Line (9 + x, 9 + y)-(10 + x, 9 + y), cl + Line (30 + x, 9 + y)-(31 + x, 9 + y), cl + Line (9 + x, 31 + y)-(10 + x, 31 + y), cl + Line (30 + x, 31 + y)-(31 + x, 31 + y), cl + Line (9 + x, 9 + y)-(10 + x, 9 + y), cl + Line (30 + x, 9 + y)-(31 + x, 9 + y), cl + PSet (35 + x, 5 + y), cl: PSet (35 + x, 35 + y), cl + PSet (5 + x, 5 + y), cl: PSet (5 + x, 35 + y), cl + PSet (9 + x, 30 + y), cl: PSet (31 + x, 30 + y), cl + PSet (9 + x, 10 + y), cl: PSet (31 + x, 10 + y), cl +End Sub + +Sub letterA + Line (4 + x, 6 + y)-(8 + x, 36 + y), cl, BF + Line (32 + x, 6 + y)-(36 + x, 36 + y), cl, BF + Line (4 + x, 18 + y)-(34 + x, 22 + y), cl, BF + Line (6 + x, 4 + y)-(34 + x, 8 + y), cl, BF + Line (30 + x, 9 + y)-(31 + x, 9 + y), cl + Line (9 + x, 9 + y)-(10 + x, 9 + y), cl + PSet (9 + x, 10 + y), cl: PSet (31 + x, 10 + y), cl + PSet (5 + x, 5 + y), cl: PSet (35 + x, 5 + y), cl +End Sub + +Sub letterB + Line (4 + x, 9 + y)-(8 + x, 31 + y), cl, BF + Line (4 + x, 4 + y)-(34 + x, 8 + y), cl, BF + Line (4 + x, 36 + y)-(34 + x, 32 + y), cl, BF + Line (36 + x, 23 + y)-(32 + x, 34 + y), cl, BF + Line (32 + x, 6 + y)-(36 + x, 17 + y), cl, BF + Line (9 + x, 18 + y)-(34 + x, 22 + y), cl, BF + Line (30 + x, 17 + y)-(31 + x, 17 + y), cl + Line (30 + x, 23 + y)-(31 + x, 23 + y), cl + Line (30 + x, 9 + y)-(31 + x, 9 + y), cl + Line (30 + x, 31 + y)-(31 + x, 31 + y), cl + PSet (31 + x, 10 + y), cl: PSet (31 + x, 30 + y), cl + PSet (31 + x, 16 + y), cl: PSet (31 + x, 24 + y), cl + PSet (35 + x, 18 + y), cl: PSet (35 + x, 22 + y), cl + PSet (35 + x, 5 + y), cl: PSet (35 + x, 35 + y), cl +End Sub + +Sub letterC + Line (6 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (6 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (4 + x, 6 + y)-(8 + x, 34 + y), cl, BF + Line (9 + x, 9 + y)-(10 + x, 9 + y), cl + Line (9 + x, 31 + y)-(10 + x, 31 + y), cl + PSet (9 + x, 10 + y), cl: PSet (9 + x, 30 + y), cl + PSet (5 + x, 5 + y), cl: PSet (5 + x, 35 + y), cl +End Sub + +Sub letterD + Line (4 + x, 4 + y)-(34 + x, 8 + y), cl, BF + Line (4 + x, 36 + y)-(34 + x, 32 + y), cl, BF + Line (4 + x, 4 + y)-(8 + x, 36 + y), cl, BF + Line (32 + x, 6 + y)-(36 + x, 34 + y), cl, BF + Line (30 + x, 9 + y)-(31 + x, 9 + y), cl + Line (30 + x, 31 + y)-(31 + x, 31 + y), cl + PSet (31 + x, 10 + y), cl: PSet (31 + x, 30 + y), cl + PSet (35 + x, 5 + y), cl: PSet (35 + x, 35 + y), cl +End Sub + +Sub letterE + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cl, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (4 + x, 4 + y)-(8 + x, 36 + y), cl, BF +End Sub + +Sub letterF + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cl, BF + Line (4 + x, 4 + y)-(8 + x, 36 + y), cl, BF +End Sub + +Sub letterG + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (20 + x, 18 + y)-(36 + x, 22 + y), cl, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (4 + x, 9 + y)-(8 + x, 31 + y), cl, BF + Line (32 + x, 23 + y)-(36 + x, 31 + y), cl, BF +End Sub + +Sub letterH + Line (4 + x, 4 + y)-(8 + x, 36 + y), cl, BF + Line (32 + x, 4 + y)-(36 + x, 36 + y), cl, BF + Line (4 + x, 18 + y)-(34 + x, 22 + y), cl, BF +End Sub + +Sub letterI + Line (8 + x, 36 + y)-(32 + x, 32 + y), cl, BF + Line (18 + x, 31 + y)-(22 + x, 9 + y), cl, BF + Line (8 + x, 8 + y)-(32 + x, 3 + y), cl, BF +End Sub + +Sub letterJ + Line (6 + x, 36 + y)-(34 + x, 32 + y), cl, BF + Line (32 + x, 4 + y)-(36 + x, 34 + y), cl, BF + Line (4 + x, 18 + y)-(8 + x, 34 + y), cl, BF + Line (9 + x, 31 + y)-(10 + x, 31 + y), cl + Line (30 + x, 31 + y)-(31 + x, 31 + y), cl + PSet (9 + x, 30 + y), cl: PSet (31 + x, 30 + y), cl + PSet (5 + x, 35 + y), cl: PSet (35 + x, 35 + y), cl +End Sub + +Sub king + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (12 + x, 31 + y)-(28 + x, 31 + y), cf + Line (13 + x, 30 + y)-(27 + x, 30 + y), cf + Line (14 + x, 29 + y)-(26 + x, 29 + y), cf + Line (15 + x, 28 + y)-(25 + x, 28 + y), cf + Line (16 + x, 27 + y)-(24 + x, 10 + y), cf, BF + Line (15 + x, 24 + y)-(25 + x, 24 + y), cf + Line (14 + x, 23 + y)-(26 + x, 23 + y), cf + Line (13 + x, 22 + y)-(27 + x, 22 + y), cf + Line (12 + x, 21 + y)-(28 + x, 21 + y), cf + Line (11 + x, 20 + y)-(29 + x, 20 + y), cf + Line (10 + x, 19 + y)-(30 + x, 19 + y), cf + Line (9 + x, 18 + y)-(31 + x, 18 + y), cf + Line (8 + x, 17 + y)-(32 + x, 17 + y), cf + Line (7 + x, 16 + y)-(33 + x, 16 + y), cf + Line (6 + x, 15 + y)-(34 + x, 15 + y), cf + Line (5 + x, 14 + y)-(35 + x, 14 + y), cf + Line (4 + x, 13 + y)-(36 + x, 12 + y), cf, BF + Line (4 + x, 11 + y)-(14 + x, 10 + y), cf, BF + Line (5 + x, 9 + y)-(13 + x, 9 + y), cf + Line (6 + x, 8 + y)-(12 + x, 8 + y), cf + Line (7 + x, 7 + y)-(11 + x, 7 + y), cf + Line (26 + x, 11 + y)-(36 + x, 10 + y), cf, BF + Line (27 + x, 9 + y)-(35 + x, 9 + y), cf + Line (28 + x, 8 + y)-(34 + x, 8 + y), cf + Line (29 + x, 7 + y)-(33 + x, 7 + y), cf + Line (17 + x, 9 + y)-(23 + x, 8 + y), cf, BF + Line (18 + x, 7 + y)-(22 + x, 6 + y), cf, BF + Line (19 + x, 5 + y)-(21 + x, 4 + y), cf, BF +End Sub + +Sub queen + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 14 + y), cf, BF + Line (11 + x, 24 + y)-(29 + x, 24 + y), cf + Line (10 + x, 23 + y)-(30 + x, 23 + y), cf + Line (9 + x, 22 + y)-(31 + x, 22 + y), cf + Line (8 + x, 21 + y)-(32 + x, 21 + y), cf + Line (7 + x, 20 + y)-(33 + x, 20 + y), cf + Line (6 + x, 19 + y)-(34 + x, 18 + y), cf, BF + Line (6 + x, 17 + y)-(7 + x, 10 + y), cf, BF + Line (5 + x, 11 + y)-(8 + x, 14 + y), cf, BF + Line (4 + x, 12 + y)-(9 + x, 13 + y), cf, BF + Line (34 + x, 17 + y)-(33 + x, 10 + y), cf, BF + Line (35 + x, 11 + y)-(32 + x, 14 + y), cf, BF + Line (36 + x, 12 + y)-(31 + x, 13 + y), cf, BF + Line (12 + x, 13 + y)-(13 + x, 6 + y), cf, BF + Line (11 + x, 7 + y)-(14 + x, 10 + y), cf, BF + Line (10 + x, 8 + y)-(15 + x, 9 + y), cf, BF + Line (27 + x, 13 + y)-(28 + x, 6 + y), cf, BF + Line (26 + x, 7 + y)-(29 + x, 10 + y), cf, BF + Line (25 + x, 8 + y)-(30 + x, 9 + y), cf, BF + Line (19 + x, 13 + y)-(21 + x, 4 + y), cf, BF + Line (18 + x, 5 + y)-(22 + x, 8 + y), cf, BF + Line (17 + x, 6 + y)-(23 + x, 7 + y), cf, BF +End Sub + +Sub bishop + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (18 + x, 31 + y)-(22 + x, 6 + y), cf, BF + Line (19 + x, 5 + y)-(21 + x, 4 + y), cf, BF + Line (12 + x, 31 + y)-(28 + x, 31 + y), cf + Line (13 + x, 30 + y)-(27 + x, 30 + y), cf + Line (14 + x, 29 + y)-(26 + x, 29 + y), cf + Line (15 + x, 28 + y)-(25 + x, 28 + y), cf + Line (16 + x, 27 + y)-(24 + x, 27 + y), cf + Line (17 + x, 26 + y)-(23 + x, 26 + y), cf + Line (17 + x, 21 + y)-(23 + x, 8 + y), cf, BF + Line (16 + x, 19 + y)-(24 + x, 10 + y), cf, BF + Line (15 + x, 17 + y)-(25 + x, 12 + y), cf, BF + Line (14 + x, 15 + y)-(26 + x, 14 + y), cf, BF +End Sub + +Sub knight + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (12 + x, 31 + y)-(28 + x, 31 + y), cf + Line (13 + x, 30 + y)-(29 + x, 30 + y), cf + Line (14 + x, 29 + y)-(30 + x, 29 + y), cf + Line (15 + x, 28 + y)-(31 + x, 28 + y), cf + Line (16 + x, 27 + y)-(32 + x, 27 + y), cf + Line (17 + x, 26 + y)-(33 + x, 26 + y), cf + Line (18 + x, 25 + y)-(34 + x, 25 + y), cf + Line (19 + x, 24 + y)-(35 + x, 24 + y), cf + Line (20 + x, 23 + y)-(36 + x, 18 + y), cf, BF + Line (4 + x, 17 + y)-(35 + x, 17 + y), cf + Line (4 + x, 16 + y)-(34 + x, 16 + y), cf + Line (5 + x, 15 + y)-(33 + x, 15 + y), cf + Line (6 + x, 14 + y)-(32 + x, 14 + y), cf + Line (7 + x, 13 + y)-(31 + x, 13 + y), cf + Line (8 + x, 12 + y)-(30 + x, 12 + y), cf + Line (9 + x, 11 + y)-(29 + x, 11 + y), cf + Line (10 + x, 10 + y)-(28 + x, 10 + y), cf + Line (11 + x, 9 + y)-(27 + x, 9 + y), cf + Line (12 + x, 8 + y)-(26 + x, 8 + y), cf + Line (13 + x, 7 + y)-(25 + x, 7 + y), cf + Line (14 + x, 6 + y)-(24 + x, 6 + y), cf + Line (15 + x, 5 + y)-(23 + x, 5 + y), cf + Line (16 + x, 4 + y)-(22 + x, 4 + y), cf +End Sub + +Sub rook + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (4 + x, 4 + y)-(8 + x, 12 + y), cf, BF + Line (13 + x, 4 + y)-(17 + x, 12 + y), cf, BF + Line (23 + x, 4 + y)-(27 + x, 12 + y), cf, BF + Line (32 + x, 4 + y)-(36 + x, 12 + y), cf, BF + Line (4 + x, 12 + y)-(36 + x, 16 + y), cf, BF + Line (12 + x, 16 + y)-(28 + x, 32 + y), cf, BF + Line (9 + x, 16 + y)-(11 + x, 16 + y), cf + Line (29 + x, 16 + y)-(31 + x, 16 + y), cf + Line (10 + x, 17 + y)-(11 + x, 17 + y), cf + Line (29 + x, 17 + y)-(30 + x, 17 + y), cf + PSet (11 + x, 18 + y), cf: PSet (29 + x, 18 + y), cf + Line (9 + x, 31 + y)-(11 + x, 31 + y), cf + Line (29 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(11 + x, 30 + y), cf + Line (29 + x, 30 + y)-(30 + x, 30 + y), cf + PSet (11 + x, 29 + y), cf: PSet (29 + x, 29 + y), cf +End Sub + +Sub pawn + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (18 + x, 32 + y)-(22 + x, 4 + y), cf, BF + Line (12 + x, 9 + y)-(28 + x, 14 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 26 + y), cf + Line (15 + x, 25 + y)-(25 + x, 25 + y), cf + Line (16 + x, 24 + y)-(24 + x, 24 + y), cf + Line (17 + x, 23 + y)-(23 + x, 23 + y), cf + Line (17 + x, 19 + y)-(23 + x, 19 + y), cf + Line (16 + x, 18 + y)-(24 + x, 18 + y), cf + Line (15 + x, 17 + y)-(25 + x, 17 + y), cf + Line (14 + x, 16 + y)-(26 + x, 16 + y), cf + Line (13 + x, 15 + y)-(27 + x, 15 + y), cf + Line (13 + x, 8 + y)-(27 + x, 8 + y), cf + Line (14 + x, 7 + y)-(26 + x, 7 + y), cf + Line (15 + x, 6 + y)-(25 + x, 6 + y), cf + Line (16 + x, 5 + y)-(24 + x, 5 + y), cf + Line (17 + x, 4 + y)-(23 + x, 4 + y), cf +End Sub + +Sub cannon + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 26 + y), cf + Line (15 + x, 25 + y)-(25 + x, 25 + y), cf + Line (16 + x, 24 + y)-(24 + x, 4 + y), cf, BF + Line (6 + x, 9 + y)-(36 + x, 12 + y), cf, BF + Line (4 + x, 10 + y)-(6 + x, 11 + y), cf, BF + Line (14 + x, 16 + y)-(25 + x, 16 + y), cf + Line (12 + x, 15 + y)-(26 + x, 15 + y), cf + Line (10 + x, 14 + y)-(27 + x, 14 + y), cf + Line (8 + x, 13 + y)-(28 + x, 13 + y), cf + Line (8 + x, 8 + y)-(28 + x, 8 + y), cf + Line (10 + x, 7 + y)-(27 + x, 7 + y), cf + Line (12 + x, 6 + y)-(26 + x, 6 + y), cf + Line (14 + x, 5 + y)-(25 + x, 5 + y), cf + Line (16 + x, 4 + y)-(24 + x, 4 + y), cf +End Sub + +Sub general + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 26 + y), cf + Line (13 + x, 25 + y)-(27 + x, 22 + y), cf, BF + Line (16 + x, 21 + y)-(24 + x, 20 + y), cf, BF + Line (18 + x, 19 + y)-(22 + x, 12 + y), cf, BF + Line (19 + x, 11 + y)-(21 + x, 4 + y), cf, BF + Line (18 + x, 10 + y)-(22 + x, 5 + y), cf, BF + Line (17 + x, 9 + y)-(23 + x, 6 + y), cf, BF + Line (16 + x, 8 + y)-(24 + x, 7 + y), cf, BF + Line (15 + x, 20 + y)-(16 + x, 19 + y), cf, BF + Line (14 + x, 19 + y)-(15 + x, 18 + y), cf, BF + Line (13 + x, 18 + y)-(14 + x, 17 + y), cf, BF + Line (24 + x, 20 + y)-(25 + x, 19 + y), cf, BF + Line (25 + x, 19 + y)-(26 + x, 18 + y), cf, BF + Line (26 + x, 18 + y)-(27 + x, 17 + y), cf, BF + Line (11 + x, 18 + y)-(12 + x, 11 + y), cf, BF + Line (10 + x, 17 + y)-(13 + x, 12 + y), cf, BF + Line (9 + x, 16 + y)-(14 + x, 13 + y), cf, BF + Line (8 + x, 15 + y)-(15 + x, 14 + y), cf, BF + Line (28 + x, 18 + y)-(29 + x, 11 + y), cf, BF + Line (27 + x, 17 + y)-(30 + x, 12 + y), cf, BF + Line (26 + x, 16 + y)-(31 + x, 13 + y), cf, BF + Line (25 + x, 15 + y)-(32 + x, 14 + y), cf, BF + Line (4 + x, 24 + y)-(36 + x, 23 + y), cf, BF + Line (29 + x, 25 + y)-(35 + x, 22 + y), cf, BF + Line (30 + x, 26 + y)-(34 + x, 21 + y), cf, BF + Line (31 + x, 27 + y)-(33 + x, 20 + y), cf, BF + Line (5 + x, 25 + y)-(11 + x, 22 + y), cf, BF + Line (6 + x, 26 + y)-(10 + x, 21 + y), cf, BF + Line (7 + x, 27 + y)-(9 + x, 20 + y), cf, BF +End Sub + +Sub tokin + Line (10 + x, 10 + y)-(30 + x, 30 + y), cf, BF + Line (4 + x, 4 + y)-(5 + x, 5 + y), cf, BF + Line (5 + x, 5 + y)-(7 + x, 7 + y), cf, BF + Line (6 + x, 6 + y)-(9 + x, 9 + y), cf, BF + Line (7 + x, 7 + y)-(11 + x, 11 + y), cf, BF + Line (8 + x, 8 + y)-(12 + x, 12 + y), cf, BF + Line (36 + x, 4 + y)-(35 + x, 5 + y), cf, BF + Line (35 + x, 5 + y)-(33 + x, 7 + y), cf, BF + Line (34 + x, 6 + y)-(31 + x, 9 + y), cf, BF + Line (33 + x, 7 + y)-(29 + x, 11 + y), cf, BF + Line (32 + x, 8 + y)-(28 + x, 12 + y), cf, BF + Line (36 + x, 36 + y)-(35 + x, 35 + y), cf, BF + Line (35 + x, 35 + y)-(33 + x, 33 + y), cf, BF + Line (34 + x, 34 + y)-(31 + x, 31 + y), cf, BF + Line (33 + x, 33 + y)-(29 + x, 29 + y), cf, BF + Line (32 + x, 32 + y)-(28 + x, 28 + y), cf, BF + Line (4 + x, 36 + y)-(5 + x, 35 + y), cf, BF + Line (5 + x, 35 + y)-(7 + x, 33 + y), cf, BF + Line (6 + x, 34 + y)-(9 + x, 31 + y), cf, BF + Line (7 + x, 33 + y)-(11 + x, 29 + y), cf, BF + Line (8 + x, 32 + y)-(12 + x, 28 + y), cf, BF + Line (17 + x, 9 + y)-(23 + x, 8 + y), cf, BF + Line (18 + x, 7 + y)-(22 + x, 6 + y), cf, BF + Line (19 + x, 5 + y)-(21 + x, 4 + y), cf, BF + Line (17 + x, 31 + y)-(23 + x, 32 + y), cf, BF + Line (18 + x, 33 + y)-(22 + x, 34 + y), cf, BF + Line (19 + x, 35 + y)-(21 + x, 36 + y), cf, BF + Line (8 + x, 17 + y)-(9 + x, 23 + y), cf, BF + Line (6 + x, 18 + y)-(7 + x, 22 + y), cf, BF + Line (4 + x, 19 + y)-(5 + x, 21 + y), cf, BF + Line (32 + x, 17 + y)-(31 + x, 23 + y), cf, BF + Line (34 + x, 18 + y)-(33 + x, 22 + y), cf, BF + Line (36 + x, 19 + y)-(35 + x, 21 + y), cf, BF +End Sub + +Sub lance + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 24 + y), cf, BF + Line (15 + x, 23 + y)-(25 + x, 20 + y), cf, BF + Line (16 + x, 19 + y)-(24 + x, 16 + y), cf, BF + Line (17 + x, 15 + y)-(23 + x, 12 + y), cf, BF + Line (18 + x, 11 + y)-(22 + x, 8 + y), cf, BF + Line (19 + x, 7 + y)-(21 + x, 4 + y), cf, BF +End Sub + +Sub dragon + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 26 + y), cf + Line (15 + x, 25 + y)-(25 + x, 25 + y), cf + Line (15 + x, 20 + y)-(25 + x, 20 + y), cf + Line (14 + x, 19 + y)-(26 + x, 19 + y), cf + Line (13 + x, 18 + y)-(27 + x, 18 + y), cf + Line (16 + x, 24 + y)-(24 + x, 8 + y), cf, BF + Line (17 + x, 7 + y)-(23 + x, 6 + y), cf, BF + Line (18 + x, 5 + y)-(22 + x, 5 + y), cf + Line (19 + x, 4 + y)-(21 + x, 4 + y), cf + Line (9 + x, 12 + y)-(31 + x, 17 + y), cf, BF + Line (10 + x, 11 + y)-(13 + x, 11 + y), cf + Line (11 + x, 10 + y)-(12 + x, 10 + y), cf + Line (27 + x, 11 + y)-(30 + x, 11 + y), cf + Line (28 + x, 10 + y)-(29 + x, 10 + y), cf + Line (10 + x, 11 + y)-(10 + x, 18 + y), cf + Line (9 + x, 12 + y)-(9 + x, 19 + y), cf + Line (8 + x, 13 + y)-(8 + x, 20 + y), cf + Line (7 + x, 14 + y)-(7 + x, 21 + y), cf + Line (6 + x, 15 + y)-(6 + x, 22 + y), cf + Line (5 + x, 16 + y)-(5 + x, 23 + y), cf + Line (4 + x, 17 + y)-(4 + x, 24 + y), cf + Line (30 + x, 11 + y)-(30 + x, 18 + y), cf + Line (31 + x, 12 + y)-(31 + x, 19 + y), cf + Line (32 + x, 13 + y)-(32 + x, 20 + y), cf + Line (33 + x, 14 + y)-(33 + x, 21 + y), cf + Line (34 + x, 15 + y)-(34 + x, 22 + y), cf + Line (35 + x, 16 + y)-(35 + x, 23 + y), cf + Line (36 + x, 17 + y)-(36 + x, 24 + y), cf +End Sub + +Sub horse + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (10 + x, 31 + y)-(11 + x, 26 + y), cf, BF + Line (16 + x, 31 + y)-(17 + x, 26 + y), cf, BF + Line (23 + x, 31 + y)-(24 + x, 26 + y), cf, BF + Line (29 + x, 31 + y)-(30 + x, 26 + y), cf, BF + Line (8 + x, 25 + y)-(32 + x, 14 + y), cf, BF + Line (7 + x, 24 + y)-(7 + x, 15 + y), cf + Line (6 + x, 23 + y)-(6 + x, 16 + y), cf + Line (5 + x, 22 + y)-(5 + x, 17 + y), cf + Line (4 + x, 21 + y)-(4 + x, 18 + y), cf + Line (33 + x, 24 + y)-(33 + x, 15 + y), cf + Line (34 + x, 23 + y)-(34 + x, 16 + y), cf + Line (35 + x, 22 + y)-(35 + x, 17 + y), cf + Line (36 + x, 21 + y)-(36 + x, 18 + y), cf + Line (14 + x, 13 + y)-(26 + x, 10 + y), cf, BF + Line (10 + x, 9 + y)-(30 + x, 7 + y), cf, BF + Line (10 + x, 6 + y)-(13 + x, 6 + y), cf + Line (10 + x, 5 + y)-(12 + x, 5 + y), cf + Line (10 + x, 4 + y)-(11 + x, 4 + y), cf + Line (30 + x, 6 + y)-(27 + x, 6 + y), cf + Line (30 + x, 5 + y)-(28 + x, 5 + y), cf + Line (30 + x, 4 + y)-(29 + x, 4 + y), cf + Line (16 + x, 6 + y)-(24 + x, 6 + y), cf + Line (17 + x, 5 + y)-(23 + x, 5 + y), cf + Line (18 + x, 4 + y)-(22 + x, 4 + y), cf +End Sub + +Sub dame + Line (14 + x, 36 + y)-(26 + x, 28 + y), cf, BF + Line (14 + x, 4 + y)-(26 + x, 12 + y), cf, BF + Line (4 + x, 14 + y)-(12 + x, 26 + y), cf, BF + Line (28 + x, 14 + y)-(36 + x, 26 + y), cf, BF + Line (17 + x, 36 + y)-(17 + x, 27 + y), cf + Line (16 + x, 36 + y)-(16 + x, 26 + y), cf + Line (15 + x, 36 + y)-(15 + x, 25 + y), cf + Line (14 + x, 36 + y)-(14 + x, 24 + y), cf + Line (13 + x, 35 + y)-(13 + x, 23 + y), cf + Line (12 + x, 34 + y)-(12 + x, 22 + y), cf + Line (23 + x, 36 + y)-(23 + x, 27 + y), cf + Line (24 + x, 36 + y)-(24 + x, 26 + y), cf + Line (25 + x, 36 + y)-(25 + x, 25 + y), cf + Line (26 + x, 36 + y)-(26 + x, 24 + y), cf + Line (27 + x, 35 + y)-(27 + x, 23 + y), cf + Line (28 + x, 34 + y)-(28 + x, 22 + y), cf + Line (17 + x, 4 + y)-(17 + x, 13 + y), cf + Line (16 + x, 4 + y)-(16 + x, 14 + y), cf + Line (15 + x, 4 + y)-(15 + x, 15 + y), cf + Line (14 + x, 4 + y)-(14 + x, 16 + y), cf + Line (13 + x, 5 + y)-(13 + x, 17 + y), cf + Line (12 + x, 6 + y)-(12 + x, 18 + y), cf + Line (23 + x, 4 + y)-(23 + x, 13 + y), cf + Line (24 + x, 4 + y)-(24 + x, 14 + y), cf + Line (25 + x, 4 + y)-(25 + x, 15 + y), cf + Line (26 + x, 4 + y)-(26 + x, 16 + y), cf + Line (27 + x, 5 + y)-(27 + x, 17 + y), cf + Line (28 + x, 6 + y)-(28 + x, 18 + y), cf + Line (5 + x, 13 + y)-(5 + x, 27 + y), cf + Line (6 + x, 12 + y)-(6 + x, 28 + y), cf + Line (7 + x, 11 + y)-(7 + x, 29 + y), cf + Line (8 + x, 10 + y)-(8 + x, 30 + y), cf + Line (9 + x, 9 + y)-(9 + x, 31 + y), cf + Line (10 + x, 8 + y)-(10 + x, 32 + y), cf + Line (11 + x, 7 + y)-(11 + x, 33 + y), cf + Line (35 + x, 13 + y)-(35 + x, 27 + y), cf + Line (34 + x, 12 + y)-(34 + x, 28 + y), cf + Line (33 + x, 11 + y)-(33 + x, 29 + y), cf + Line (32 + x, 10 + y)-(32 + x, 30 + y), cf + Line (31 + x, 9 + y)-(31 + x, 31 + y), cf + Line (30 + x, 8 + y)-(30 + x, 32 + y), cf + Line (29 + x, 7 + y)-(29 + x, 33 + y), cf +End Sub + +Sub checker + Line (14 + x, 36 + y)-(26 + x, 32 + y), cf, BF + Line (14 + x, 4 + y)-(26 + x, 8 + y), cf, BF + Line (4 + x, 14 + y)-(8 + x, 26 + y), cf, BF + Line (32 + x, 14 + y)-(36 + x, 26 + y), cf, BF + Line (13 + x, 35 + y)-(13 + x, 31 + y), cf + Line (12 + x, 34 + y)-(12 + x, 30 + y), cf + Line (11 + x, 33 + y)-(11 + x, 29 + y), cf + Line (10 + x, 32 + y)-(10 + x, 28 + y), cf + Line (9 + x, 31 + y)-(9 + x, 27 + y), cf + Line (8 + x, 30 + y)-(8 + x, 26 + y), cf + Line (27 + x, 35 + y)-(27 + x, 31 + y), cf + Line (28 + x, 34 + y)-(28 + x, 30 + y), cf + Line (29 + x, 33 + y)-(29 + x, 29 + y), cf + Line (30 + x, 32 + y)-(30 + x, 28 + y), cf + Line (31 + x, 31 + y)-(31 + x, 27 + y), cf + Line (32 + x, 30 + y)-(32 + x, 26 + y), cf + Line (13 + x, 5 + y)-(13 + x, 9 + y), cf + Line (12 + x, 6 + y)-(12 + x, 10 + y), cf + Line (11 + x, 7 + y)-(11 + x, 11 + y), cf + Line (10 + x, 8 + y)-(10 + x, 12 + y), cf + Line (9 + x, 9 + y)-(9 + x, 13 + y), cf + Line (8 + x, 10 + y)-(8 + x, 14 + y), cf + Line (27 + x, 5 + y)-(27 + x, 9 + y), cf + Line (28 + x, 6 + y)-(28 + x, 10 + y), cf + Line (29 + x, 7 + y)-(29 + x, 11 + y), cf + Line (30 + x, 8 + y)-(30 + x, 12 + y), cf + Line (31 + x, 9 + y)-(31 + x, 13 + y), cf + Line (32 + x, 10 + y)-(32 + x, 14 + y), cf + Line (5 + x, 13 + y)-(5 + x, 27 + y), cf + Line (6 + x, 12 + y)-(6 + x, 28 + y), cf + Line (7 + x, 11 + y)-(7 + x, 29 + y), cf + Line (35 + x, 13 + y)-(35 + x, 27 + y), cf + Line (34 + x, 12 + y)-(34 + x, 28 + y), cf + Line (33 + x, 11 + y)-(33 + x, 29 + y), cf + Line (17 + x, 28 + y)-(23 + x, 24 + y), cf, BF + Line (17 + x, 12 + y)-(23 + x, 16 + y), cf, BF + Line (12 + x, 17 + y)-(16 + x, 23 + y), cf, BF + Line (24 + x, 17 + y)-(28 + x, 23 + y), cf, BF + Line (18 + x, 28 + y)-(18 + x, 23 + y), cf + Line (17 + x, 28 + y)-(17 + x, 22 + y), cf + Line (16 + x, 27 + y)-(16 + x, 21 + y), cf + Line (22 + x, 28 + y)-(22 + x, 23 + y), cf + Line (23 + x, 28 + y)-(23 + x, 22 + y), cf + Line (24 + x, 27 + y)-(24 + x, 21 + y), cf + Line (18 + x, 12 + y)-(18 + x, 17 + y), cf + Line (17 + x, 12 + y)-(17 + x, 18 + y), cf + Line (16 + x, 13 + y)-(16 + x, 19 + y), cf + Line (22 + x, 12 + y)-(22 + x, 17 + y), cf + Line (23 + x, 12 + y)-(23 + x, 18 + y), cf + Line (24 + x, 13 + y)-(24 + x, 19 + y), cf + Line (13 + x, 16 + y)-(13 + x, 24 + y), cf + Line (14 + x, 15 + y)-(14 + x, 25 + y), cf + Line (15 + x, 14 + y)-(15 + x, 26 + y), cf + Line (27 + x, 16 + y)-(27 + x, 24 + y), cf + Line (26 + x, 15 + y)-(26 + x, 25 + y), cf + Line (25 + x, 14 + y)-(25 + x, 26 + y), cf +End Sub + +Sub cells + Line (x, y)-(x + 40, y + 40), cd1, BF + Line (x - 1, y - 1)-(x + 41, y + 41), cb1, B +End Sub + +Sub dices + Line (20, 160)-(60, 200), cd1, BF + Line (20, 220)-(60, 260), cd1, BF + Line (20, 280)-(60, 320), cd1, BF + Line (580, 160)-(620, 200), cd1, BF + Line (580, 220)-(620, 260), cd1, BF + Line (580, 280)-(620, 320), cd1, BF + Line (19, 159)-(61, 201), cb1, B + Line (19, 219)-(61, 261), cb1, B + Line (19, 279)-(61, 321), cb1, B + Line (579, 159)-(621, 201), cb1, B + Line (579, 219)-(621, 261), cb1, B + Line (579, 279)-(621, 321), cb1, B +End Sub + +Sub chessboard + Line (160, 80)-(480, 400), cb2, BF + For x = 160 To 480 Step 40 + Line (x, 80)-(x, 400), cb1 + Next x + For y = 80 To 400 Step 40 + Line (160, y)-(480, y), cb1 + Next y + For y = 320 To 80 Step -80: For x = 400 To 160 Step -80 + Line (x + 1, y + 1)-(x + 39, y + 39), cb3, BF + Line (x + 41, y + 41)-(x + 79, y + 79), cb3, BF + Next x: Next y + Let y = 405 + Let x = 175: Call numberA + Let x = 215: Call numberB + Let x = 255: Call numberC + Let x = 295: Call numberD + Let x = 335: Call numberE + Let x = 375: Call numberF + Let x = 415: Call numberG + Let x = 455: Call numberH + Let x = 145 + Let y = 95: Call number8 + Let y = 135: Call number7 + Let y = 175: Call number6 + Let y = 215: Call number5 + Let y = 255: Call number4 + Let y = 295: Call number3 + Let y = 335: Call number2 + Let y = 375: Call number1 +End Sub + +Sub makrukboard + Line (160, 80)-(480, 400), cb2, BF + For x = 160 To 480 Step 40 + Line (x, 80)-(x, 400), cb1 + Next x + For y = 80 To 400 Step 40 + Line (160, y)-(480, y), cb1 + Next y + Let y = 405 + Let x = 175: Call numberA + Let x = 215: Call numberB + Let x = 255: Call numberC + Let x = 295: Call numberD + Let x = 335: Call numberE + Let x = 375: Call numberF + Let x = 415: Call numberG + Let x = 455: Call numberH + Let x = 145 + Let y = 95: Call number8 + Let y = 135: Call number7 + Let y = 175: Call number6 + Let y = 215: Call number5 + Let y = 255: Call number4 + Let y = 295: Call number3 + Let y = 335: Call number2 + Let y = 375: Call number1 +End Sub + +Sub xiangqiboard + Line (140, 40)-(500, 440), cb2, BF + For x = 140 To 500 Step 40 + Line (x, 40)-(x, 440), cb1 + Next x + For y = 40 To 440 Step 40 + Line (140, y)-(500, y), cb1 + Next y + Line (259, 161)-(381, 159), cb4, BF + Line (259, 41)-(261, 159), cb4, BF + Line (379, 41)-(381, 159), cb4, BF + Line (259, 321)-(381, 319), cb4, BF + Line (259, 439)-(261, 319), cb4, BF + Line (379, 439)-(381, 319), cb4, BF + Line (141, 238)-(499, 242), cb5, BF + Let y = 445 + Let x = 155: Call numberA + Let x = 195: Call numberB + Let x = 235: Call numberC + Let x = 275: Call numberD + Let x = 315: Call numberE + Let x = 355: Call numberF + Let x = 395: Call numberG + Let x = 435: Call numberH + Let x = 475: Call numberI + Let x = 125 + Let y = 55: Call number0 + Let y = 95: Call number9 + Let y = 135: Call number8 + Let y = 175: Call number7 + Let y = 215: Call number6 + Let y = 255: Call number5 + Let y = 295: Call number4 + Let y = 335: Call number3 + Let y = 375: Call number2 + Let y = 415: Call number1 +End Sub + +Sub shogiboard + Line (140, 60)-(500, 420), cb2, BF + For x = 140 To 500 Step 40 + Line (x, 60)-(x, 420), cb1 + Next x + For y = 60 To 400 Step 40 + Line (140, y)-(500, y), cb1 + Next y + Let y = 425 + Let x = 155: Call numberA + Let x = 195: Call numberB + Let x = 235: Call numberC + Let x = 275: Call numberD + Let x = 315: Call numberE + Let x = 355: Call numberF + Let x = 395: Call numberG + Let x = 435: Call numberH + Let x = 475: Call numberI + Let x = 125 + Let y = 75: Call number9 + Let y = 115: Call number8 + Let y = 155: Call number7 + Let y = 195: Call number6 + Let y = 235: Call number5 + Let y = 275: Call number4 + Let y = 315: Call number3 + Let y = 355: Call number2 + Let y = 395: Call number1 +End Sub + +Sub draughtsboard + Line (120, 40)-(520, 440), cb2, BF + For x = 120 To 520 Step 40 + Line (x, 40)-(x, 440), cb1 + Next x + For y = 40 To 440 Step 40 + Line (120, y)-(520, y), cb1 + Next y + For y = 360 To 40 Step -80: For x = 440 To 120 Step -80 + Line (x + 1, y + 1)-(x + 39, y + 39), cb3, BF + Line (x + 41, y + 41)-(x + 79, y + 79), cb3, BF + Next x: Next y + Let y = 445 + Let x = 135: Call numberA + Let x = 175: Call numberB + Let x = 215: Call numberC + Let x = 255: Call numberD + Let x = 295: Call numberE + Let x = 335: Call numberF + Let x = 375: Call numberG + Let x = 415: Call numberH + Let x = 455: Call numberI + Let x = 495: Call numberJ + Let x = 105 + Let y = 55: Call number0 + Let y = 95: Call number9 + Let y = 135: Call number8 + Let y = 175: Call number7 + Let y = 215: Call number6 + Let y = 255: Call number5 + Let y = 295: Call number4 + Let y = 335: Call number3 + Let y = 375: Call number2 + Let y = 415: Call number1 +End Sub + +Sub chess + + Rem 1st roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = 1 + Let w1 = board(dc2, dc1): Let b1 = board(dc5, dc4) + + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let w1 = board(dc2, dc1): Let b1 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While Abs(w1 - b1) < 10 + + Let w1 = board(dc2, dc1): Let b1 = board(dc5, dc4) + Let fw1x = dc1: Let fw1y = dc2: Let fb1x = dc4: Let fb1y = dc5 + Let fw1 = dc3: Let fb1 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15: Call king + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0: Call king + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call chessfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 2nd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = Int(Rnd * 5 + 2) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = Int(Rnd * 5 + 2) + Let w2 = board(dc2, dc1): Let b2 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc2 = 1 Or dc2 = 8 + End Select + Select Case dc6 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc5 = 1 Or dc5 = 8 + End Select + + Let w2 = board(dc2, dc1): Let b2 = board(dc5, dc4) + Let fw2x = dc1: Let fw2y = dc2: Let fb2x = dc4: Let fb2y = dc5 + Let fw2 = dc3: Let fb2 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call pawn + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call pawn + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call chessfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 3rd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = Int(Rnd * 5 + 2) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = Int(Rnd * 5 + 2) + Let w3 = board(dc2, dc1): Let b3 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw3x = dc1: Let fw3y = dc2 + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw3x = dc1: Let fw3y = dc2 + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc2 = 1 Or dc2 = 8 + End Select + Select Case dc6 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb3x = dc4: Let fb3y = dc5 + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb3x = dc4: Let fb3y = dc5 + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc5 = 1 Or dc5 = 8 + End Select + + Let w3 = board(dc2, dc1): Let b3 = board(dc5, dc4) + Let fw3x = dc1: Let fw3y = dc2: Let fb3x = dc4: Let fb3y = dc5 + Let fw3 = dc3: Let fb3 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call pawn + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call pawn + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call chessfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 4th roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = Int(Rnd * 5 + 2) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = Int(Rnd * 5 + 2) + Let w4 = board(dc2, dc1): Let b4 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw4x = dc1: Let fw4y = dc2 + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw4x = dc1: Let fw4y = dc2 + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc2 = 1 Or dc2 = 8 + End Select + Select Case dc6 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb4x = dc4: Let fb4y = dc5 + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb4x = dc4: Let fb4y = dc5 + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc5 = 1 Or dc5 = 8 + End Select + + Let w4 = board(dc2, dc1): Let b4 = board(dc5, dc4) + Let fw4x = dc1: Let fw4y = dc2: Let fb4x = dc4: Let fb4y = dc5 + Let fw4 = dc3: Let fb4 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call pawn + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call pawn + + Do + Select Case InKey$ + Case Is = Chr$(32) + Rem + Case Is = Chr$(13) + Call chessfen + Case Is = Chr$(27) + End + End Select + Loop +End Sub + +Sub makruk + + Rem 1st roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = 1 + Let w1 = board(dc2, dc1): Let b1 = board(dc5, dc4) + + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let w1 = board(dc2, dc1): Let b1 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While Abs(w1 - b1) < 10 + + Let w1 = board(dc2, dc1): Let b1 = board(dc5, dc4) + Let fw1x = dc1: Let fw1y = dc2: Let fb1x = dc4: Let fb1y = dc5 + Let fw1 = dc3: Let fb1 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15: Call king + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0: Call king + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call makrukfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 2nd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = Int(Rnd * 5 + 2) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = Int(Rnd * 5 + 2) + Let w2 = board(dc2, dc1): Let b2 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + Let indexw3 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Let indexw4 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Let indexw5 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc2 < 3 Or dc2 > 5 + End Select + Select Case dc6 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + Let indexb3 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Let indexb4 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Let indexb5 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc5 < 4 Or dc5 > 6 + End Select + + Let w2 = board(dc2, dc1): Let b2 = board(dc5, dc4) + Let fw2x = dc1: Let fw2y = dc2: Let fb2x = dc4: Let fb2y = dc5 + Let fw2 = dc3: Let fb2 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call checker + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call checker + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call makrukfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 3rd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = Int(Rnd * 5 + 2) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = Int(Rnd * 5 + 2) + Let w3 = board(dc2, dc1): Let b3 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + Let indexw3 = indexw3 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Let indexw4 = indexw4 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Let indexw5 = indexw5 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw3x = dc1: Let fw3y = dc2 + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc2 < 3 Or dc2 > 5 + End Select + Select Case dc6 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + Let indexb3 = indexb3 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Let indexb4 = indexb4 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Let indexb5 = indexb5 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb3x = dc4: Let fb3y = dc5 + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc5 < 4 Or dc5 > 6 + End Select + + Let w3 = board(dc2, dc1): Let b3 = board(dc5, dc4) + Let fw3x = dc1: Let fw3y = dc2: Let fb3x = dc4: Let fb3y = dc5 + Let fw3 = dc3: Let fb3 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call checker + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call checker + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call makrukfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 4th roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = Int(Rnd * 5 + 2) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = Int(Rnd * 5 + 2) + Let w4 = board(dc2, dc1): Let b4 = board(dc5, dc4) + If indexw3 > 2 Or indexw4 > 2 Or indexw5 > 2 Then Let dc3 = 6 + If indexb3 > 2 Or indexb4 > 2 Or indexb5 > 2 Then Let dc6 = 6 + + Select Case dc3 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw4x = dc1: Let fw4y = dc2 + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc2 < 3 Or dc2 > 5 + End Select + Select Case dc6 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb4x = dc4: Let fb4y = dc5 + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc5 <= 4 Or dc5 >= 6 + End Select + + Let w4 = board(dc2, dc1): Let b4 = board(dc5, dc4) + Let fw4x = dc1: Let fw4y = dc2: Let fb4x = dc4: Let fb4y = dc5 + Let fw4 = dc3: Let fb4 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call checker + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call checker + + Do + Select Case InKey$ + Case Is = Chr$(32) + Rem + Case Is = Chr$(13) + Call makrukfen + Case Is = Chr$(27) + End + End Select + Loop + +End Sub + +Sub xiangqi + + Rem 1st roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 3 + 4) + Let dc2 = Int(Rnd * 3 + 1) + Let dc3 = 1 + Let dc4 = Int(Rnd * 3 + 4) + Let dc5 = Int(Rnd * 3 + 8) + Let dc6 = 1 + Let w1 = xiabo(dc2, dc1): Let b1 = xiabo(dc5, dc4) + + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 3 + 4) + Let dc2 = Int(Rnd * 3 + 1) + Let dc4 = Int(Rnd * 3 + 4) + Let dc5 = Int(Rnd * 3 + 8) + Let w1 = xiabo(dc2, dc1): Let b1 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w1 = b1 + + Let w1 = xiabo(dc2, dc1): Let b1 = xiabo(dc5, dc4) + Let fw1x = dc1: Let fw1y = dc2: Let fb1x = dc4: Let fb1y = dc5 + Let fw1 = dc3: Let fb1 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call cannon + If dc3 = 7 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call cannon + If dc6 = 7 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15: Call king + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0: Call king + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call xiangqifen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 2nd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let dc3 = Int(Rnd * 6 + 2) + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let dc6 = Int(Rnd * 6 + 2) + Let w2 = xiabo(dc2, dc1): Let b2 = xiabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Rem + Case Is = 2 + Let indexw2 = 1 + Let dc1 = Int(Rnd * 3 + 4) + Let dc2 = Int(Rnd * 3 + 1) + Do + Let count = count + 1 + Let index = Int(Rnd * 5 + 1) + If index = 1 Then + Let dc1 = 4 + Let dc2 = 1 + End If + If index = 2 Then + Let dc1 = 6 + Let dc2 = 1 + End If + If index = 3 Then + Let dc1 = 5 + Let dc2 = 2 + End If + If index = 4 Then + Let dc1 = 4 + Let dc2 = 3 + End If + If index = 5 Then + Let dc1 = 6 + Let dc2 = 3 + End If + Let w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or w2 Mod 2 <> 0 + Case Is = 3 + Let indexw3 = 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 5 + 1) + Do + Let count = count + 1 + Let index = Int(Rnd * 7 + 1) + If index = 1 Then + Let dc1 = 3 + Let dc2 = 1 + End If + If index = 2 Then + Let dc1 = 7 + Let dc2 = 1 + End If + If index = 3 Then + Let dc1 = 1 + Let dc2 = 3 + End If + If index = 4 Then + Let dc1 = 5 + Let dc2 = 3 + End If + If index = 5 Then + Let dc1 = 9 + Let dc2 = 3 + End If + If index = 6 Then + Let dc1 = 3 + Let dc2 = 5 + End If + If index = 7 Then + Let dc1 = 7 + Let dc2 = 5 + End If + Let w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Let indexw4 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Let indexw5 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Let indexw6 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 7 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc2 < 4 Or dc2 > 7 + End Select + Select Case dc6 + Case Is = 1 + Rem + Case Is = 2 + Let indexb2 = 1 + Let dc4 = Int(Rnd * 3 + 4) + Let dc5 = Int(Rnd * 3 + 8) + Do + Let count = count + 1 + Let index = Int(Rnd * 5 + 1) + If index = 1 Then + Let dc4 = 4 + Let dc5 = 10 + End If + If index = 2 Then + Let dc4 = 6 + Let dc5 = 10 + End If + If index = 3 Then + Let dc4 = 5 + Let dc5 = 9 + End If + If index = 4 Then + Let dc4 = 4 + Let dc5 = 8 + End If + If index = 5 Then + Let dc4 = 6 + Let dc5 = 8 + End If + Let b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or b2 Mod 2 = 0 + Case Is = 3 + Let indexb3 = 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 5 + 6) + Do + Let count = count + 1 + Let index = Int(Rnd * 7 + 1) + If index = 1 Then + Let dc4 = 3 + Let dc5 = 10 + End If + If index = 2 Then + Let dc4 = 7 + Let dc5 = 10 + End If + If index = 3 Then + Let dc4 = 1 + Let dc5 = 8 + End If + If index = 4 Then + Let dc4 = 5 + Let dc5 = 8 + End If + If index = 5 Then + Let dc4 = 9 + Let dc5 = 8 + End If + If index = 6 Then + Let dc4 = 3 + Let dc5 = 6 + End If + If index = 7 Then + Let dc4 = 7 + Let dc5 = 6 + End If + Let b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or b2 + Case Is = 4 + Let indexb4 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Let indexb5 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Let indexb6 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 7 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc5 < 3 Or dc5 > 8 + End Select + + Let w2 = xiabo(dc2, dc1): Let b2 = xiabo(dc5, dc4) + Let fw2x = dc1: Let fw2y = dc2: Let fb2x = dc4: Let fb2y = dc5 + Let fw2 = dc3: Let fb2 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call cannon + If dc3 = 7 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call cannon + If dc6 = 7 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call cannon + If dc3 = 7 Then Call pawn + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call cannon + If dc6 = 7 Then Call pawn + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call xiangqifen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 3rd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let dc3 = Int(Rnd * 6 + 2) + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let dc6 = Int(Rnd * 6 + 2) + Let w3 = xiabo(dc2, dc1): Let b3 = xiabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Rem + Case Is = 2 + Let indexw2 = indexw2 + 1 + Let dc1 = Int(Rnd * 3 + 4) + Let dc2 = Int(Rnd * 3 + 1) + Do + Let count = count + 1 + Let index = Int(Rnd * 5 + 1) + If index = 1 Then + Let dc1 = 4 + Let dc2 = 1 + End If + If index = 2 Then + Let dc1 = 6 + Let dc2 = 1 + End If + If index = 3 Then + Let dc1 = 5 + Let dc2 = 2 + End If + If index = 4 Then + Let dc1 = 4 + Let dc2 = 3 + End If + If index = 5 Then + Let dc1 = 6 + Let dc2 = 3 + End If + Let w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or w3 Mod 2 <> 0 + Case Is = 3 + Let indexw3 = indexw3 + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 5 + 1) + Do + Let count = count + 1 + Let index = Int(Rnd * 7 + 1) + If index = 1 Then + Let dc1 = 3 + Let dc2 = 1 + End If + If index = 2 Then + Let dc1 = 7 + Let dc2 = 1 + End If + If index = 3 Then + Let dc1 = 1 + Let dc2 = 3 + End If + If index = 4 Then + Let dc1 = 5 + Let dc2 = 3 + End If + If index = 5 Then + Let dc1 = 9 + Let dc2 = 3 + End If + If index = 6 Then + Let dc1 = 3 + Let dc2 = 5 + End If + If index = 7 Then + Let dc1 = 7 + Let dc2 = 5 + End If + Let w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Let indexw4 = indexw4 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Let indexw5 = indexw5 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let fw3x = dc1: Let fw3y = dc2 + Let w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Let indexw6 = indexw6 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let fw3x = dc1: Let fw3y = dc2 + Let w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 7 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc2 < 4 Or dc2 > 7 + End Select + Select Case dc6 + Case Is = 1 + Rem + Case Is = 2 + Let indexb2 = indexb2 + 1 + Let dc4 = Int(Rnd * 3 + 4) + Let dc5 = Int(Rnd * 3 + 8) + Do + Let count = count + 1 + Let index = Int(Rnd * 5 + 1) + If index = 1 Then + Let dc4 = 4 + Let dc5 = 10 + End If + If index = 2 Then + Let dc4 = 6 + Let dc5 = 10 + End If + If index = 3 Then + Let dc4 = 5 + Let dc5 = 9 + End If + If index = 4 Then + Let dc4 = 4 + Let dc5 = 8 + End If + If index = 5 Then + Let dc4 = 6 + Let dc5 = 8 + End If + Let b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or b3 Mod 2 = 0 + Case Is = 3 + Let indexb3 = indexb3 + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 5 + 6) + Do + Let count = count + 1 + Let index = Int(Rnd * 7 + 1) + If index = 1 Then + Let dc4 = 3 + Let dc5 = 10 + End If + If index = 2 Then + Let dc4 = 7 + Let dc5 = 10 + End If + If index = 3 Then + Let dc4 = 1 + Let dc5 = 8 + End If + If index = 4 Then + Let dc4 = 5 + Let dc5 = 8 + End If + If index = 5 Then + Let dc4 = 9 + Let dc5 = 8 + End If + If index = 6 Then + Let dc4 = 3 + Let dc5 = 6 + End If + If index = 7 Then + Let dc4 = 7 + Let dc5 = 6 + End If + Let b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Let indexb4 = indexb4 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Let indexb5 = indexb5 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let fb3x = dc4: Let fb3y = dc5 + Let b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Let indexb6 = indexb6 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let fb3x = dc4: Let fb3y = dc5 + Let b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 7 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc5 < 3 Or dc5 > 8 + End Select + + Let w3 = xiabo(dc2, dc1): Let b3 = xiabo(dc5, dc4) + Let fw3x = dc1: Let fw3y = dc2: Let fb3x = dc4: Let fb3y = dc5 + Let fw3 = dc3: Let fb3 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call cannon + If dc3 = 7 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call cannon + If dc6 = 7 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call cannon + If dc3 = 7 Then Call pawn + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call cannon + If dc6 = 7 Then Call pawn + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call xiangqifen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 4th roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let dc3 = Int(Rnd * 6 + 2) + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let dc6 = Int(Rnd * 6 + 2) + Let w4 = xiabo(dc2, dc1): Let b2 = xiabo(dc5, dc4) + If indexw2 > 2 Or indexw3 > 2 Or indexw4 > 2 Or indexw5 > 2 Or indexw6 > 2 Then dc3 = 7 + If indexb2 > 2 Or indexb3 > 2 Or indexb4 > 2 Or indexb5 > 2 Or indexb6 > 2 Then dc6 = 7 + + Select Case dc3 + Case Is = 1 + Rem + Case Is = 2 + Let dc1 = Int(Rnd * 3 + 4) + Let dc2 = Int(Rnd * 3 + 1) + Do + Let count = count + 1 + Let index = Int(Rnd * 5 + 1) + If index = 1 Then + Let dc1 = 4 + Let dc2 = 1 + End If + If index = 2 Then + Let dc1 = 6 + Let dc2 = 1 + End If + If index = 3 Then + Let dc1 = 5 + Let dc2 = 2 + End If + If index = 4 Then + Let dc1 = 4 + Let dc2 = 3 + End If + If index = 5 Then + Let dc1 = 6 + Let dc2 = 3 + End If + Let w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or w4 Mod 2 <> 0 + Case Is = 3 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 5 + 1) + Do + Let count = count + 1 + Let index = Int(Rnd * 7 + 1) + If index = 1 Then + Let dc1 = 3 + Let dc2 = 1 + End If + If index = 2 Then + Let dc1 = 7 + Let dc2 = 1 + End If + If index = 3 Then + Let dc1 = 1 + Let dc2 = 3 + End If + If index = 4 Then + Let dc1 = 5 + Let dc2 = 3 + End If + If index = 5 Then + Let dc1 = 9 + Let dc2 = 3 + End If + If index = 6 Then + Let dc1 = 3 + Let dc2 = 5 + End If + If index = 7 Then + Let dc1 = 7 + Let dc2 = 5 + End If + Let w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let fw4x = dc1: Let fw4y = dc2 + Let w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let fw4x = dc1: Let fw4y = dc2 + Let w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 7 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 < 3 Or dc2 > 8 + End Select + Select Case dc6 + Case Is = 1 + Rem + Case Is = 2 + Let dc4 = Int(Rnd * 3 + 4) + Let dc5 = Int(Rnd * 3 + 8) + Do + Let count = count + 1 + Let index = Int(Rnd * 5 + 1) + If index = 1 Then + Let dc4 = 4 + Let dc5 = 10 + End If + If index = 2 Then + Let dc4 = 6 + Let dc5 = 10 + End If + If index = 3 Then + Let dc4 = 5 + Let dc5 = 9 + End If + If index = 4 Then + Let dc4 = 4 + Let dc5 = 8 + End If + If index = 5 Then + Let dc4 = 6 + Let dc5 = 8 + End If + Let b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or b4 Mod 2 = 0 + Case Is = 3 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 5 + 6) + Do + Let count = count + 1 + Let index = Int(Rnd * 7 + 1) + If index = 1 Then + Let dc4 = 3 + Let dc5 = 10 + End If + If index = 2 Then + Let dc4 = 7 + Let dc5 = 10 + End If + If index = 3 Then + Let dc4 = 1 + Let dc5 = 8 + End If + If index = 4 Then + Let dc4 = 5 + Let dc5 = 8 + End If + If index = 5 Then + Let dc4 = 9 + Let dc5 = 8 + End If + If index = 6 Then + Let dc4 = 3 + Let dc5 = 6 + End If + If index = 7 Then + Let dc4 = 7 + Let dc5 = 6 + End If + Let b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let fb4x = dc4: Let fb4y = dc5 + Let b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let fb4x = dc4: Let fb4y = dc5 + Let b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 7 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc5 < 3 Or dc5 > 8 + End Select + + Let w4 = xiabo(dc2, dc1): Let b4 = xiabo(dc5, dc4) + Let fw4x = dc1: Let fw4y = dc2: Let fb4x = dc4: Let fb4y = dc5 + Let fw4 = dc3: Let fb4 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call cannon + If dc3 = 7 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call cannon + If dc6 = 7 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call cannon + If dc3 = 7 Then Call pawn + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call cannon + If dc6 = 7 Then Call pawn + + Do + Select Case InKey$ + Case Is = Chr$(32) + Rem + Case Is = Chr$(13) + Call xiangqifen + Case Is = Chr$(27) + End + End Select + Loop + +End Sub + +Sub shogi + + Rem 1st roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let dc3 = 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let dc6 = 1 + Let w1 = shobo(dc2, dc1): Let b1 = shobo(dc5, dc4) + + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let w1 = shobo(dc2, dc1): Let b1 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While Abs(w1 - b1) < 11 + + Let w1 = shobo(dc2, dc1): Let b1 = shobo(dc5, dc4) + Let fw1x = dc1: Let fw1y = dc2: Let fb1x = dc4: Let fb1y = dc5 + Let fw1 = dc3: Let fb1 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call general + If dc3 = 4 Then Call bishop + If dc3 = 5 Then Call knight + If dc3 = 6 Then Call rook + If dc3 = 7 Then Call lance + If dc3 = 8 Then Call pawn + If dc3 = 9 Then Call tokin + If dc3 = 10 Then Call dragon + If dc3 = 11 Then Call horse + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call general + If dc6 = 4 Then Call bishop + If dc6 = 5 Then Call knight + If dc6 = 6 Then Call rook + If dc6 = 7 Then Call lance + If dc6 = 8 Then Call pawn + If dc6 = 9 Then Call tokin + If dc6 = 10 Then Call dragon + If dc6 = 11 Then Call horse + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 60 + Let cf = 15: Call king + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 60 + Let cf = 0: Call king + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call shogifen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 2nd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let dc3 = Int(Rnd * 10 + 2) + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let dc6 = Int(Rnd * 10 + 2) + Let w2 = shobo(dc2, dc1): Let b2 = shobo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + Let indexw3 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Let indexw4 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Let indexw5 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + Let indexw6 = 1 + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 7 + Let indexw7 = 1 + Let index = Int(Rnd * 2 + 1) + If index = 1 Then Let dc1 = 1 Else Let dc1 = 9 + If dc1 = 1 Then Let indexw71 = 1 Else Let indexw72 = 1 + Do + Let count = count + 1 + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 8 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc2 < 3 Or dc2 > 7 + Case Is = 9 + Let indexw9 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 10 + Let indexw10 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 11 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + End Select + Select Case dc6 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + Let indexb3 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Let indexb4 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Let indexb5 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + Let indexb6 = 1 + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 7 + Let indexb7 = 1 + Let index = Int(Rnd * 2 + 1) + If index = 1 Then Let dc4 = 1 Else Let dc4 = 9 + If dc4 = 1 Then Let indexb71 = 1 Else Let indexb72 = 1 + Do + Let count = count + 1 + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 8 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc5 < 3 Or dc5 > 7 + Case Is = 9 + Let indexb9 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 10 + Let indexb10 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 11 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + End Select + + Let w2 = shobo(dc2, dc1): Let b2 = shobo(dc5, dc4) + Let fw2x = dc1: Let fw2y = dc2: Let fb2x = dc4: Let fb2y = dc5 + Let fw2 = dc3: Let fb2 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call general + If dc3 = 4 Then Call bishop + If dc3 = 5 Then Call knight + If dc3 = 6 Then Call rook + If dc3 = 7 Then Call lance + If dc3 = 8 Then Call pawn + If dc3 = 9 Then Call horse + If dc3 = 10 Then Call dragon + If dc3 = 11 Then Call tokin + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call general + If dc6 = 4 Then Call bishop + If dc6 = 5 Then Call knight + If dc6 = 6 Then Call rook + If dc6 = 7 Then Call lance + If dc6 = 8 Then Call pawn + If dc6 = 9 Then Call horse + If dc6 = 10 Then Call dragon + If dc6 = 11 Then Call tokin + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 60 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call general + If dc3 = 4 Then Call bishop + If dc3 = 5 Then Call knight + If dc3 = 6 Then Call rook + If dc3 = 7 Then Call lance + If dc3 = 8 Then Call pawn + If dc3 = 9 Then Call horse + If dc3 = 10 Then Call dragon + If dc3 = 11 Then Call tokin + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 60 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call general + If dc6 = 4 Then Call bishop + If dc6 = 5 Then Call knight + If dc6 = 6 Then Call rook + If dc6 = 7 Then Call lance + If dc6 = 8 Then Call pawn + If dc6 = 9 Then Call horse + If dc6 = 10 Then Call dragon + If dc6 = 11 Then Call tokin + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call shogifen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 3rd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let dc3 = Int(Rnd * 10 + 2) + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let dc6 = Int(Rnd * 10 + 2) + Let w3 = shobo(dc2, dc1): Let b3 = shobo(dc5, dc4) + If dc3 = 4 Then Let indexw4 = indexw4 + 1 + If dc3 = 6 Then Let indexw6 = indexw6 + 1 + If dc3 = 9 Then Let indexw9 = indexw9 + 1 + If dc3 = 10 Then Let indexw10 = indexw10 + 1 + If indexw4 > 1 Then + Let dc3 = 8 + Let indexw4 = indexw4 - 1 + End If + If indexw6 > 1 Then + Let dc3 = 8 + Let indexw6 = indexw4 - 1 + End If + If indexw9 > 1 Then + Let dc3 = 8 + Let indexw9 = indexw4 - 1 + End If + If indexw10 > 1 Then + Let dc3 = 8 + Let indexw10 = indexw4 - 1 + End If + If indexb4 > 1 Then + Let dc6 = 8 + Let indexb4 = indexb4 - 1 + End If + If indexb6 > 1 Then + Let dc6 = 8 + Let indexb6 = indexb4 - 1 + End If + If indexb9 > 1 Then + Let dc6 = 8 + Let indexb9 = indexb4 - 1 + End If + If indexb10 > 1 Then + Let dc6 = 8 + Let indexb10 = indexb4 - 1 + End If + + Select Case dc3 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + Let indexw3 = indexw3 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Let indexw4 = indexw4 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Let indexw5 = indexw5 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Let indexw6 = indexw6 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 7 + Let indexw7 = indexw7 + 1 + Let index = Int(Rnd * 2 + 1) + If index = 1 Then Let dc1 = 1 Else Let dc1 = 9 + If indexw71 = 1 Then dc1 = 9 + If indexw72 = 1 Then dc1 = 1 + Do + Let count = count + 1 + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 8 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc2 < 3 Or dc2 > 7 + Case Is = 9 + Let indexw9 = indexw9 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 10 + Let indexw10 = indexw10 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 11 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + End Select + Select Case dc6 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + Let indexb3 = indexb3 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Let indexb4 = indexb4 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Let indexb5 = indexb5 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Let indexb6 = indexb6 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 7 + Let indexb7 = indexb7 + 1 + Let index = Int(Rnd * 2 + 1) + If index = 1 Then Let dc4 = 1 Else Let dc4 = 9 + If indexb71 = 1 Then dc4 = 9 + If indexb72 = 1 Then dc4 = 1 + Do + Let count = count + 1 + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 8 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc5 < 3 Or dc5 > 7 + Case Is = 9 + Let indexb9 = indexb9 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 10 + Let indexb10 = indexb10 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 11 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + End Select + + Let w3 = shobo(dc2, dc1): Let b3 = shobo(dc5, dc4) + Let fw3x = dc1: Let fw3y = dc2: Let fb3x = dc4: Let fb3y = dc5 + Let fw3 = dc3: Let fb3 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call general + If dc3 = 4 Then Call bishop + If dc3 = 5 Then Call knight + If dc3 = 6 Then Call rook + If dc3 = 7 Then Call lance + If dc3 = 8 Then Call pawn + If dc3 = 9 Then Call horse + If dc3 = 10 Then Call dragon + If dc3 = 11 Then Call tokin + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call general + If dc6 = 4 Then Call bishop + If dc6 = 5 Then Call knight + If dc6 = 6 Then Call rook + If dc6 = 7 Then Call lance + If dc6 = 8 Then Call pawn + If dc6 = 9 Then Call horse + If dc6 = 10 Then Call dragon + If dc6 = 11 Then Call tokin + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 60 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call general + If dc3 = 4 Then Call bishop + If dc3 = 5 Then Call knight + If dc3 = 6 Then Call rook + If dc3 = 7 Then Call lance + If dc3 = 8 Then Call pawn + If dc3 = 9 Then Call horse + If dc3 = 10 Then Call dragon + If dc3 = 11 Then Call tokin + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 60 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call general + If dc6 = 4 Then Call bishop + If dc6 = 5 Then Call knight + If dc6 = 6 Then Call rook + If dc6 = 7 Then Call lance + If dc6 = 8 Then Call pawn + If dc6 = 9 Then Call horse + If dc6 = 10 Then Call dragon + If dc6 = 11 Then Call tokin + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call shogifen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 4th roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let dc3 = Int(Rnd * 10 + 2) + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let dc6 = Int(Rnd * 10 + 2) + Let w4 = shobo(dc2, dc1): Let b4 = shobo(dc5, dc4) + If dc3 = 4 Then Let indexw4 = indexw4 + 1 + If dc3 = 6 Then Let indexw6 = indexw6 + 1 + If dc3 = 9 Then Let indexw9 = indexw9 + 1 + If dc3 = 10 Then Let indexw10 = indexw10 + 1 + If indexw4 > 1 Then + Let dc3 = 8 + Let indexw4 = indexw4 - 1 + End If + If indexw6 > 1 Then + Let dc3 = 8 + Let indexw6 = indexw4 - 1 + End If + If indexw9 > 1 Then + Let dc3 = 8 + Let indexw9 = indexw4 - 1 + End If + If indexw10 > 1 Then + Let dc3 = 8 + Let indexw10 = indexw4 - 1 + End If + If indexb4 > 1 Then + Let dc6 = 8 + Let indexb4 = indexb4 - 1 + End If + If indexb6 > 1 Then + Let dc6 = 8 + Let indexb6 = indexb4 - 1 + End If + If indexb9 > 1 Then + Let dc6 = 8 + Let indexb9 = indexb4 - 1 + End If + If indexb10 > 1 Then + Let dc6 = 8 + Let indexb10 = indexb4 - 1 + End If + If indexw3 > 2 Or indexw5 > 2 Or indexw7 > 2 Then Let dc3 = 8 + If indexb3 > 2 Or indexb5 > 2 Or indexb7 > 2 Then Let dc6 = 8 + + Select Case dc3 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 7 + Let index = Int(Rnd * 2 + 1) + If index = 1 Then Let dc1 = 1 Else Let dc1 = 9 + If indexw71 = 1 Then dc1 = 9 + If indexw72 = 1 Then dc1 = 1 + Do + Let count = count + 1 + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 8 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc2 < 3 Or dc2 > 7 + Case Is = 9 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 10 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 11 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + End Select + Select Case dc6 + Case Is = 1 + Rem + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 7 + Let index = Int(Rnd * 2 + 1) + If index = 1 Then Let dc4 = 1 Else Let dc4 = 9 + If indexb71 = 1 Then dc4 = 9 + If indexb72 = 1 Then dc4 = 1 + Do + Let count = count + 1 + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 8 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc5 < 3 Or dc5 > 7 + Case Is = 9 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 10 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 11 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + End Select + + Let w4 = shobo(dc2, dc1): Let b4 = shobo(dc5, dc4) + Let fw4x = dc1: Let fw4y = dc2: Let fb4x = dc4: Let fb4y = dc5 + Let fw4 = dc3: Let fb4 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call general + If dc3 = 4 Then Call bishop + If dc3 = 5 Then Call knight + If dc3 = 6 Then Call rook + If dc3 = 7 Then Call lance + If dc3 = 8 Then Call pawn + If dc3 = 9 Then Call horse + If dc3 = 10 Then Call dragon + If dc3 = 11 Then Call tokin + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call general + If dc6 = 4 Then Call bishop + If dc6 = 5 Then Call knight + If dc6 = 6 Then Call rook + If dc6 = 7 Then Call lance + If dc6 = 8 Then Call pawn + If dc6 = 9 Then Call horse + If dc6 = 10 Then Call dragon + If dc6 = 11 Then Call tokin + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 60 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call general + If dc3 = 4 Then Call bishop + If dc3 = 5 Then Call knight + If dc3 = 6 Then Call rook + If dc3 = 7 Then Call lance + If dc3 = 8 Then Call pawn + If dc3 = 9 Then Call horse + If dc3 = 10 Then Call dragon + If dc3 = 11 Then Call tokin + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 60 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call general + If dc6 = 4 Then Call bishop + If dc6 = 5 Then Call knight + If dc6 = 6 Then Call rook + If dc6 = 7 Then Call lance + If dc6 = 8 Then Call pawn + If dc6 = 9 Then Call horse + If dc6 = 10 Then Call dragon + If dc6 = 11 Then Call tokin + + Do + Select Case InKey$ + Case Is = Chr$(32) + Rem + Case Is = Chr$(13) + Call shogifen + Case Is = Chr$(27) + End + End Select + Loop + +End Sub + +Sub draughts + + Rem 1st roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let dc3 = Int(Rnd * 2 + 1) + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let dc6 = Int(Rnd * 2 + 1) + Let w1 = drabo(dc2, dc1): Let b1 = drabo(dc5, dc4) + + Do + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let w1 = drabo(dc2, dc1): Let b1 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until w1 Mod 2 <> 0 And b1 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w1 = b1 + + Let w1 = drabo(dc2, dc1): Let b1 = drabo(dc5, dc4) + Let fw1x = dc1: Let fw1y = dc2: Let fb1x = dc4: Let fb1y = dc5 + Let fw1 = dc3: Let fb1 = dc6 + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + If dc1 = 10 Then Call letterJ + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + If dc4 = 10 Then Call letterJ + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 80: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = (dc4 * 40) + 80: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call draughtsfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 2nd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let dc3 = Int(Rnd * 2 + 1) + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let dc6 = Int(Rnd * 2 + 1) + Let w2 = drabo(dc2, dc1): Let b2 = drabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Do + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w2 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w2 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 2 + Do + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w2 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w2 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + End Select + Select Case dc6 + Case Is = 1 + Do + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b2 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b2 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 2 + Do + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b2 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b2 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + End Select + + Let w2 = drabo(dc2, dc1): Let b2 = drabo(dc5, dc4) + Let fw2x = dc1: Let fw2y = dc2: Let fb2x = dc4: Let fb2y = dc5 + Let fw2 = dc3: Let fb2 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + If dc1 = 10 Then Call letterJ + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + If dc4 = 10 Then Call letterJ + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 80: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = (dc4 * 40) + 80: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call draughtsfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 3rd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let dc3 = Int(Rnd * 2 + 1) + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let dc6 = Int(Rnd * 2 + 1) + Let w3 = drabo(dc2, dc1): Let b3 = drabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Do + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w3 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w3 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 2 + Do + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w3 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w3 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + End Select + Select Case dc6 + Case Is = 1 + Do + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b3 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b3 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 2 + Do + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b3 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b3 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + End Select + + Let w3 = drabo(dc2, dc1): Let b3 = drabo(dc5, dc4) + Let fw3x = dc1: Let fw3y = dc2: Let fb3x = dc4: Let fb3y = dc5 + Let fw3 = dc3: Let fb3 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + If dc1 = 10 Then Call letterJ + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + If dc4 = 10 Then Call letterJ + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 80: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = (dc4 * 40) + 80: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call draughtsfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 4th roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let dc3 = Int(Rnd * 2 + 1) + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let dc6 = Int(Rnd * 2 + 1) + Let w4 = drabo(dc2, dc1): Let b4 = drabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Do + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w4 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w4 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 2 + Do + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w4 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w4 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + End Select + Select Case dc6 + Case Is = 1 + Do + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b4 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b4 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 2 + Do + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b4 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b4 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + End Select + + Let w4 = drabo(dc2, dc1): Let b4 = drabo(dc5, dc4) + Let fw4x = dc1: Let fw4y = dc2: Let fb4x = dc4: Let fb4y = dc5 + Let fw4 = dc3: Let fb4 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + If dc1 = 10 Then Call letterJ + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + If dc4 = 10 Then Call letterJ + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 80: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = (dc4 * 40) + 80: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + + Do + Select Case InKey$ + Case Is = Chr$(32) + Rem + Case Is = Chr$(13) + Call draughtsfen + Case Is = Chr$(27) + End + End Select + Loop + +End Sub + +Sub chessfen + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then Let fig1w$ = "K" + If fw1 = 2 Then Let fig1w$ = "Q" + If fw1 = 3 Then Let fig1w$ = "B" + If fw1 = 4 Then Let fig1w$ = "N" + If fw1 = 5 Then Let fig1w$ = "R" + If fw1 = 6 Then Let fig1w$ = "P" + + If fb1 = 1 Then Let fig1b$ = "k" + If fb1 = 2 Then Let fig1b$ = "q" + If fb1 = 3 Then Let fig1b$ = "b" + If fb1 = 4 Then Let fig1b$ = "n" + If fb1 = 5 Then Let fig1b$ = "r" + If fb1 = 6 Then Let fig1b$ = "p" + + If fw2 = 1 Then Let fig2w$ = "K" + If fw2 = 2 Then Let fig2w$ = "Q" + If fw2 = 3 Then Let fig2w$ = "B" + If fw2 = 4 Then Let fig2w$ = "N" + If fw2 = 5 Then Let fig2w$ = "R" + If fw2 = 6 Then Let fig2w$ = "P" + + If fb2 = 1 Then Let fig2b$ = "k" + If fb2 = 2 Then Let fig2b$ = "q" + If fb2 = 3 Then Let fig2b$ = "b" + If fb2 = 4 Then Let fig2b$ = "n" + If fb2 = 5 Then Let fig2b$ = "r" + If fb2 = 6 Then Let fig2b$ = "p" + + If fw3 = 1 Then Let fig3w$ = "K" + If fw3 = 2 Then Let fig3w$ = "Q" + If fw3 = 3 Then Let fig3w$ = "B" + If fw3 = 4 Then Let fig3w$ = "N" + If fw3 = 5 Then Let fig3w$ = "R" + If fw3 = 6 Then Let fig3w$ = "P" + + If fb3 = 1 Then Let fig3b$ = "k" + If fb3 = 2 Then Let fig3b$ = "q" + If fb3 = 3 Then Let fig3b$ = "b" + If fb3 = 4 Then Let fig3b$ = "n" + If fb3 = 5 Then Let fig3b$ = "r" + If fb3 = 6 Then Let fig3b$ = "p" + + If fw4 = 1 Then Let fig4w$ = "K" + If fw4 = 2 Then Let fig4w$ = "Q" + If fw4 = 3 Then Let fig4w$ = "B" + If fw4 = 4 Then Let fig4w$ = "N" + If fw4 = 5 Then Let fig4w$ = "R" + If fw4 = 6 Then Let fig4w$ = "P" + + If fb4 = 1 Then Let fig4b$ = "k" + If fb4 = 2 Then Let fig4b$ = "q" + If fb4 = 3 Then Let fig4b$ = "b" + If fb4 = 4 Then Let fig4b$ = "n" + If fb4 = 5 Then Let fig4b$ = "r" + If fb4 = 6 Then Let fig4b$ = "p" + + Dim table(8, 8) As String + Let table(fw1y, fw1x) = fig1w$ + Let table(fb1y, fb1x) = fig1b$ + Let table(fw2y, fw2x) = fig2w$ + Let table(fb2y, fb2x) = fig2b$ + Let table(fw3y, fw3x) = fig3w$ + Let table(fb3y, fb3x) = fig3b$ + Let table(fw4y, fw4x) = fig4w$ + Let table(fb4y, fb4x) = fig4b$ + For row = 1 To 8: For col = 1 To 8 + If table(row, col) = "" Then Let table(row, col) = "+" + Next col: Next row + + Let mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + Let lin1$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + Let count = 0 + End If + Next index + + Let mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + Let lin2$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + Let count = 0 + End If + Next index + + Let mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + Let lin3$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + Let count = 0 + End If + Next index + + Let mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + Let lin4$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + Let count = 0 + End If + Next index + + Let mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + Let lin5$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + Let count = 0 + End If + Next index + + Let mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + Let lin6$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + Let count = 0 + End If + Next index + + Let mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + Let lin7$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + Let count = 0 + End If + Next index + + Let mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + Let lin8$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + Let count = 0 + End If + Next index + + Let fen$ = lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 28: Print fen$ + + Do + Loop Until InKey$ <> "" + + System + +End Sub + +Sub makrukfen + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then Let fig1w$ = "L" + If fw1 = 2 Then Let fig1w$ = "S" + If fw1 = 3 Then Let fig1w$ = "N" + If fw1 = 4 Then Let fig1w$ = "H" + If fw1 = 5 Then Let fig1w$ = "B" + If fw1 = 6 Then Let fig1w$ = "C" + + If fb1 = 1 Then Let fig1b$ = "l" + If fb1 = 2 Then Let fig1b$ = "s" + If fb1 = 3 Then Let fig1b$ = "n" + If fb1 = 4 Then Let fig1b$ = "h" + If fb1 = 5 Then Let fig1b$ = "b" + If fb1 = 6 Then Let fig1b$ = "c" + + If fw2 = 1 Then Let fig2w$ = "L" + If fw2 = 2 Then Let fig2w$ = "S" + If fw2 = 3 Then Let fig2w$ = "N" + If fw2 = 4 Then Let fig2w$ = "H" + If fw2 = 5 Then Let fig2w$ = "B" + If fw2 = 6 Then Let fig2w$ = "C" + + If fb2 = 1 Then Let fig2b$ = "l" + If fb2 = 2 Then Let fig2b$ = "s" + If fb2 = 3 Then Let fig2b$ = "n" + If fb2 = 4 Then Let fig2b$ = "h" + If fb2 = 5 Then Let fig2b$ = "b" + If fb2 = 6 Then Let fig2b$ = "c" + + If fw3 = 1 Then Let fig3w$ = "L" + If fw3 = 2 Then Let fig3w$ = "S" + If fw3 = 3 Then Let fig3w$ = "N" + If fw3 = 4 Then Let fig3w$ = "H" + If fw3 = 5 Then Let fig3w$ = "B" + If fw3 = 6 Then Let fig3w$ = "C" + + If fb3 = 1 Then Let fig3b$ = "l" + If fb3 = 2 Then Let fig3b$ = "s" + If fb3 = 3 Then Let fig3b$ = "n" + If fb3 = 4 Then Let fig3b$ = "h" + If fb3 = 5 Then Let fig3b$ = "b" + If fb3 = 6 Then Let fig3b$ = "c" + + If fw4 = 1 Then Let fig4w$ = "L" + If fw4 = 2 Then Let fig4w$ = "S" + If fw4 = 3 Then Let fig4w$ = "N" + If fw4 = 4 Then Let fig4w$ = "H" + If fw4 = 5 Then Let fig4w$ = "B" + If fw4 = 6 Then Let fig4w$ = "C" + + If fb4 = 1 Then Let fig4b$ = "l" + If fb4 = 2 Then Let fig4b$ = "s" + If fb4 = 3 Then Let fig4b$ = "n" + If fb4 = 4 Then Let fig4b$ = "h" + If fb4 = 5 Then Let fig4b$ = "b" + If fb4 = 6 Then Let fig4b$ = "c" + + Dim table(8, 8) As String + Let table(fw1y, fw1x) = fig1w$ + Let table(fb1y, fb1x) = fig1b$ + Let table(fw2y, fw2x) = fig2w$ + Let table(fb2y, fb2x) = fig2b$ + Let table(fw3y, fw3x) = fig3w$ + Let table(fb3y, fb3x) = fig3b$ + Let table(fw4y, fw4x) = fig4w$ + Let table(fb4y, fb4x) = fig4b$ + For row = 1 To 8: For col = 1 To 8 + If table(row, col) = "" Then Let table(row, col) = "+" + Next col: Next row + + Let mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + Let lin1$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + Let count = 0 + End If + Next index + + Let mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + Let lin2$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + Let count = 0 + End If + Next index + + Let mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + Let lin3$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + Let count = 0 + End If + Next index + + Let mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + Let lin4$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + Let count = 0 + End If + Next index + + Let mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + Let lin5$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + Let count = 0 + End If + Next index + + Let mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + Let lin6$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + Let count = 0 + End If + Next index + + Let mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + Let lin7$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + Let count = 0 + End If + Next index + + Let mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + Let lin8$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + Let count = 0 + End If + Next index + + Let fen$ = lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 28: Print fen$ + + Do + Loop Until InKey$ <> "" + + System + +End Sub + +Sub xiangqifen + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then Let fig1w$ = "K" + If fw1 = 2 Then Let fig1w$ = "A" + If fw1 = 3 Then Let fig1w$ = "E" + If fw1 = 4 Then Let fig1w$ = "H" + If fw1 = 5 Then Let fig1w$ = "R" + If fw1 = 6 Then Let fig1w$ = "C" + If fw1 = 7 Then Let fig1w$ = "P" + + If fb1 = 1 Then Let fig1b$ = "k" + If fb1 = 2 Then Let fig1b$ = "a" + If fb1 = 3 Then Let fig1b$ = "e" + If fb1 = 4 Then Let fig1b$ = "h" + If fb1 = 5 Then Let fig1b$ = "r" + If fb1 = 6 Then Let fig1b$ = "c" + If fb1 = 7 Then Let fig1w$ = "p" + + If fw2 = 1 Then Let fig2w$ = "K" + If fw2 = 2 Then Let fig2w$ = "A" + If fw2 = 3 Then Let fig2w$ = "E" + If fw2 = 4 Then Let fig2w$ = "H" + If fw2 = 5 Then Let fig2w$ = "R" + If fw2 = 6 Then Let fig2w$ = "C" + If fw2 = 7 Then Let fig2w$ = "P" + + If fb2 = 1 Then Let fig2b$ = "k" + If fb2 = 2 Then Let fig2b$ = "a" + If fb2 = 3 Then Let fig2b$ = "e" + If fb2 = 4 Then Let fig2b$ = "h" + If fb2 = 5 Then Let fig2b$ = "r" + If fb2 = 6 Then Let fig2b$ = "c" + If fb2 = 7 Then Let fig2w$ = "p" + + If fw3 = 1 Then Let fig3w$ = "K" + If fw3 = 2 Then Let fig3w$ = "A" + If fw3 = 3 Then Let fig3w$ = "E" + If fw3 = 4 Then Let fig3w$ = "H" + If fw3 = 5 Then Let fig3w$ = "R" + If fw3 = 6 Then Let fig3w$ = "C" + If fw3 = 7 Then Let fig3w$ = "P" + + If fb3 = 1 Then Let fig3b$ = "k" + If fb3 = 2 Then Let fig3b$ = "a" + If fb3 = 3 Then Let fig3b$ = "e" + If fb3 = 4 Then Let fig3b$ = "h" + If fb3 = 5 Then Let fig3b$ = "r" + If fb3 = 6 Then Let fig3b$ = "c" + If fb3 = 7 Then Let fig3w$ = "p" + + If fw4 = 1 Then Let fig4w$ = "K" + If fw4 = 2 Then Let fig4w$ = "A" + If fw4 = 3 Then Let fig4w$ = "E" + If fw4 = 4 Then Let fig4w$ = "H" + If fw4 = 5 Then Let fig4w$ = "R" + If fw4 = 6 Then Let fig4w$ = "C" + If fw4 = 7 Then Let fig4w$ = "P" + + If fb4 = 1 Then Let fig4b$ = "k" + If fb4 = 2 Then Let fig4b$ = "a" + If fb4 = 3 Then Let fig4b$ = "e" + If fb4 = 4 Then Let fig4b$ = "h" + If fb4 = 5 Then Let fig4b$ = "r" + If fb4 = 6 Then Let fig4b$ = "c" + If fb4 = 7 Then Let fig4w$ = "p" + + Dim table(10, 9) As String + Let table(fw1y, fw1x) = fig1w$ + Let table(fb1y, fb1x) = fig1b$ + Let table(fw2y, fw2x) = fig2w$ + Let table(fb2y, fb2x) = fig2b$ + Let table(fw3y, fw3x) = fig3w$ + Let table(fb3y, fb3x) = fig3b$ + Let table(fw4y, fw4x) = fig4w$ + Let table(fb4y, fb4x) = fig4b$ + For row = 1 To 10: For col = 1 To 9 + If table(row, col) = "" Then Let table(row, col) = "+" + Next col: Next row + + Let mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + table(1, 9) + Let lin1$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + Let count = 0 + End If + Next index + + Let mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + table(2, 9) + Let lin2$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + Let count = 0 + End If + Next index + + Let mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + table(3, 9) + Let lin3$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + Let count = 0 + End If + Next index + + Let mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + table(4, 9) + Let lin4$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + Let count = 0 + End If + Next index + + Let mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + table(5, 9) + Let lin5$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + Let count = 0 + End If + Next index + + Let mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + table(6, 9) + Let lin6$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + Let count = 0 + End If + Next index + + Let mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + table(7, 9) + Let lin7$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + Let count = 0 + End If + Next index + + Let mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + table(8, 9) + Let lin8$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + Let count = 0 + End If + Next index + + Let mas9$ = table(9, 1) + table(9, 2) + table(9, 3) + table(9, 4) + table(9, 5) + table(9, 6) + table(9, 7) + table(9, 8) + table(9, 9) + Let lin9$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + lin9$ = lin9$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas9$, index, 1) <> "+" And count = 0 Then + lin9$ = lin9$ + Mid$(mas9$, index, 1) + End If + If Mid$(mas9$, index, 1) <> "+" And count > 0 Then + lin9$ = lin9$ + LTrim$(Str$(count)) + lin9$ = lin9$ + Mid$(mas9$, index, 1) + Let count = 0 + End If + Next index + + Let mas0$ = table(10, 1) + table(10, 2) + table(10, 3) + table(10, 4) + table(10, 5) + table(10, 6) + table(10, 7) + table(10, 8) + table(10, 9) + Let lin0$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas0$, index, 1) = "+" Then + count = count + 1 + lin0$ = lin0$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas0$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas0$, index, 1) <> "+" And count = 0 Then + lin0$ = lin0$ + Mid$(mas0$, index, 1) + End If + If Mid$(mas0$, index, 1) <> "+" And count > 0 Then + lin0$ = lin0$ + LTrim$(Str$(count)) + lin0$ = lin0$ + Mid$(mas0$, index, 1) + Let count = 0 + End If + Next index + + Let fen$ = lin0$ + "/" + lin9$ + "/" + lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 24: Print fen$ + + Do + Loop Until InKey$ <> "" + + System + +End Sub + +Sub shogifen + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then Let fig1w$ = "K" + If fw1 = 2 Then Let fig1w$ = "G" + If fw1 = 3 Then Let fig1w$ = "S" + If fw1 = 4 Then Let fig1w$ = "B" + If fw1 = 5 Then Let fig1w$ = "N" + If fw1 = 6 Then Let fig1w$ = "R" + If fw1 = 7 Then Let fig1w$ = "L" + If fw1 = 8 Then Let fig1w$ = "P" + If fw1 = 9 Then Let fig1w$ = "H" + If fw1 = 10 Then Let fig1w$ = "D" + If fw1 = 11 Then Let fig1w$ = "T" + + If fb1 = 1 Then Let fig1b$ = "k" + If fb1 = 2 Then Let fig1b$ = "g" + If fb1 = 3 Then Let fig1b$ = "a" + If fb1 = 4 Then Let fig1b$ = "b" + If fb1 = 5 Then Let fig1b$ = "n" + If fb1 = 6 Then Let fig1b$ = "r" + If fb1 = 7 Then Let fig1b$ = "l" + If fb1 = 8 Then Let fig1b$ = "p" + If fb1 = 9 Then Let fig1b$ = "h" + If fb1 = 10 Then Let fig1b$ = "d" + If fb1 = 11 Then Let fig1b$ = "t" + + If fw2 = 1 Then Let fig2w$ = "K" + If fw2 = 2 Then Let fig2w$ = "G" + If fw2 = 3 Then Let fig2w$ = "S" + If fw2 = 4 Then Let fig2w$ = "B" + If fw2 = 5 Then Let fig2w$ = "N" + If fw2 = 6 Then Let fig2w$ = "R" + If fw2 = 7 Then Let fig2w$ = "L" + If fw2 = 8 Then Let fig2w$ = "P" + If fw2 = 9 Then Let fig2w$ = "H" + If fw2 = 20 Then Let fig2w$ = "D" + If fw2 = 22 Then Let fig2w$ = "T" + + If fb2 = 1 Then Let fig2b$ = "k" + If fb2 = 2 Then Let fig2b$ = "g" + If fb2 = 3 Then Let fig2b$ = "a" + If fb2 = 4 Then Let fig2b$ = "b" + If fb2 = 5 Then Let fig2b$ = "n" + If fb2 = 6 Then Let fig2b$ = "r" + If fb2 = 7 Then Let fig2b$ = "l" + If fb2 = 8 Then Let fig2b$ = "p" + If fb2 = 9 Then Let fig2b$ = "h" + If fb2 = 20 Then Let fig2b$ = "d" + If fb2 = 22 Then Let fig2b$ = "t" + + If fw3 = 1 Then Let fig3w$ = "K" + If fw3 = 2 Then Let fig3w$ = "G" + If fw3 = 3 Then Let fig3w$ = "S" + If fw3 = 4 Then Let fig3w$ = "B" + If fw3 = 5 Then Let fig3w$ = "N" + If fw3 = 6 Then Let fig3w$ = "R" + If fw3 = 7 Then Let fig3w$ = "L" + If fw3 = 8 Then Let fig3w$ = "P" + If fw3 = 9 Then Let fig3w$ = "H" + If fw3 = 30 Then Let fig3w$ = "D" + If fw3 = 33 Then Let fig3w$ = "T" + + If fb3 = 1 Then Let fig3b$ = "k" + If fb3 = 2 Then Let fig3b$ = "g" + If fb3 = 3 Then Let fig3b$ = "a" + If fb3 = 4 Then Let fig3b$ = "b" + If fb3 = 5 Then Let fig3b$ = "n" + If fb3 = 6 Then Let fig3b$ = "r" + If fb3 = 7 Then Let fig3b$ = "l" + If fb3 = 8 Then Let fig3b$ = "p" + If fb3 = 9 Then Let fig3b$ = "h" + If fb3 = 30 Then Let fig3b$ = "d" + If fb3 = 33 Then Let fig3b$ = "t" + + If fw4 = 1 Then Let fig4w$ = "K" + If fw4 = 2 Then Let fig4w$ = "G" + If fw4 = 3 Then Let fig4w$ = "S" + If fw4 = 4 Then Let fig4w$ = "B" + If fw4 = 5 Then Let fig4w$ = "N" + If fw4 = 6 Then Let fig4w$ = "R" + If fw4 = 7 Then Let fig4w$ = "L" + If fw4 = 8 Then Let fig4w$ = "P" + If fw4 = 9 Then Let fig4w$ = "H" + If fw4 = 40 Then Let fig4w$ = "D" + If fw4 = 44 Then Let fig4w$ = "T" + + If fb4 = 1 Then Let fig4b$ = "k" + If fb4 = 2 Then Let fig4b$ = "g" + If fb4 = 3 Then Let fig4b$ = "a" + If fb4 = 4 Then Let fig4b$ = "b" + If fb4 = 5 Then Let fig4b$ = "n" + If fb4 = 6 Then Let fig4b$ = "r" + If fb4 = 7 Then Let fig4b$ = "l" + If fb4 = 8 Then Let fig4b$ = "p" + If fb4 = 9 Then Let fig4b$ = "h" + If fb4 = 40 Then Let fig4b$ = "d" + If fb4 = 44 Then Let fig4b$ = "t" + + Dim table(9, 9) As String + Let table(fw1y, fw1x) = fig1w$ + Let table(fb1y, fb1x) = fig1b$ + Let table(fw2y, fw2x) = fig2w$ + Let table(fb2y, fb2x) = fig2b$ + Let table(fw3y, fw3x) = fig3w$ + Let table(fb3y, fb3x) = fig3b$ + Let table(fw4y, fw4x) = fig4w$ + Let table(fb4y, fb4x) = fig4b$ + For row = 1 To 9: For col = 1 To 9 + If table(row, col) = "" Then Let table(row, col) = "+" + Next col: Next row + + Let mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + table(1, 9) + Let lin1$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + Let count = 0 + End If + Next index + + Let mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + table(2, 9) + Let lin2$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + Let count = 0 + End If + Next index + + Let mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + table(3, 9) + Let lin3$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + Let count = 0 + End If + Next index + + Let mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + table(4, 9) + Let lin4$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + Let count = 0 + End If + Next index + + Let mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + table(5, 9) + Let lin5$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + Let count = 0 + End If + Next index + + Let mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + table(6, 9) + Let lin6$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + Let count = 0 + End If + Next index + + Let mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + table(7, 9) + Let lin7$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + Let count = 0 + End If + Next index + + Let mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + table(8, 9) + Let lin8$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + Let count = 0 + End If + Next index + + Let mas9$ = table(9, 1) + table(9, 2) + table(9, 3) + table(9, 4) + table(9, 5) + table(9, 6) + table(9, 7) + table(9, 8) + table(9, 9) + Let lin9$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + lin9$ = lin9$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas9$, index, 1) <> "+" And count = 0 Then + lin9$ = lin9$ + Mid$(mas9$, index, 1) + End If + If Mid$(mas9$, index, 1) <> "+" And count > 0 Then + lin9$ = lin9$ + LTrim$(Str$(count)) + lin9$ = lin9$ + Mid$(mas9$, index, 1) + Let count = 0 + End If + Next index + + Let fen$ = lin9$ + "/" + lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 25: Print fen$ + + Do + Loop Until InKey$ <> "" + + System + +End Sub + +Sub draughtsfen + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then Let fig1w$ = "D" + If fw1 = 2 Then Let fig1w$ = "C" + + If fb1 = 1 Then Let fig1b$ = "d" + If fb1 = 2 Then Let fig1b$ = "c" + + If fw2 = 1 Then Let fig2w$ = "D" + If fw2 = 2 Then Let fig2w$ = "C" + + If fb2 = 1 Then Let fig2b$ = "d" + If fb2 = 2 Then Let fig2b$ = "c" + + If fw3 = 1 Then Let fig3w$ = "D" + If fw3 = 2 Then Let fig3w$ = "C" + + If fb3 = 1 Then Let fig3b$ = "d" + If fb3 = 2 Then Let fig3b$ = "c" + + If fw4 = 1 Then Let fig4w$ = "D" + If fw4 = 2 Then Let fig4w$ = "C" + + If fb4 = 1 Then Let fig4b$ = "d" + If fb4 = 2 Then Let fig4b$ = "c" + + Dim table(10, 10) As String + Let table(fw1y, fw1x) = fig1w$ + Let table(fb1y, fb1x) = fig1b$ + Let table(fw2y, fw2x) = fig2w$ + Let table(fb2y, fb2x) = fig2b$ + Let table(fw3y, fw3x) = fig3w$ + Let table(fb3y, fb3x) = fig3b$ + Let table(fw4y, fw4x) = fig4w$ + Let table(fb4y, fb4x) = fig4b$ + For row = 1 To 10: For col = 1 To 10 + If table(row, col) = "" Then Let table(row, col) = "+" + Next col: Next row + + Let mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + table(1, 9) + table(1, 10) + Let lin1$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + Let count = 0 + End If + Next index + + Let mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + table(2, 9) + table(2, 10) + Let lin2$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + Let count = 0 + End If + Next index + + Let mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + table(3, 9) + table(3, 10) + Let lin3$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + Let count = 0 + End If + Next index + + Let mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + table(4, 9) + table(4, 10) + Let lin4$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + Let count = 0 + End If + Next index + + Let mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + table(5, 9) + table(5, 10) + Let lin5$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + Let count = 0 + End If + Next index + + Let mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + table(6, 9) + table(6, 10) + Let lin6$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + Let count = 0 + End If + Next index + + Let mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + table(7, 9) + table(7, 10) + Let lin7$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + Let count = 0 + End If + Next index + + Let mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + table(8, 9) + table(8, 10) + Let lin8$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + Let count = 0 + End If + Next index + + Let mas9$ = table(9, 1) + table(9, 2) + table(9, 3) + table(9, 4) + table(9, 5) + table(9, 6) + table(9, 7) + table(9, 8) + table(9, 9) + table(9, 10) + Let lin9$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + lin9$ = lin9$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas9$, index, 1) <> "+" And count = 0 Then + lin9$ = lin9$ + Mid$(mas9$, index, 1) + End If + If Mid$(mas9$, index, 1) <> "+" And count > 0 Then + lin9$ = lin9$ + LTrim$(Str$(count)) + lin9$ = lin9$ + Mid$(mas9$, index, 1) + Let count = 0 + End If + Next index + + Let mas0$ = table(10, 1) + table(10, 2) + table(10, 3) + table(10, 4) + table(10, 5) + table(10, 6) + table(10, 7) + table(10, 8) + table(10, 9) + table(10, 10) + Let lin0$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas0$, index, 1) = "+" Then + count = count + 1 + lin0$ = lin0$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas0$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas0$, index, 1) <> "+" And count = 0 Then + lin0$ = lin0$ + Mid$(mas0$, index, 1) + End If + If Mid$(mas0$, index, 1) <> "+" And count > 0 Then + lin0$ = lin0$ + LTrim$(Str$(count)) + lin0$ = lin0$ + Mid$(mas0$, index, 1) + Let count = 0 + End If + Next index + + Let fen$ = lin0$ + "/" + lin9$ + "/" + lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 23: Print fen$ + + Do + Loop Until InKey$ <> "" + + System + +End Sub + +Sub message + Locate 2, 1: Color 9: Print " SPACEBAR - next pair"; " ENTER - display notation "; "ESCAPE - exit " + Locate 2, 5: Color 5: Print "SPACEBAR": Locate 2, 32: Color 5: Print "ENTER": Locate 2, 63: Color 5: Print "ESCAPE" +End Sub \ No newline at end of file diff --git a/sourcwin.bas b/sourcwin.bas new file mode 100644 index 0000000..2434d46 --- /dev/null +++ b/sourcwin.bas @@ -0,0 +1,6757 @@ +'$Lang: "FBLite" + +#INCLUDE "Windows.bi" +Screen 12 +DefInt A-Z +Randomize Timer + +declare sub dice1 () +declare sub dice2 () +declare sub dice3 () +declare sub dice4 () +declare sub dice5 () +declare sub dice6 () +declare sub dice7 () +declare sub dice8 () +declare sub dice9 () +declare sub dice0 () +declare sub number1 () +declare sub number2 () +declare sub number3 () +declare sub number4 () +declare sub number5 () +declare sub number6 () +declare sub number7 () +declare sub number8 () +declare sub number9 () +declare sub number0 () +declare sub numberA () +declare sub numberB () +declare sub numberC () +declare sub numberD () +declare sub numberE () +declare sub numberF () +declare sub numberG () +declare sub numberH () +declare sub numberI () +declare sub numberJ () +declare sub letter1 () +declare sub letter2 () +declare sub letter3 () +declare sub letter4 () +declare sub letter5 () +declare sub letter6 () +declare sub letter7 () +declare sub letter8 () +declare sub letter9 () +declare sub letter0 () +declare sub letterA () +declare sub letterB () +declare sub letterC () +declare sub letterD () +declare sub letterE () +declare sub letterF () +declare sub letterG () +declare sub letterH () +declare sub letterI () +declare sub letterJ () +declare sub king () +declare sub queen () +declare sub bishop () +declare sub knight () +declare sub rook () +declare sub pawn () +declare sub cannon () +declare sub lance () +declare sub general () +declare sub tokin () +declare sub dragon () +declare sub horse () +declare sub dame () +declare sub checker () +declare sub cells () +declare sub dices () +declare sub chessboard () +declare sub makrukboard () +declare sub xiangqiboard () +declare sub shogiboard () +declare sub draughtsboard () +declare sub chess () +declare sub makruk () +declare sub xiangqi () +declare sub shogi () +declare sub draughts () +declare sub chessfen () +declare sub makrukfen () +declare sub xiangqifen () +declare sub shogifen () +declare sub draughtsfen () +declare sub message () +DECLARE SUB SetTextClpbrd (Text AS STRING) + +DIM Shared AS Integer x, y, cd1, cd2, cn, cll, cf, cb1, cb2, cb3, cb4, cb5 +DIM Shared AS Integer dc1, dc2, dc3, dc4, dc5, dc6, w1, b1, w2, b2, w3, b3, w4, b4, fw1, fb1, fw2, fb2, fw3, fb3, fw4, fb4, row, col, index, count +DIM Shared AS Integer fw1x, fw1y, fb1x, fb1y, fw2x, fw2y, fb2x, fb2y, fw3x, fw3y, fb3x, fb3y, fw4x, fw4y, fb4x, fb4y +DIM Shared AS Integer fig1w, fig1b, fig2w, fig2b, fig3w, fig3b, fig4w, fig4b, mas1, mas2, mas3, mas4, mas5, mas6, mas7, mas8, mas9, mas0, lin1, lin2, lin3, lin4, lin5, lin6, lin7, lin8, lin9, lin0', fen +cd1 = 2:cd2 = 15:cn = 7:cll = 14:cf = 1:cb1 = 7:cb2 = 6:cb3 = 3:cb4 = 13:cb5 = 9 + +Dim Shared board(8, 8) As Integer +index = 100 +For row = 1 To 8: For col = 1 To 8 + board(row, col) = index + 1 + index = index + 1 +Next col: Next row + +Dim Shared xiabo(10, 9) As Integer +index = 100 +For row = 1 To 10: For col = 1 To 9 + xiabo(row, col) = index + 1 + index = index + 1 +Next col: Next row + +Dim Shared shobo(9, 9) As Integer +index = 100 +For row = 1 To 9: For col = 1 To 9 + shobo(row, col) = index + 1 + index = index + 1 +Next col: Next row + +Dim Shared drabo(10, 10) As Integer +index = 100 +For row = 1 To 10: For col = 1 To 10 + drabo(row, col) = index + 1 + index = index + 1 +Next col:index = index + 1: Next row + +Line (2, 2)-(122, 4), 14, BF: Line -(120, 338), 14, BF: Line -(2, 336), 14, BF: Line -(4, 2), 14, BF +Line (4, 42)-(120, 44), 14, BF: Paint (20, 20), 8, 14 +Line (128, 2)-(248, 4), 14, BF: Line -(246, 338), 14, BF: Line -(128, 336), 14, BF: Line -(130, 2), 14, BF +Line (130, 42)-(246, 44), 14, BF: Paint (160, 20), 8, 14 +Line (254, 2)-(394, 4), 14, BF: Line -(392, 386), 14, BF: Line -(254, 384), 14, BF: Line -(256, 2), 14, BF +Line (256, 42)-(392, 44), 14, BF: Paint (300, 20), 8, 14 +Line (400, 2)-(637, 4), 14, BF: Line -(635, 338), 14, BF: Line -(400, 336), 14, BF: Line -(402, 2), 14, BF +Line (402, 42)-(635, 44), 14, BF: Paint (440, 20), 8, 14 +Line (2, 344)-(248, 346), 14, BF: Line -(246, 432), 14, BF: Line -(2, 430), 14, BF: Line -(4, 344), 14, BF +Line (4, 378)-(246, 376), 14, BF: Paint (20, 360), 8, 14 +Color 14, 8: Locate 2, 4: Print "1 - Chess": Locate 2, 19: Print "2 - Makruk": Locate 2, 36: Print "3 - Xiangqi": Locate 2, 61: Print "4 - Shogi": Locate 23, 10: Print "5 - Draughts" +Color 12, 0: Locate 23, 52: Print "Press number to select game": Locate 24, 59: Print "or Esc to exit" + +Color 11, 0 +x = 10: For y = 50 To 300 Step 48 + cells +Next y +x = 10:y = 50: king +x = 10:y = y + 48: queen +x = 10:y = y + 48: bishop +x = 10:y = y + 48: knight +x = 10:y = y + 48: rook +x = 10:y = y + 48: pawn +Locate 5, 9: Print "King": Locate 8, 9: Print "Queen" +Locate 11, 9: Print "Bishop": Locate 14, 9: Print "Knight" +Locate 17, 9: Print "Rook": Locate 20, 9: Print "Pawn" +x = 136: For y = 50 To 300 Step 48 + cells +Next y +x = 136:y = 50: king +x = 136:y = y + 48: queen +x = 136:y = y + 48: bishop +x = 136:y = y + 48: knight +x = 136:y = y + 48: rook +x = 136:y = y + 48: checker +Locate 5, 25: Print "Lord": Locate 8, 25: Print "Seed" +Locate 11, 25: Print "Noble": Locate 14, 25: Print "Horse" +Locate 17, 25: Print "Boat": Locate 20, 25: Print "Shell" +x = 262: For y = 50 To 350 Step 48 + cells +Next y +x = 262:y = 50: king +x = 262:y = y + 48: queen +x = 262:y = y + 48: bishop +x = 262:y = y + 48: knight +x = 262:y = y + 48: rook +x = 262:y = y + 48: cannon +x = 262:y = y + 48: pawn +Locate 5, 41: Print "General": Locate 8, 41: Print "Advisor" +Locate 11, 41: Print "Elephant": Locate 14, 41: Print "Horse" +Locate 17, 41: Print "Chariot": Locate 20, 41: Print "Cannon" +Locate 23, 41: Print "Soldier" +x = 408: For y = 50 To 300 Step 48 + cells +Next y +x = 528: For y = 50 To 250 Step 48 + cells +Next y +x = 408:y = 50: king +x = 408:y = y + 48: queen +x = 408:y = y + 48: general +x = 408:y = y + 48: bishop +x = 408:y = y + 48: knight +x = 408:y = y + 48: rook +x = 528:y = 50: lance +x = 528:y = y + 48: pawn +x = 528:y = y + 48: horse +x = 528:y = y + 48: dragon +x = 528:y = y + 48: tokin +Locate 5, 59: Print "King": Locate 8, 59: Print "Gold" +Locate 11, 59: Print "Silver": Locate 14, 59: Print "Bishop" +Locate 17, 59: Print "Knight": Locate 20, 59: Print "Rook" +Locate 5, 74: Print "Lance": Locate 8, 74: Print "Pawn" +Locate 11, 74: Print "Horse": Locate 14, 74: Print "Dragon" +Locate 17, 74: Print "Tokin" +x = 10:y = 384 + cells () + checker () +x = 136:y = 384 + cells () + dame () +Locate 26, 9: Print "Checker": Locate 26, 25: Print "Dame" + +Do + Select Case InKey$ + Case Is = Chr$(49) + CLS + message () + chessboard () + dices () + chess () + Case Is = Chr$(50) + CLS + message () + makrukboard () + dices () + makruk () + Case Is = Chr$(51) + CLS + message () + xiangqiboard () + dices () + xiangqi () + Case Is = Chr$(52) + CLS + message () + shogiboard () + dices () + shogi () + Case Is = Chr$(53) + CLS + message () + draughtsboard () + dices () + draughts () + Case Is = Chr$(27) + Exit Do + End Select +Loop +End + +Sub dice1 () + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF +End Sub + +Sub dice2 () + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF +End Sub + +Sub dice3 () + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF +End Sub + +Sub dice4 () + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice5 () + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice6 () + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice7 () + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice8 () + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (16 + x, 4 + y)-(24 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (16 + x, 28 + y)-(24 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice9 () + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (16 + x, 4 + y)-(24 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (16 + x, 28 + y)-(24 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice0 () + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF + Line (16 + x, 1 + y)-(24 + x, 9 + y), cd2, BF + Line (16 + x, 11 + y)-(24 + x, 19 + y), cd2, BF + Line (16 + x, 21 + y)-(24 + x, 29 + y), cd2, BF + Line (16 + x, 31 + y)-(24 + x, 39 + y), cd2, BF +End Sub + +Sub number1 () + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (5 + x, 8 + y)-(6 + x, 1 + y), cn, BF + Line (4 + x, 2 + y)-(1 + x, 5 + y), cn + Line (4 + x, 3 + y)-(1 + x, 6 + y), cn +End Sub + +Sub number2 () + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (1 + x, 8 + y)-(2 + x, 7 + y), cn, BF + Line (10 + x, 4 + y)-(9 + x, 3 + y), cn, BF +End Sub + +Sub number3 () + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (2 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (5 + x, 5 + y)-(9 + x, 6 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 4 + y), cn, BF + Line (9 + x, 7 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub number4 () + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 1 + y)-(2 + x, 4 + y), cn, BF + Line (9 + x, 1 + y)-(10 + x, 10 + y), cn, BF +End Sub + +Sub number5 () + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 8 + y)-(9 + x, 7 + y), cn, BF + Line (2 + x, 4 + y)-(1 + x, 3 + y), cn, BF +End Sub + +Sub number6 () + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 8 + y)-(9 + x, 7 + y), cn, BF + Line (1 + x, 8 + y)-(2 + x, 3 + y), cn, BF +End Sub + +Sub number7 () + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 3 + y)-(3 + x, 10 + y), cn + Line (9 + x, 3 + y)-(2 + x, 10 + y), cn + Line (8 + x, 3 + y)-(1 + x, 10 + y), cn +End Sub + +Sub number8 () + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (2 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (2 + x, 6 + y)-(9 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(2 + x, 4 + y), cn, BF + Line (1 + x, 7 + y)-(2 + x, 9 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 4 + y), cn, BF + Line (9 + x, 7 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub number9 () + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 8 + y)-(9 + x, 3 + y), cn, BF + Line (2 + x, 4 + y)-(1 + x, 3 + y), cn, BF +End Sub + +Sub number0 () + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (2 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (1 + x, 2 + y)-(2 + x, 9 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub numberA () + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(2 + x, 10 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 10 + y), cn, BF + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF +End Sub + +Sub numberB () + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (1 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(9 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 4 + y), cn, BF + Line (9 + x, 7 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub numberC () + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (1 + x, 1 + y)-(10 + x, 2 + y), cn, BF + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub numberD () + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (2 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub numberE () + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF +End Sub + +Sub numberF () + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF +End Sub + +Sub numberG () + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (8 + x, 6 + y)-(6 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 8 + y)-(9 + x, 5 + y), cn, BF + Line (1 + x, 8 + y)-(2 + x, 3 + y), cn, BF +End Sub + +Sub numberH () + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (9 + x, 1 + y)-(10 + x, 10 + y), cn, BF +End Sub + +Sub numberI () + Line (3 + x, 2 + y)-(8 + x, 1 + y), cn, BF + Line (3 + x, 10 + y)-(8 + x, 9 + y), cn, BF + Line (5 + x, 3 + y)-(6 + x, 8 + y), cn, BF +End Sub + +Sub numberJ () + Line (1 + x, 6 + y)-(2 + x, 9 + y), cn, BF + Line (9 + x, 1 + y)-(10 + x, 9 + y), cn, BF + Line (2 + x, 9 + y)-(9 + x, 10 + y), cn, BF +End Sub + +Sub letter1 () + Line (4 + x, 36 + y)-(36 + x, 32 + y), cll, BF + Line (18 + x, 31 + y)-(22 + x, 4 + y), cll, BF + Line (17 + x, 4 + y)-(4 + x, 17 + y), cll + Line (17 + x, 5 + y)-(5 + x, 17 + y), cll + Line (17 + x, 6 + y)-(6 + x, 17 + y), cll + Line (17 + x, 7 + y)-(7 + x, 17 + y), cll +End Sub + +Sub letter2 () + Line (4 + x, 4 + y)-(36 + x, 8 + y), cll, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cll, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cll, BF + Line (32 + x, 9 + y)-(36 + x, 17 + y), cll, BF + Line (4 + x, 23 + y)-(8 + x, 31 + y), cll, BF +End Sub + +Sub letter3 () + Line (4 + x, 4 + y)-(34 + x, 8 + y), cll, BF + Line (4 + x, 36 + y)-(34 + x, 32 + y), cll, BF + Line (36 + x, 23 + y)-(32 + x, 34 + y), cll, BF + Line (32 + x, 6 + y)-(36 + x, 17 + y), cll, BF + Line (18 + x, 18 + y)-(34 + x, 22 + y), cll, BF + Line (30 + x, 17 + y)-(31 + x, 17 + y), cll + Line (30 + x, 23 + y)-(31 + x, 23 + y), cll + Line (30 + x, 9 + y)-(31 + x, 9 + y), cll + Line (30 + x, 31 + y)-(31 + x, 31 + y), cll + PSet (31 + x, 10 + y), cll: PSet (31 + x, 30 + y), cll + PSet (31 + x, 16 + y), cll: PSet (31 + x, 24 + y), cll + PSet (35 + x, 18 + y), cll: PSet (35 + x, 22 + y), cll + PSet (35 + x, 5 + y), cll: PSet (35 + x, 35 + y), cll +End Sub + +Sub letter4 () + Line (4 + x, 4 + y)-(8 + x, 17 + y), cll, BF + Line (32 + x, 4 + y)-(36 + x, 36 + y), cll, BF + Line (4 + x, 18 + y)-(34 + x, 22 + y), cll, BF +End Sub + +Sub letter5 () + Line (4 + x, 4 + y)-(36 + x, 8 + y), cll, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cll, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cll, BF + Line (4 + x, 9 + y)-(8 + x, 17 + y), cll, BF + Line (32 + x, 23 + y)-(36 + x, 31 + y), cll, BF +End Sub + +Sub letter6 () + Line (4 + x, 4 + y)-(36 + x, 8 + y), cll, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cll, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cll, BF + Line (4 + x, 9 + y)-(8 + x, 31 + y), cll, BF + Line (32 + x, 23 + y)-(36 + x, 31 + y), cll, BF +End Sub + +Sub letter7 () + Line (4 + x, 4 + y)-(36 + x, 8 + y), cll, BF + Line (8 + x, 36 + y)-(35 + x, 9 + y), cll + Line (7 + x, 36 + y)-(34 + x, 9 + y), cll + Line (6 + x, 36 + y)-(33 + x, 9 + y), cll + Line (5 + x, 36 + y)-(32 + x, 9 + y), cll +End Sub + +Sub letter8 () + Line (8 + x, 23 + y)-(4 + x, 34 + y), cll, BF + Line (4 + x, 6 + y)-(8 + x, 17 + y), cll, BF + Line (6 + x, 4 + y)-(34 + x, 8 + y), cll, BF + Line (6 + x, 36 + y)-(34 + x, 32 + y), cll, BF + Line (36 + x, 23 + y)-(32 + x, 34 + y), cll, BF + Line (32 + x, 6 + y)-(36 + x, 17 + y), cll, BF + Line (6 + x, 18 + y)-(34 + x, 22 + y), cll, BF + Line (30 + x, 17 + y)-(31 + x, 17 + y), cll + Line (30 + x, 23 + y)-(31 + x, 23 + y), cll + Line (10 + x, 17 + y)-(9 + x, 17 + y), cll + Line (10 + x, 23 + y)-(9 + x, 23 + y), cll + Line (9 + x, 31 + y)-(10 + x, 31 + y), cll + Line (30 + x, 31 + y)-(31 + x, 31 + y), cll + Line (9 + x, 9 + y)-(10 + x, 9 + y), cll + Line (30 + x, 9 + y)-(31 + x, 9 + y), cll + PSet (35 + x, 5 + y), cll: PSet (35 + x, 35 + y), cll + PSet (5 + x, 5 + y), cll: PSet (5 + x, 35 + y), cll + PSet (9 + x, 30 + y), cll: PSet (31 + x, 30 + y), cll + PSet (9 + x, 10 + y), cll: PSet (31 + x, 10 + y), cll + PSet (5 + x, 18 + y), cll: PSet (5 + x, 22 + y), cll + PSet (9 + x, 16 + y), cll: PSet (9 + x, 24 + y), cll + PSet (31 + x, 16 + y), cll: PSet (31 + x, 24 + y), cll + PSet (35 + x, 18 + y), cll: PSet (35 + x, 22 + y), cll +End Sub + +Sub letter9 () + Line (4 + x, 4 + y)-(36 + x, 8 + y), cll, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cll, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cll, BF + Line (32 + x, 9 + y)-(36 + x, 31 + y), cll, BF +End Sub + +Sub letter0 () + Line (6 + x, 4 + y)-(34 + x, 8 + y), cll, BF + Line (6 + x, 36 + y)-(34 + x, 32 + y), cll, BF + Line (4 + x, 6 + y)-(8 + x, 34 + y), cll, BF + Line (36 + x, 6 + y)-(32 + x, 34 + y), cll, BF + Line (9 + x, 9 + y)-(10 + x, 9 + y), cll + Line (30 + x, 9 + y)-(31 + x, 9 + y), cll + Line (9 + x, 31 + y)-(10 + x, 31 + y), cll + Line (30 + x, 31 + y)-(31 + x, 31 + y), cll + Line (9 + x, 9 + y)-(10 + x, 9 + y), cll + Line (30 + x, 9 + y)-(31 + x, 9 + y), cll + PSet (35 + x, 5 + y), cll: PSet (35 + x, 35 + y), cll + PSet (5 + x, 5 + y), cll: PSet (5 + x, 35 + y), cll + PSet (9 + x, 30 + y), cll: PSet (31 + x, 30 + y), cll + PSet (9 + x, 10 + y), cll: PSet (31 + x, 10 + y), cll +End Sub + +Sub letterA () + Line (4 + x, 6 + y)-(8 + x, 36 + y), cll, BF + Line (32 + x, 6 + y)-(36 + x, 36 + y), cll, BF + Line (4 + x, 18 + y)-(34 + x, 22 + y), cll, BF + Line (6 + x, 4 + y)-(34 + x, 8 + y), cll, BF + Line (30 + x, 9 + y)-(31 + x, 9 + y), cll + Line (9 + x, 9 + y)-(10 + x, 9 + y), cll + PSet (9 + x, 10 + y), cll: PSet (31 + x, 10 + y), cll + PSet (5 + x, 5 + y), cll: PSet (35 + x, 5 + y), cll +End Sub + +Sub letterB () + Line (4 + x, 9 + y)-(8 + x, 31 + y), cll, BF + Line (4 + x, 4 + y)-(34 + x, 8 + y), cll, BF + Line (4 + x, 36 + y)-(34 + x, 32 + y), cll, BF + Line (36 + x, 23 + y)-(32 + x, 34 + y), cll, BF + Line (32 + x, 6 + y)-(36 + x, 17 + y), cll, BF + Line (9 + x, 18 + y)-(34 + x, 22 + y), cll, BF + Line (30 + x, 17 + y)-(31 + x, 17 + y), cll + Line (30 + x, 23 + y)-(31 + x, 23 + y), cll + Line (30 + x, 9 + y)-(31 + x, 9 + y), cll + Line (30 + x, 31 + y)-(31 + x, 31 + y), cll + PSet (31 + x, 10 + y), cll: PSet (31 + x, 30 + y), cll + PSet (31 + x, 16 + y), cll: PSet (31 + x, 24 + y), cll + PSet (35 + x, 18 + y), cll: PSet (35 + x, 22 + y), cll + PSet (35 + x, 5 + y), cll: PSet (35 + x, 35 + y), cll +End Sub + +Sub letterC () + Line (6 + x, 4 + y)-(36 + x, 8 + y), cll, BF + Line (6 + x, 36 + y)-(36 + x, 32 + y), cll, BF + Line (4 + x, 6 + y)-(8 + x, 34 + y), cll, BF + Line (9 + x, 9 + y)-(10 + x, 9 + y), cll + Line (9 + x, 31 + y)-(10 + x, 31 + y), cll + PSet (9 + x, 10 + y), cll: PSet (9 + x, 30 + y), cll + PSet (5 + x, 5 + y), cll: PSet (5 + x, 35 + y), cll +End Sub + +Sub letterD () + Line (4 + x, 4 + y)-(34 + x, 8 + y), cll, BF + Line (4 + x, 36 + y)-(34 + x, 32 + y), cll, BF + Line (4 + x, 4 + y)-(8 + x, 36 + y), cll, BF + Line (32 + x, 6 + y)-(36 + x, 34 + y), cll, BF + Line (30 + x, 9 + y)-(31 + x, 9 + y), cll + Line (30 + x, 31 + y)-(31 + x, 31 + y), cll + PSet (31 + x, 10 + y), cll: PSet (31 + x, 30 + y), cll + PSet (35 + x, 5 + y), cll: PSet (35 + x, 35 + y), cll +End Sub + +Sub letterE () + Line (4 + x, 4 + y)-(36 + x, 8 + y), cll, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cll, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cll, BF + Line (4 + x, 4 + y)-(8 + x, 36 + y), cll, BF +End Sub + +Sub letterF () + Line (4 + x, 4 + y)-(36 + x, 8 + y), cll, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cll, BF + Line (4 + x, 4 + y)-(8 + x, 36 + y), cll, BF +End Sub + +Sub letterG () + Line (4 + x, 4 + y)-(36 + x, 8 + y), cll, BF + Line (20 + x, 18 + y)-(36 + x, 22 + y), cll, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cll, BF + Line (4 + x, 9 + y)-(8 + x, 31 + y), cll, BF + Line (32 + x, 23 + y)-(36 + x, 31 + y), cll, BF +End Sub + +Sub letterH () + Line (4 + x, 4 + y)-(8 + x, 36 + y), cll, BF + Line (32 + x, 4 + y)-(36 + x, 36 + y), cll, BF + Line (4 + x, 18 + y)-(34 + x, 22 + y), cll, BF +End Sub + +Sub letterI () + Line (8 + x, 36 + y)-(32 + x, 32 + y), cll, BF + Line (18 + x, 31 + y)-(22 + x, 9 + y), cll, BF + Line (8 + x, 8 + y)-(32 + x, 3 + y), cll, BF +End Sub + +Sub letterJ () + Line (6 + x, 36 + y)-(34 + x, 32 + y), cll, BF + Line (32 + x, 4 + y)-(36 + x, 34 + y), cll, BF + Line (4 + x, 18 + y)-(8 + x, 34 + y), cll, BF + Line (9 + x, 31 + y)-(10 + x, 31 + y), cll + Line (30 + x, 31 + y)-(31 + x, 31 + y), cll + PSet (9 + x, 30 + y), cll: PSet (31 + x, 30 + y), cll + PSet (5 + x, 35 + y), cll: PSet (35 + x, 35 + y), cll +End Sub + +Sub king () + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (12 + x, 31 + y)-(28 + x, 31 + y), cf + Line (13 + x, 30 + y)-(27 + x, 30 + y), cf + Line (14 + x, 29 + y)-(26 + x, 29 + y), cf + Line (15 + x, 28 + y)-(25 + x, 28 + y), cf + Line (16 + x, 27 + y)-(24 + x, 10 + y), cf, BF + Line (15 + x, 24 + y)-(25 + x, 24 + y), cf + Line (14 + x, 23 + y)-(26 + x, 23 + y), cf + Line (13 + x, 22 + y)-(27 + x, 22 + y), cf + Line (12 + x, 21 + y)-(28 + x, 21 + y), cf + Line (11 + x, 20 + y)-(29 + x, 20 + y), cf + Line (10 + x, 19 + y)-(30 + x, 19 + y), cf + Line (9 + x, 18 + y)-(31 + x, 18 + y), cf + Line (8 + x, 17 + y)-(32 + x, 17 + y), cf + Line (7 + x, 16 + y)-(33 + x, 16 + y), cf + Line (6 + x, 15 + y)-(34 + x, 15 + y), cf + Line (5 + x, 14 + y)-(35 + x, 14 + y), cf + Line (4 + x, 13 + y)-(36 + x, 12 + y), cf, BF + Line (4 + x, 11 + y)-(14 + x, 10 + y), cf, BF + Line (5 + x, 9 + y)-(13 + x, 9 + y), cf + Line (6 + x, 8 + y)-(12 + x, 8 + y), cf + Line (7 + x, 7 + y)-(11 + x, 7 + y), cf + Line (26 + x, 11 + y)-(36 + x, 10 + y), cf, BF + Line (27 + x, 9 + y)-(35 + x, 9 + y), cf + Line (28 + x, 8 + y)-(34 + x, 8 + y), cf + Line (29 + x, 7 + y)-(33 + x, 7 + y), cf + Line (17 + x, 9 + y)-(23 + x, 8 + y), cf, BF + Line (18 + x, 7 + y)-(22 + x, 6 + y), cf, BF + Line (19 + x, 5 + y)-(21 + x, 4 + y), cf, BF +End Sub + +Sub queen () + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 14 + y), cf, BF + Line (11 + x, 24 + y)-(29 + x, 24 + y), cf + Line (10 + x, 23 + y)-(30 + x, 23 + y), cf + Line (9 + x, 22 + y)-(31 + x, 22 + y), cf + Line (8 + x, 21 + y)-(32 + x, 21 + y), cf + Line (7 + x, 20 + y)-(33 + x, 20 + y), cf + Line (6 + x, 19 + y)-(34 + x, 18 + y), cf, BF + Line (6 + x, 17 + y)-(7 + x, 10 + y), cf, BF + Line (5 + x, 11 + y)-(8 + x, 14 + y), cf, BF + Line (4 + x, 12 + y)-(9 + x, 13 + y), cf, BF + Line (34 + x, 17 + y)-(33 + x, 10 + y), cf, BF + Line (35 + x, 11 + y)-(32 + x, 14 + y), cf, BF + Line (36 + x, 12 + y)-(31 + x, 13 + y), cf, BF + Line (12 + x, 13 + y)-(13 + x, 6 + y), cf, BF + Line (11 + x, 7 + y)-(14 + x, 10 + y), cf, BF + Line (10 + x, 8 + y)-(15 + x, 9 + y), cf, BF + Line (27 + x, 13 + y)-(28 + x, 6 + y), cf, BF + Line (26 + x, 7 + y)-(29 + x, 10 + y), cf, BF + Line (25 + x, 8 + y)-(30 + x, 9 + y), cf, BF + Line (19 + x, 13 + y)-(21 + x, 4 + y), cf, BF + Line (18 + x, 5 + y)-(22 + x, 8 + y), cf, BF + Line (17 + x, 6 + y)-(23 + x, 7 + y), cf, BF +End Sub + +Sub bishop () + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (18 + x, 31 + y)-(22 + x, 6 + y), cf, BF + Line (19 + x, 5 + y)-(21 + x, 4 + y), cf, BF + Line (12 + x, 31 + y)-(28 + x, 31 + y), cf + Line (13 + x, 30 + y)-(27 + x, 30 + y), cf + Line (14 + x, 29 + y)-(26 + x, 29 + y), cf + Line (15 + x, 28 + y)-(25 + x, 28 + y), cf + Line (16 + x, 27 + y)-(24 + x, 27 + y), cf + Line (17 + x, 26 + y)-(23 + x, 26 + y), cf + Line (17 + x, 21 + y)-(23 + x, 8 + y), cf, BF + Line (16 + x, 19 + y)-(24 + x, 10 + y), cf, BF + Line (15 + x, 17 + y)-(25 + x, 12 + y), cf, BF + Line (14 + x, 15 + y)-(26 + x, 14 + y), cf, BF +End Sub + +Sub knight () + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (12 + x, 31 + y)-(28 + x, 31 + y), cf + Line (13 + x, 30 + y)-(29 + x, 30 + y), cf + Line (14 + x, 29 + y)-(30 + x, 29 + y), cf + Line (15 + x, 28 + y)-(31 + x, 28 + y), cf + Line (16 + x, 27 + y)-(32 + x, 27 + y), cf + Line (17 + x, 26 + y)-(33 + x, 26 + y), cf + Line (18 + x, 25 + y)-(34 + x, 25 + y), cf + Line (19 + x, 24 + y)-(35 + x, 24 + y), cf + Line (20 + x, 23 + y)-(36 + x, 18 + y), cf, BF + Line (4 + x, 17 + y)-(35 + x, 17 + y), cf + Line (4 + x, 16 + y)-(34 + x, 16 + y), cf + Line (5 + x, 15 + y)-(33 + x, 15 + y), cf + Line (6 + x, 14 + y)-(32 + x, 14 + y), cf + Line (7 + x, 13 + y)-(31 + x, 13 + y), cf + Line (8 + x, 12 + y)-(30 + x, 12 + y), cf + Line (9 + x, 11 + y)-(29 + x, 11 + y), cf + Line (10 + x, 10 + y)-(28 + x, 10 + y), cf + Line (11 + x, 9 + y)-(27 + x, 9 + y), cf + Line (12 + x, 8 + y)-(26 + x, 8 + y), cf + Line (13 + x, 7 + y)-(25 + x, 7 + y), cf + Line (14 + x, 6 + y)-(24 + x, 6 + y), cf + Line (15 + x, 5 + y)-(23 + x, 5 + y), cf + Line (16 + x, 4 + y)-(22 + x, 4 + y), cf +End Sub + +Sub rook () + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (4 + x, 4 + y)-(8 + x, 12 + y), cf, BF + Line (13 + x, 4 + y)-(17 + x, 12 + y), cf, BF + Line (23 + x, 4 + y)-(27 + x, 12 + y), cf, BF + Line (32 + x, 4 + y)-(36 + x, 12 + y), cf, BF + Line (4 + x, 12 + y)-(36 + x, 16 + y), cf, BF + Line (12 + x, 16 + y)-(28 + x, 32 + y), cf, BF + Line (9 + x, 16 + y)-(11 + x, 16 + y), cf + Line (29 + x, 16 + y)-(31 + x, 16 + y), cf + Line (10 + x, 17 + y)-(11 + x, 17 + y), cf + Line (29 + x, 17 + y)-(30 + x, 17 + y), cf + PSet (11 + x, 18 + y), cf: PSet (29 + x, 18 + y), cf + Line (9 + x, 31 + y)-(11 + x, 31 + y), cf + Line (29 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(11 + x, 30 + y), cf + Line (29 + x, 30 + y)-(30 + x, 30 + y), cf + PSet (11 + x, 29 + y), cf: PSet (29 + x, 29 + y), cf +End Sub + +Sub pawn () + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (18 + x, 32 + y)-(22 + x, 4 + y), cf, BF + Line (12 + x, 9 + y)-(28 + x, 14 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 26 + y), cf + Line (15 + x, 25 + y)-(25 + x, 25 + y), cf + Line (16 + x, 24 + y)-(24 + x, 24 + y), cf + Line (17 + x, 23 + y)-(23 + x, 23 + y), cf + Line (17 + x, 19 + y)-(23 + x, 19 + y), cf + Line (16 + x, 18 + y)-(24 + x, 18 + y), cf + Line (15 + x, 17 + y)-(25 + x, 17 + y), cf + Line (14 + x, 16 + y)-(26 + x, 16 + y), cf + Line (13 + x, 15 + y)-(27 + x, 15 + y), cf + Line (13 + x, 8 + y)-(27 + x, 8 + y), cf + Line (14 + x, 7 + y)-(26 + x, 7 + y), cf + Line (15 + x, 6 + y)-(25 + x, 6 + y), cf + Line (16 + x, 5 + y)-(24 + x, 5 + y), cf + Line (17 + x, 4 + y)-(23 + x, 4 + y), cf +End Sub + +Sub cannon () + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 26 + y), cf + Line (15 + x, 25 + y)-(25 + x, 25 + y), cf + Line (16 + x, 24 + y)-(24 + x, 4 + y), cf, BF + Line (6 + x, 9 + y)-(36 + x, 12 + y), cf, BF + Line (4 + x, 10 + y)-(6 + x, 11 + y), cf, BF + Line (14 + x, 16 + y)-(25 + x, 16 + y), cf + Line (12 + x, 15 + y)-(26 + x, 15 + y), cf + Line (10 + x, 14 + y)-(27 + x, 14 + y), cf + Line (8 + x, 13 + y)-(28 + x, 13 + y), cf + Line (8 + x, 8 + y)-(28 + x, 8 + y), cf + Line (10 + x, 7 + y)-(27 + x, 7 + y), cf + Line (12 + x, 6 + y)-(26 + x, 6 + y), cf + Line (14 + x, 5 + y)-(25 + x, 5 + y), cf + Line (16 + x, 4 + y)-(24 + x, 4 + y), cf +End Sub + +Sub general () + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 26 + y), cf + Line (13 + x, 25 + y)-(27 + x, 22 + y), cf, BF + Line (16 + x, 21 + y)-(24 + x, 20 + y), cf, BF + Line (18 + x, 19 + y)-(22 + x, 12 + y), cf, BF + Line (19 + x, 11 + y)-(21 + x, 4 + y), cf, BF + Line (18 + x, 10 + y)-(22 + x, 5 + y), cf, BF + Line (17 + x, 9 + y)-(23 + x, 6 + y), cf, BF + Line (16 + x, 8 + y)-(24 + x, 7 + y), cf, BF + Line (15 + x, 20 + y)-(16 + x, 19 + y), cf, BF + Line (14 + x, 19 + y)-(15 + x, 18 + y), cf, BF + Line (13 + x, 18 + y)-(14 + x, 17 + y), cf, BF + Line (24 + x, 20 + y)-(25 + x, 19 + y), cf, BF + Line (25 + x, 19 + y)-(26 + x, 18 + y), cf, BF + Line (26 + x, 18 + y)-(27 + x, 17 + y), cf, BF + Line (11 + x, 18 + y)-(12 + x, 11 + y), cf, BF + Line (10 + x, 17 + y)-(13 + x, 12 + y), cf, BF + Line (9 + x, 16 + y)-(14 + x, 13 + y), cf, BF + Line (8 + x, 15 + y)-(15 + x, 14 + y), cf, BF + Line (28 + x, 18 + y)-(29 + x, 11 + y), cf, BF + Line (27 + x, 17 + y)-(30 + x, 12 + y), cf, BF + Line (26 + x, 16 + y)-(31 + x, 13 + y), cf, BF + Line (25 + x, 15 + y)-(32 + x, 14 + y), cf, BF + Line (4 + x, 24 + y)-(36 + x, 23 + y), cf, BF + Line (29 + x, 25 + y)-(35 + x, 22 + y), cf, BF + Line (30 + x, 26 + y)-(34 + x, 21 + y), cf, BF + Line (31 + x, 27 + y)-(33 + x, 20 + y), cf, BF + Line (5 + x, 25 + y)-(11 + x, 22 + y), cf, BF + Line (6 + x, 26 + y)-(10 + x, 21 + y), cf, BF + Line (7 + x, 27 + y)-(9 + x, 20 + y), cf, BF +End Sub + +Sub tokin () + Line (10 + x, 10 + y)-(30 + x, 30 + y), cf, BF + Line (4 + x, 4 + y)-(5 + x, 5 + y), cf, BF + Line (5 + x, 5 + y)-(7 + x, 7 + y), cf, BF + Line (6 + x, 6 + y)-(9 + x, 9 + y), cf, BF + Line (7 + x, 7 + y)-(11 + x, 11 + y), cf, BF + Line (8 + x, 8 + y)-(12 + x, 12 + y), cf, BF + Line (36 + x, 4 + y)-(35 + x, 5 + y), cf, BF + Line (35 + x, 5 + y)-(33 + x, 7 + y), cf, BF + Line (34 + x, 6 + y)-(31 + x, 9 + y), cf, BF + Line (33 + x, 7 + y)-(29 + x, 11 + y), cf, BF + Line (32 + x, 8 + y)-(28 + x, 12 + y), cf, BF + Line (36 + x, 36 + y)-(35 + x, 35 + y), cf, BF + Line (35 + x, 35 + y)-(33 + x, 33 + y), cf, BF + Line (34 + x, 34 + y)-(31 + x, 31 + y), cf, BF + Line (33 + x, 33 + y)-(29 + x, 29 + y), cf, BF + Line (32 + x, 32 + y)-(28 + x, 28 + y), cf, BF + Line (4 + x, 36 + y)-(5 + x, 35 + y), cf, BF + Line (5 + x, 35 + y)-(7 + x, 33 + y), cf, BF + Line (6 + x, 34 + y)-(9 + x, 31 + y), cf, BF + Line (7 + x, 33 + y)-(11 + x, 29 + y), cf, BF + Line (8 + x, 32 + y)-(12 + x, 28 + y), cf, BF + Line (17 + x, 9 + y)-(23 + x, 8 + y), cf, BF + Line (18 + x, 7 + y)-(22 + x, 6 + y), cf, BF + Line (19 + x, 5 + y)-(21 + x, 4 + y), cf, BF + Line (17 + x, 31 + y)-(23 + x, 32 + y), cf, BF + Line (18 + x, 33 + y)-(22 + x, 34 + y), cf, BF + Line (19 + x, 35 + y)-(21 + x, 36 + y), cf, BF + Line (8 + x, 17 + y)-(9 + x, 23 + y), cf, BF + Line (6 + x, 18 + y)-(7 + x, 22 + y), cf, BF + Line (4 + x, 19 + y)-(5 + x, 21 + y), cf, BF + Line (32 + x, 17 + y)-(31 + x, 23 + y), cf, BF + Line (34 + x, 18 + y)-(33 + x, 22 + y), cf, BF + Line (36 + x, 19 + y)-(35 + x, 21 + y), cf, BF +End Sub + +Sub lance () + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 24 + y), cf, BF + Line (15 + x, 23 + y)-(25 + x, 20 + y), cf, BF + Line (16 + x, 19 + y)-(24 + x, 16 + y), cf, BF + Line (17 + x, 15 + y)-(23 + x, 12 + y), cf, BF + Line (18 + x, 11 + y)-(22 + x, 8 + y), cf, BF + Line (19 + x, 7 + y)-(21 + x, 4 + y), cf, BF +End Sub + +Sub dragon () + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 26 + y), cf + Line (15 + x, 25 + y)-(25 + x, 25 + y), cf + Line (15 + x, 20 + y)-(25 + x, 20 + y), cf + Line (14 + x, 19 + y)-(26 + x, 19 + y), cf + Line (13 + x, 18 + y)-(27 + x, 18 + y), cf + Line (16 + x, 24 + y)-(24 + x, 8 + y), cf, BF + Line (17 + x, 7 + y)-(23 + x, 6 + y), cf, BF + Line (18 + x, 5 + y)-(22 + x, 5 + y), cf + Line (19 + x, 4 + y)-(21 + x, 4 + y), cf + Line (9 + x, 12 + y)-(31 + x, 17 + y), cf, BF + Line (10 + x, 11 + y)-(13 + x, 11 + y), cf + Line (11 + x, 10 + y)-(12 + x, 10 + y), cf + Line (27 + x, 11 + y)-(30 + x, 11 + y), cf + Line (28 + x, 10 + y)-(29 + x, 10 + y), cf + Line (10 + x, 11 + y)-(10 + x, 18 + y), cf + Line (9 + x, 12 + y)-(9 + x, 19 + y), cf + Line (8 + x, 13 + y)-(8 + x, 20 + y), cf + Line (7 + x, 14 + y)-(7 + x, 21 + y), cf + Line (6 + x, 15 + y)-(6 + x, 22 + y), cf + Line (5 + x, 16 + y)-(5 + x, 23 + y), cf + Line (4 + x, 17 + y)-(4 + x, 24 + y), cf + Line (30 + x, 11 + y)-(30 + x, 18 + y), cf + Line (31 + x, 12 + y)-(31 + x, 19 + y), cf + Line (32 + x, 13 + y)-(32 + x, 20 + y), cf + Line (33 + x, 14 + y)-(33 + x, 21 + y), cf + Line (34 + x, 15 + y)-(34 + x, 22 + y), cf + Line (35 + x, 16 + y)-(35 + x, 23 + y), cf + Line (36 + x, 17 + y)-(36 + x, 24 + y), cf +End Sub + +Sub horse () + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (10 + x, 31 + y)-(11 + x, 26 + y), cf, BF + Line (16 + x, 31 + y)-(17 + x, 26 + y), cf, BF + Line (23 + x, 31 + y)-(24 + x, 26 + y), cf, BF + Line (29 + x, 31 + y)-(30 + x, 26 + y), cf, BF + Line (8 + x, 25 + y)-(32 + x, 14 + y), cf, BF + Line (7 + x, 24 + y)-(7 + x, 15 + y), cf + Line (6 + x, 23 + y)-(6 + x, 16 + y), cf + Line (5 + x, 22 + y)-(5 + x, 17 + y), cf + Line (4 + x, 21 + y)-(4 + x, 18 + y), cf + Line (33 + x, 24 + y)-(33 + x, 15 + y), cf + Line (34 + x, 23 + y)-(34 + x, 16 + y), cf + Line (35 + x, 22 + y)-(35 + x, 17 + y), cf + Line (36 + x, 21 + y)-(36 + x, 18 + y), cf + Line (14 + x, 13 + y)-(26 + x, 10 + y), cf, BF + Line (10 + x, 9 + y)-(30 + x, 7 + y), cf, BF + Line (10 + x, 6 + y)-(13 + x, 6 + y), cf + Line (10 + x, 5 + y)-(12 + x, 5 + y), cf + Line (10 + x, 4 + y)-(11 + x, 4 + y), cf + Line (30 + x, 6 + y)-(27 + x, 6 + y), cf + Line (30 + x, 5 + y)-(28 + x, 5 + y), cf + Line (30 + x, 4 + y)-(29 + x, 4 + y), cf + Line (16 + x, 6 + y)-(24 + x, 6 + y), cf + Line (17 + x, 5 + y)-(23 + x, 5 + y), cf + Line (18 + x, 4 + y)-(22 + x, 4 + y), cf +End Sub + +Sub dame () + Line (14 + x, 36 + y)-(26 + x, 28 + y), cf, BF + Line (14 + x, 4 + y)-(26 + x, 12 + y), cf, BF + Line (4 + x, 14 + y)-(12 + x, 26 + y), cf, BF + Line (28 + x, 14 + y)-(36 + x, 26 + y), cf, BF + Line (17 + x, 36 + y)-(17 + x, 27 + y), cf + Line (16 + x, 36 + y)-(16 + x, 26 + y), cf + Line (15 + x, 36 + y)-(15 + x, 25 + y), cf + Line (14 + x, 36 + y)-(14 + x, 24 + y), cf + Line (13 + x, 35 + y)-(13 + x, 23 + y), cf + Line (12 + x, 34 + y)-(12 + x, 22 + y), cf + Line (23 + x, 36 + y)-(23 + x, 27 + y), cf + Line (24 + x, 36 + y)-(24 + x, 26 + y), cf + Line (25 + x, 36 + y)-(25 + x, 25 + y), cf + Line (26 + x, 36 + y)-(26 + x, 24 + y), cf + Line (27 + x, 35 + y)-(27 + x, 23 + y), cf + Line (28 + x, 34 + y)-(28 + x, 22 + y), cf + Line (17 + x, 4 + y)-(17 + x, 13 + y), cf + Line (16 + x, 4 + y)-(16 + x, 14 + y), cf + Line (15 + x, 4 + y)-(15 + x, 15 + y), cf + Line (14 + x, 4 + y)-(14 + x, 16 + y), cf + Line (13 + x, 5 + y)-(13 + x, 17 + y), cf + Line (12 + x, 6 + y)-(12 + x, 18 + y), cf + Line (23 + x, 4 + y)-(23 + x, 13 + y), cf + Line (24 + x, 4 + y)-(24 + x, 14 + y), cf + Line (25 + x, 4 + y)-(25 + x, 15 + y), cf + Line (26 + x, 4 + y)-(26 + x, 16 + y), cf + Line (27 + x, 5 + y)-(27 + x, 17 + y), cf + Line (28 + x, 6 + y)-(28 + x, 18 + y), cf + Line (5 + x, 13 + y)-(5 + x, 27 + y), cf + Line (6 + x, 12 + y)-(6 + x, 28 + y), cf + Line (7 + x, 11 + y)-(7 + x, 29 + y), cf + Line (8 + x, 10 + y)-(8 + x, 30 + y), cf + Line (9 + x, 9 + y)-(9 + x, 31 + y), cf + Line (10 + x, 8 + y)-(10 + x, 32 + y), cf + Line (11 + x, 7 + y)-(11 + x, 33 + y), cf + Line (35 + x, 13 + y)-(35 + x, 27 + y), cf + Line (34 + x, 12 + y)-(34 + x, 28 + y), cf + Line (33 + x, 11 + y)-(33 + x, 29 + y), cf + Line (32 + x, 10 + y)-(32 + x, 30 + y), cf + Line (31 + x, 9 + y)-(31 + x, 31 + y), cf + Line (30 + x, 8 + y)-(30 + x, 32 + y), cf + Line (29 + x, 7 + y)-(29 + x, 33 + y), cf +End Sub + +Sub checker () + Line (14 + x, 36 + y)-(26 + x, 32 + y), cf, BF + Line (14 + x, 4 + y)-(26 + x, 8 + y), cf, BF + Line (4 + x, 14 + y)-(8 + x, 26 + y), cf, BF + Line (32 + x, 14 + y)-(36 + x, 26 + y), cf, BF + Line (13 + x, 35 + y)-(13 + x, 31 + y), cf + Line (12 + x, 34 + y)-(12 + x, 30 + y), cf + Line (11 + x, 33 + y)-(11 + x, 29 + y), cf + Line (10 + x, 32 + y)-(10 + x, 28 + y), cf + Line (9 + x, 31 + y)-(9 + x, 27 + y), cf + Line (8 + x, 30 + y)-(8 + x, 26 + y), cf + Line (27 + x, 35 + y)-(27 + x, 31 + y), cf + Line (28 + x, 34 + y)-(28 + x, 30 + y), cf + Line (29 + x, 33 + y)-(29 + x, 29 + y), cf + Line (30 + x, 32 + y)-(30 + x, 28 + y), cf + Line (31 + x, 31 + y)-(31 + x, 27 + y), cf + Line (32 + x, 30 + y)-(32 + x, 26 + y), cf + Line (13 + x, 5 + y)-(13 + x, 9 + y), cf + Line (12 + x, 6 + y)-(12 + x, 10 + y), cf + Line (11 + x, 7 + y)-(11 + x, 11 + y), cf + Line (10 + x, 8 + y)-(10 + x, 12 + y), cf + Line (9 + x, 9 + y)-(9 + x, 13 + y), cf + Line (8 + x, 10 + y)-(8 + x, 14 + y), cf + Line (27 + x, 5 + y)-(27 + x, 9 + y), cf + Line (28 + x, 6 + y)-(28 + x, 10 + y), cf + Line (29 + x, 7 + y)-(29 + x, 11 + y), cf + Line (30 + x, 8 + y)-(30 + x, 12 + y), cf + Line (31 + x, 9 + y)-(31 + x, 13 + y), cf + Line (32 + x, 10 + y)-(32 + x, 14 + y), cf + Line (5 + x, 13 + y)-(5 + x, 27 + y), cf + Line (6 + x, 12 + y)-(6 + x, 28 + y), cf + Line (7 + x, 11 + y)-(7 + x, 29 + y), cf + Line (35 + x, 13 + y)-(35 + x, 27 + y), cf + Line (34 + x, 12 + y)-(34 + x, 28 + y), cf + Line (33 + x, 11 + y)-(33 + x, 29 + y), cf + Line (17 + x, 28 + y)-(23 + x, 24 + y), cf, BF + Line (17 + x, 12 + y)-(23 + x, 16 + y), cf, BF + Line (12 + x, 17 + y)-(16 + x, 23 + y), cf, BF + Line (24 + x, 17 + y)-(28 + x, 23 + y), cf, BF + Line (18 + x, 28 + y)-(18 + x, 23 + y), cf + Line (17 + x, 28 + y)-(17 + x, 22 + y), cf + Line (16 + x, 27 + y)-(16 + x, 21 + y), cf + Line (22 + x, 28 + y)-(22 + x, 23 + y), cf + Line (23 + x, 28 + y)-(23 + x, 22 + y), cf + Line (24 + x, 27 + y)-(24 + x, 21 + y), cf + Line (18 + x, 12 + y)-(18 + x, 17 + y), cf + Line (17 + x, 12 + y)-(17 + x, 18 + y), cf + Line (16 + x, 13 + y)-(16 + x, 19 + y), cf + Line (22 + x, 12 + y)-(22 + x, 17 + y), cf + Line (23 + x, 12 + y)-(23 + x, 18 + y), cf + Line (24 + x, 13 + y)-(24 + x, 19 + y), cf + Line (13 + x, 16 + y)-(13 + x, 24 + y), cf + Line (14 + x, 15 + y)-(14 + x, 25 + y), cf + Line (15 + x, 14 + y)-(15 + x, 26 + y), cf + Line (27 + x, 16 + y)-(27 + x, 24 + y), cf + Line (26 + x, 15 + y)-(26 + x, 25 + y), cf + Line (25 + x, 14 + y)-(25 + x, 26 + y), cf +End Sub + +Sub cells () + Line (x, y)-(x + 40, y + 40), cd1, BF + Line (x - 1, y - 1)-(x + 41, y + 41), cb1, B +End Sub + +Sub dices () + Line (20, 160)-(60, 200), cd1, BF + Line (20, 220)-(60, 260), cd1, BF + Line (20, 280)-(60, 320), cd1, BF + Line (580, 160)-(620, 200), cd1, BF + Line (580, 220)-(620, 260), cd1, BF + Line (580, 280)-(620, 320), cd1, BF + Line (19, 159)-(61, 201), cb1, B + Line (19, 219)-(61, 261), cb1, B + Line (19, 279)-(61, 321), cb1, B + Line (579, 159)-(621, 201), cb1, B + Line (579, 219)-(621, 261), cb1, B + Line (579, 279)-(621, 321), cb1, B +End Sub + +Sub chessboard () + Line (160, 80)-(480, 400), cb2, BF + For x = 160 To 480 Step 40 + Line (x, 80)-(x, 400), cb1 + Next x + For y = 80 To 400 Step 40 + Line (160, y)-(480, y), cb1 + Next y + For y = 320 To 80 Step -80: For x = 400 To 160 Step -80 + Line (x + 1, y + 1)-(x + 39, y + 39), cb3, BF + Line (x + 41, y + 41)-(x + 79, y + 79), cb3, BF + Next x: Next y + y = 405 + x = 175: numberA + x = 215: numberB + x = 255: numberC + x = 295: numberD + x = 335: numberE + x = 375: numberF + x = 415: numberG + x = 455: numberH + x = 145 + y = 95: number8 + y = 135: number7 + y = 175: number6 + y = 215: number5 + y = 255: number4 + y = 295: number3 + y = 335: number2 + y = 375: number1 +End Sub + +Sub makrukboard () + Line (160, 80)-(480, 400), cb2, BF + For x = 160 To 480 Step 40 + Line (x, 80)-(x, 400), cb1 + Next x + For y = 80 To 400 Step 40 + Line (160, y)-(480, y), cb1 + Next y + y = 405 + x = 175: numberA () + x = 215: numberB () + x = 255: numberC () + x = 295: numberD () + x = 335: numberE () + x = 375: numberF () + x = 415: numberG () + x = 455: numberH () + x = 145 + y = 95: number8 () + y = 135: number7 () + y = 175: number6 () + y = 215: number5 () + y = 255: number4 () + y = 295: number3 () + y = 335: number2 () + y = 375: number1 () +End Sub + +Sub xiangqiboard () + Line (140, 40)-(500, 440), cb2, BF + For x = 140 To 500 Step 40 + Line (x, 40)-(x, 440), cb1 + Next x + For y = 40 To 440 Step 40 + Line (140, y)-(500, y), cb1 + Next y + Line (259, 161)-(381, 159), cb4, BF + Line (259, 41)-(261, 159), cb4, BF + Line (379, 41)-(381, 159), cb4, BF + Line (259, 321)-(381, 319), cb4, BF + Line (259, 439)-(261, 319), cb4, BF + Line (379, 439)-(381, 319), cb4, BF + Line (141, 238)-(499, 242), cb5, BF + y = 445 + x = 155: numberA () + x = 195: numberB () + x = 235: numberC () + x = 275: numberD () + x = 315: numberE () + x = 355: numberF () + x = 395: numberG () + x = 435: numberH () + x = 475: numberI () + x = 125 + y = 55: number0 () + y = 95: number9 () + y = 135: number8 () + y = 175: number7 () + y = 215: number6 () + y = 255: number5 () + y = 295: number4 () + y = 335: number3 () + y = 375: number2 () + y = 415: number1 () +End Sub + +Sub shogiboard () + Line (140, 60)-(500, 420), cb2, BF + For x = 140 To 500 Step 40 + Line (x, 60)-(x, 420), cb1 + Next x + For y = 60 To 400 Step 40 + Line (140, y)-(500, y), cb1 + Next y + y = 425 + x = 155: numberA () + x = 195: numberB () + x = 235: numberC () + x = 275: numberD () + x = 315: numberE () + x = 355: numberF () + x = 395: numberG () + x = 435: numberH () + x = 475: numberI () + x = 125 + y = 75: number9 () + y = 115: number8 () + y = 155: number7 () + y = 195: number6 () + y = 235: number5 () + y = 275: number4 () + y = 315: number3 () + y = 355: number2 () + y = 395: number1 () +End Sub + +Sub draughtsboard () + Line (120, 40)-(520, 440), cb2, BF + For x = 120 To 520 Step 40 + Line (x, 40)-(x, 440), cb1 + Next x + For y = 40 To 440 Step 40 + Line (120, y)-(520, y), cb1 + Next y + For y = 360 To 40 Step -80: For x = 440 To 120 Step -80 + Line (x + 1, y + 1)-(x + 39, y + 39), cb3, BF + Line (x + 41, y + 41)-(x + 79, y + 79), cb3, BF + Next x: Next y + y = 445 + x = 135: numberA () + x = 175: numberB () + x = 215: numberC () + x = 255: numberD () + x = 295: numberE () + x = 335: numberF () + x = 375: numberG () + x = 415: numberH () + x = 455: numberI () + x = 495: numberJ () + x = 105 + y = 55: number0 () + y = 95: number9 () + y = 135: number8 () + y = 175: number7 () + y = 215: number6 () + y = 255: number5 () + y = 295: number4 () + y = 335: number3 () + y = 375: number2 () + y = 415: number1 () +End Sub + +Sub chess () + + Rem 1st roll + count = 0:index = 0 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + dc3 = 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + dc6 = 1 + w1 = board(dc2, dc1): b1 = board(dc5, dc4) + + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + w1 = board(dc2, dc1):b1 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While Abs(w1 - b1) < 10 + + w1 = board(dc2, dc1):b1 = board(dc5, dc4) + fw1x = dc1:fw1y = dc2:fb1x = dc4:fb1y = dc5 + fw1 = dc3:fb1 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then pawn () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then pawn () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + x = (dc1 * 40) + 120:y = Abs((dc2 * 40) - 480) - 80 + cf = 15: king + x = (dc4 * 40) + 120:y = Abs((dc5 * 40) - 480) - 80 + cf = 0: king + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + chessfen () + Case Is = Chr$(27) + End + End Select + Loop + + dices + + Rem 2nd roll + count = 0:index = 0 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + dc3 = Int(Rnd * 5 + 2) + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + dc6 = Int(Rnd * 5 + 2) + w2 = board(dc2, dc1):b2 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + ''Exit Case + Case Is = 2 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + fw2x = dc1:fw2y = dc2 + w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + fw2x = dc1:fw2y = dc2 + w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc2 = 1 Or dc2 = 8 + End Select + Select Case dc6 + Case Is = 1 + ''Exit Case + Case Is = 2 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + fb2x = dc4:fb2y = dc5 + b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + fb2x = dc4:fb2y = dc5 + b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc5 = 1 Or dc5 = 8 + End Select + + w2 = board(dc2, dc1):b2 = board(dc5, dc4) + fw2x = dc1:fw2y = dc2:fb2x = dc4:fb2y = dc5 + fw2 = dc3:fb2 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then pawn () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then pawn () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + x = (dc1 * 40) + 120:y = Abs((dc2 * 40) - 480) - 80 + cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then pawn () + x = (dc4 * 40) + 120:y = Abs((dc5 * 40) - 480) - 80 + cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then pawn () + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + chessfen () + Case Is = Chr$(27) + End + End Select + Loop + + dices () + + Rem 3rd roll + count = 0:index = 0 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + dc3 = Int(Rnd * 5 + 2) + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + dc6 = Int(Rnd * 5 + 2) + w3 = board(dc2, dc1):b3 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + ''Exit Case + Case Is = 2 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + fw3x = dc1:fw3y = dc2 + w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + fw3x = dc1:fw3y = dc2 + w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc2 = 1 Or dc2 = 8 + End Select + Select Case dc6 + Case Is = 1 + ''Exit Case + Case Is = 2 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + fb3x = dc4:fb3y = dc5 + b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + fb3x = dc4:fb3y = dc5 + b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc5 = 1 Or dc5 = 8 + End Select + + w3 = board(dc2, dc1):b3 = board(dc5, dc4) + fw3x = dc1:fw3y = dc2:fb3x = dc4:fb3y = dc5 + fw3 = dc3:fb3 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then pawn () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then pawn () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + x = (dc1 * 40) + 120:y = Abs((dc2 * 40) - 480) - 80 + cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then pawn () + x = (dc4 * 40) + 120:y = Abs((dc5 * 40) - 480) - 80 + cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then pawn () + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + chessfen () + Case Is = Chr$(27) + End + End Select + Loop + + dices () + + Rem 4th roll + count = 0:index = 0 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + dc3 = Int(Rnd * 5 + 2) + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + dc6 = Int(Rnd * 5 + 2) + w4 = board(dc2, dc1):b4 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + ''Exit Case + Case Is = 2 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + fw4x = dc1:fw4y = dc2 + w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + fw4x = dc1:fw4y = dc2 + w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc2 = 1 Or dc2 = 8 + End Select + Select Case dc6 + Case Is = 1 + ''Exit Case + Case Is = 2 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + fb4x = dc4:fb4y = dc5 + b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + fb4x = dc4:fb4y = dc5 + b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc5 = 1 Or dc5 = 8 + End Select + + w4 = board(dc2, dc1):b4 = board(dc5, dc4) + fw4x = dc1:fw4y = dc2:fb4x = dc4:fb4y = dc5 + fw4 = dc3:fb4 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then pawn () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then pawn () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + x = (dc1 * 40) + 120:y = Abs((dc2 * 40) - 480) - 80 + cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then pawn () + x = (dc4 * 40) + 120:y = Abs((dc5 * 40) - 480) - 80 + cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then pawn () + + Do + Select Case InKey$ + Case Is = Chr$(32) + ''Exit Case + Case Is = Chr$(13) + chessfen () + Case Is = Chr$(27) + End + End Select + Loop +End Sub + +Sub makruk () + + Rem 1st roll + count = 0:index = 0 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + dc3 = 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + dc6 = 1 + w1 = board(dc2, dc1):b1 = board(dc5, dc4) + + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + w1 = board(dc2, dc1):b1 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While Abs(w1 - b1) < 10 + + w1 = board(dc2, dc1):b1 = board(dc5, dc4) + fw1x = dc1:fw1y = dc2:fb1x = dc4:fb1y = dc5 + fw1 = dc3:fb1 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then checker () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then checker () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + x = (dc1 * 40) + 120:y = Abs((dc2 * 40) - 480) - 80 + cf = 15: king + x = (dc4 * 40) + 120:y = Abs((dc5 * 40) - 480) - 80 + cf = 0: king + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + makrukfen () + Case Is = Chr$(27) + End + End Select + Loop + + dices () + + Rem 2nd roll + count = 0:index = 0 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + dc3 = Int(Rnd * 5 + 2) + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + dc6 = Int(Rnd * 5 + 2) + w2 = board(dc2, dc1):b2 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + ''Exit Case + Case Is = 2 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + indexw3 = 1 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + indexw4 = 1 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + indexw5 = 1 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + fw2x = dc1:fw2y = dc2 + w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc2 < 3 Or dc2 > 5 + End Select + Select Case dc6 + Case Is = 1 + ''Exit Case + Case Is = 2 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + indexb3 = 1 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + indexb4 = 1 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + indexb5 = 1 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + fb2x = dc4:fb2y = dc5 + b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc5 < 4 Or dc5 > 6 + End Select + + w2 = board(dc2, dc1):b2 = board(dc5, dc4) + fw2x = dc1:fw2y = dc2:fb2x = dc4:fb2y = dc5 + fw2 = dc3:fb2 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then checker () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then checker () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + x = (dc1 * 40) + 120:y = Abs((dc2 * 40) - 480) - 80 + cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then checker () + x = (dc4 * 40) + 120:y = Abs((dc5 * 40) - 480) - 80 + cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then checker () + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + makrukfen () + Case Is = Chr$(27) + End + End Select + Loop + + dices () + + Rem 3rd roll + count = 0:index = 0 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + dc3 = Int(Rnd * 5 + 2) + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + dc6 = Int(Rnd * 5 + 2) + w3 = board(dc2, dc1):b3 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + ''Exit Case + Case Is = 2 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + indexw3 = indexw3 + 1 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + indexw4 = indexw4 + 1 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + indexw5 = indexw5 + 1 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + fw3x = dc1:fw3y = dc2 + w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc2 < 3 Or dc2 > 5 + End Select + Select Case dc6 + Case Is = 1 + 'Exit Case + Case Is = 2 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + indexb3 = indexb3 + 1 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + indexb4 = indexb4 + 1 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + indexb5 = indexb5 + 1 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + fb3x = dc4:fb3y = dc5 + b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc5 < 4 Or dc5 > 6 + End Select + + w3 = board(dc2, dc1):b3 = board(dc5, dc4) + fw3x = dc1:fw3y = dc2:fb3x = dc4:fb3y = dc5 + fw3 = dc3:fb3 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then checker () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then checker () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + x = (dc1 * 40) + 120:y = Abs((dc2 * 40) - 480) - 80 + cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then checker () + x = (dc4 * 40) + 120:y = Abs((dc5 * 40) - 480) - 80 + cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then checker () + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + makrukfen () + Case Is = Chr$(27) + End + End Select + Loop + + dices () + + Rem 4th roll + count = 0:index = 0 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + dc3 = Int(Rnd * 5 + 2) + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + dc6 = Int(Rnd * 5 + 2) + w4 = board(dc2, dc1):b4 = board(dc5, dc4) + If indexw3 > 2 Or indexw4 > 2 Or indexw5 > 2 Then dc3 = 6 + If indexb3 > 2 Or indexb4 > 2 Or indexb5 > 2 Then dc6 = 6 + + Select Case dc3 + Case Is = 1 + 'Exit Case + Case Is = 2 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + fw4x = dc1:fw4y = dc2 + w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc2 < 3 Or dc2 > 5 + End Select + Select Case dc6 + Case Is = 1 + 'Exit Case + Case Is = 2 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + fb4x = dc4:fb4y = dc5 + b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + count = count + 1 + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc5 <= 4 Or dc5 >= 6 + End Select + + w4 = board(dc2, dc1):b4 = board(dc5, dc4) + fw4x = dc1:fw4y = dc2:fb4x = dc4:fb4y = dc5 + fw4 = dc3:fb4 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then checker () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then checker () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + x = (dc1 * 40) + 120:y = Abs((dc2 * 40) - 480) - 80 + cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then checker () + x = (dc4 * 40) + 120:y = Abs((dc5 * 40) - 480) - 80 + cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then checker () + + Do + Select Case InKey$ + Case Is = Chr$(32) + 'Exit Case + Case Is = Chr$(13) + makrukfen () + Case Is = Chr$(27) + End + End Select + Loop + +End Sub + +Sub xiangqi () + + Rem 1st roll + count = 0:index = 0 + dc1 = Int(Rnd * 3 + 4) + dc2 = Int(Rnd * 3 + 1) + dc3 = 1 + dc4 = Int(Rnd * 3 + 4) + dc5 = Int(Rnd * 3 + 8) + dc6 = 1 + w1 = xiabo(dc2, dc1):b1 = xiabo(dc5, dc4) + + Do + count = count + 1 + dc1 = Int(Rnd * 3 + 4) + dc2 = Int(Rnd * 3 + 1) + dc4 = Int(Rnd * 3 + 4) + dc5 = Int(Rnd * 3 + 8) + w1 = xiabo(dc2, dc1):b1 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w1 = b1 + + w1 = xiabo(dc2, dc1):b1 = xiabo(dc5, dc4) + fw1x = dc1:fw1y = dc2:fb1x = dc4:fb1y = dc5 + fw1 = dc3:fb1 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then cannon () + If dc3 = 7 Then pawn () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then cannon () + If dc6 = 7 Then pawn () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + If dc1 = 9 Then letterI () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + If dc2 = 9 Then letter9 () + If dc2 = 10 Then letter0 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + If dc4 = 9 Then letterI () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + If dc5 = 9 Then letter9 () + If dc5 = 10 Then letter0 () + x = (dc1 * 40) + 100:y = Abs((dc2 * 40) - 480) - 40 + cf = 15: king () + x = (dc4 * 40) + 100:y = Abs((dc5 * 40) - 480) - 40 + cf = 0: king () + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + xiangqifen () + Case Is = Chr$(27) + End + End Select + Loop + + dices () + + Rem 2nd roll + count = 0:index = 0 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + dc3 = Int(Rnd * 6 + 2) + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + dc6 = Int(Rnd * 6 + 2) + w2 = xiabo(dc2, dc1):b2 = xiabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + 'Exit Case + Case Is = 2 + indexw2 = 1 + dc1 = Int(Rnd * 3 + 4) + dc2 = Int(Rnd * 3 + 1) + Do + count = count + 1 + index = Int(Rnd * 5 + 1) + If index = 1 Then + dc1 = 4 + dc2 = 1 + End If + If index = 2 Then + dc1 = 6 + dc2 = 1 + End If + If index = 3 Then + dc1 = 5 + dc2 = 2 + End If + If index = 4 Then + dc1 = 4 + dc2 = 3 + End If + If index = 5 Then + dc1 = 6 + dc2 = 3 + End If + w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or w2 Mod 2 <> 0 + Case Is = 3 + indexw3 = 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 5 + 1) + Do + count = count + 1 + index = Int(Rnd * 7 + 1) + If index = 1 Then + dc1 = 3 + dc2 = 1 + End If + If index = 2 Then + dc1 = 7 + dc2 = 1 + End If + If index = 3 Then + dc1 = 1 + dc2 = 3 + End If + If index = 4 Then + dc1 = 5 + dc2 = 3 + End If + If index = 5 Then + dc1 = 9 + dc2 = 3 + End If + If index = 6 Then + dc1 = 3 + dc2 = 5 + End If + If index = 7 Then + dc1 = 7 + dc2 = 5 + End If + w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + indexw4 = 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + indexw5 = 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + fw2x = dc1:fw2y = dc2 + w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + indexw6 = 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + fw2x = dc1:fw2y = dc2 + w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 7 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc2 < 4 Or dc2 > 7 + End Select + Select Case dc6 + Case Is = 1 + 'Exit Case + Case Is = 2 + indexb2 = 1 + dc4 = Int(Rnd * 3 + 4) + dc5 = Int(Rnd * 3 + 8) + Do + count = count + 1 + index = Int(Rnd * 5 + 1) + If index = 1 Then + dc4 = 4 + dc5 = 10 + End If + If index = 2 Then + dc4 = 6 + dc5 = 10 + End If + If index = 3 Then + dc4 = 5 + dc5 = 9 + End If + If index = 4 Then + dc4 = 4 + dc5 = 8 + End If + If index = 5 Then + dc4 = 6 + dc5 = 8 + End If + b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or b2 Mod 2 = 0 + Case Is = 3 + indexb3 = 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 5 + 6) + Do + count = count + 1 + index = Int(Rnd * 7 + 1) + If index = 1 Then + dc4 = 3 + dc5 = 10 + End If + If index = 2 Then + dc4 = 7 + dc5 = 10 + End If + If index = 3 Then + dc4 = 1 + dc5 = 8 + End If + If index = 4 Then + dc4 = 5 + dc5 = 8 + End If + If index = 5 Then + dc4 = 9 + dc5 = 8 + End If + If index = 6 Then + dc4 = 3 + dc5 = 6 + End If + If index = 7 Then + dc4 = 7 + dc5 = 6 + End If + b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or b2 + Case Is = 4 + indexb4 = 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + indexb5 = 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + fb2x = dc4:fb2y = dc5 + b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + indexb6 = 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + fb2x = dc4:fb2y = dc5 + b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 7 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc5 < 3 Or dc5 > 8 + End Select + + w2 = xiabo(dc2, dc1):b2 = xiabo(dc5, dc4) + fw2x = dc1:fw2y = dc2:fb2x = dc4:fb2y = dc5 + fw2 = dc3:fb2 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then cannon () + If dc3 = 7 Then pawn () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then cannon () + If dc6 = 7 Then pawn () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + If dc1 = 9 Then letterI () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + If dc2 = 9 Then letter9 () + If dc2 = 10 Then letter0 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + If dc4 = 9 Then letterI () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + If dc5 = 9 Then letter9 () + If dc5 = 10 Then letter0 () + x = (dc1 * 40) + 100:y = Abs((dc2 * 40) - 480) - 40 + cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then cannon () + If dc3 = 7 Then pawn () + x = (dc4 * 40) + 100:y = Abs((dc5 * 40) - 480) - 40 + cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then cannon () + If dc6 = 7 Then pawn () + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + xiangqifen () + Case Is = Chr$(27) + End + End Select + Loop + + dices () + + Rem 3rd roll + count = 0:index = 0 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + dc3 = Int(Rnd * 6 + 2) + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + dc6 = Int(Rnd * 6 + 2) + w3 = xiabo(dc2, dc1):b3 = xiabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + 'Exit Case + Case Is = 2 + indexw2 = indexw2 + 1 + dc1 = Int(Rnd * 3 + 4) + dc2 = Int(Rnd * 3 + 1) + Do + count = count + 1 + index = Int(Rnd * 5 + 1) + If index = 1 Then + dc1 = 4 + dc2 = 1 + End If + If index = 2 Then + dc1 = 6 + dc2 = 1 + End If + If index = 3 Then + dc1 = 5 + dc2 = 2 + End If + If index = 4 Then + dc1 = 4 + dc2 = 3 + End If + If index = 5 Then + dc1 = 6 + dc2 = 3 + End If + w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or w3 Mod 2 <> 0 + Case Is = 3 + indexw3 = indexw3 + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 5 + 1) + Do + count = count + 1 + index = Int(Rnd * 7 + 1) + If index = 1 Then + dc1 = 3 + dc2 = 1 + End If + If index = 2 Then + dc1 = 7 + dc2 = 1 + End If + If index = 3 Then + dc1 = 1 + dc2 = 3 + End If + If index = 4 Then + dc1 = 5 + dc2 = 3 + End If + If index = 5 Then + dc1 = 9 + dc2 = 3 + End If + If index = 6 Then + dc1 = 3 + dc2 = 5 + End If + If index = 7 Then + dc1 = 7 + dc2 = 5 + End If + w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + indexw4 = indexw4 + 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + indexw5 = indexw5 + 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + fw3x = dc1:fw3y = dc2 + w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + indexw6 = indexw6 + 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + fw3x = dc1:fw3y = dc2 + w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 7 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc2 < 4 Or dc2 > 7 + End Select + Select Case dc6 + Case Is = 1 + 'Exit Case + Case Is = 2 + indexb2 = indexb2 + 1 + dc4 = Int(Rnd * 3 + 4) + dc5 = Int(Rnd * 3 + 8) + Do + count = count + 1 + index = Int(Rnd * 5 + 1) + If index = 1 Then + dc4 = 4 + dc5 = 10 + End If + If index = 2 Then + dc4 = 6 + dc5 = 10 + End If + If index = 3 Then + dc4 = 5 + dc5 = 9 + End If + If index = 4 Then + dc4 = 4 + dc5 = 8 + End If + If index = 5 Then + dc4 = 6 + dc5 = 8 + End If + b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or b3 Mod 2 = 0 + Case Is = 3 + indexb3 = indexb3 + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 5 + 6) + Do + count = count + 1 + index = Int(Rnd * 7 + 1) + If index = 1 Then + dc4 = 3 + dc5 = 10 + End If + If index = 2 Then + dc4 = 7 + dc5 = 10 + End If + If index = 3 Then + dc4 = 1 + dc5 = 8 + End If + If index = 4 Then + dc4 = 5 + dc5 = 8 + End If + If index = 5 Then + dc4 = 9 + dc5 = 8 + End If + If index = 6 Then + dc4 = 3 + dc5 = 6 + End If + If index = 7 Then + dc4 = 7 + dc5 = 6 + End If + b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + indexb4 = indexb4 + 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + indexb5 = indexb5 + 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + fb3x = dc4:fb3y = dc5 + b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + indexb6 = indexb6 + 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + fb3x = dc4:fb3y = dc5 + b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 7 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc5 < 3 Or dc5 > 8 + End Select + + w3 = xiabo(dc2, dc1):b3 = xiabo(dc5, dc4) + fw3x = dc1:fw3y = dc2:fb3x = dc4:fb3y = dc5 + fw3 = dc3:fb3 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then cannon () + If dc3 = 7 Then pawn () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then cannon () + If dc6 = 7 Then pawn () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + If dc1 = 9 Then letterI () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + If dc2 = 9 Then letter9 () + If dc2 = 10 Then letter0 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + If dc4 = 9 Then letterI () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + If dc5 = 9 Then letter9 () + If dc5 = 10 Then letter0 () + x = (dc1 * 40) + 100:y = Abs((dc2 * 40) - 480) - 40 + cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then cannon () + If dc3 = 7 Then pawn () + x = (dc4 * 40) + 100:y = Abs((dc5 * 40) - 480) - 40 + cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then cannon () + If dc6 = 7 Then pawn () + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + xiangqifen () + Case Is = Chr$(27) + End + End Select + Loop + + dices () + + Rem 4th roll + count = 0:index = 0 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + dc3 = Int(Rnd * 6 + 2) + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + dc6 = Int(Rnd * 6 + 2) + w4 = xiabo(dc2, dc1):b2 = xiabo(dc5, dc4) + If indexw2 > 2 Or indexw3 > 2 Or indexw4 > 2 Or indexw5 > 2 Or indexw6 > 2 Then dc3 = 7 + If indexb2 > 2 Or indexb3 > 2 Or indexb4 > 2 Or indexb5 > 2 Or indexb6 > 2 Then dc6 = 7 + + Select Case dc3 + Case Is = 1 + 'Exit Case + Case Is = 2 + dc1 = Int(Rnd * 3 + 4) + dc2 = Int(Rnd * 3 + 1) + Do + count = count + 1 + index = Int(Rnd * 5 + 1) + If index = 1 Then + dc1 = 4 + dc2 = 1 + End If + If index = 2 Then + dc1 = 6 + dc2 = 1 + End If + If index = 3 Then + dc1 = 5 + dc2 = 2 + End If + If index = 4 Then + dc1 = 4 + dc2 = 3 + End If + If index = 5 Then + dc1 = 6 + dc2 = 3 + End If + w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or w4 Mod 2 <> 0 + Case Is = 3 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 5 + 1) + Do + count = count + 1 + index = Int(Rnd * 7 + 1) + If index = 1 Then + dc1 = 3 + dc2 = 1 + End If + If index = 2 Then + dc1 = 7 + dc2 = 1 + End If + If index = 3 Then + dc1 = 1 + dc2 = 3 + End If + If index = 4 Then + dc1 = 5 + dc2 = 3 + End If + If index = 5 Then + dc1 = 9 + dc2 = 3 + End If + If index = 6 Then + dc1 = 3 + dc2 = 5 + End If + If index = 7 Then + dc1 = 7 + dc2 = 5 + End If + w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + fw4x = dc1:fw4y = dc2 + w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + fw4x = dc1:fw4y = dc2 + w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 7 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 10 + 1) + w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 < 3 Or dc2 > 8 + End Select + Select Case dc6 + Case Is = 1 + 'Exit Case + Case Is = 2 + dc4 = Int(Rnd * 3 + 4) + dc5 = Int(Rnd * 3 + 8) + Do + count = count + 1 + index = Int(Rnd * 5 + 1) + If index = 1 Then + dc4 = 4 + dc5 = 10 + End If + If index = 2 Then + dc4 = 6 + dc5 = 10 + End If + If index = 3 Then + dc4 = 5 + dc5 = 9 + End If + If index = 4 Then + dc4 = 4 + dc5 = 8 + End If + If index = 5 Then + dc4 = 6 + dc5 = 8 + End If + b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or b4 Mod 2 = 0 + Case Is = 3 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 5 + 6) + Do + count = count + 1 + index = Int(Rnd * 7 + 1) + If index = 1 Then + dc4 = 3 + dc5 = 10 + End If + If index = 2 Then + dc4 = 7 + dc5 = 10 + End If + If index = 3 Then + dc4 = 1 + dc5 = 8 + End If + If index = 4 Then + dc4 = 5 + dc5 = 8 + End If + If index = 5 Then + dc4 = 9 + dc5 = 8 + End If + If index = 6 Then + dc4 = 3 + dc5 = 6 + End If + If index = 7 Then + dc4 = 7 + dc5 = 6 + End If + b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + fb4x = dc4:fb4y = dc5 + b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + fb4x = dc4:fb4y = dc5 + b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 7 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 10 + 1) + b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc5 < 3 Or dc5 > 8 + End Select + + w4 = xiabo(dc2, dc1):b4 = xiabo(dc5, dc4) + fw4x = dc1:fw4y = dc2:fb4x = dc4:fb4y = dc5 + fw4 = dc3:fb4 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then cannon () + If dc3 = 7 Then pawn () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then cannon () + If dc6 = 7 Then pawn () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + If dc1 = 9 Then letterI () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + If dc2 = 9 Then letter9 () + If dc2 = 10 Then letter0 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + If dc4 = 9 Then letterI () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + If dc5 = 9 Then letter9 () + If dc5 = 10 Then letter0 () + x = (dc1 * 40) + 100:y = Abs((dc2 * 40) - 480) - 40 + cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then bishop () + If dc3 = 4 Then knight () + If dc3 = 5 Then rook () + If dc3 = 6 Then cannon () + If dc3 = 7 Then pawn () + x = (dc4 * 40) + 100:y = Abs((dc5 * 40) - 480) - 40 + cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then bishop () + If dc6 = 4 Then knight () + If dc6 = 5 Then rook () + If dc6 = 6 Then cannon () + If dc6 = 7 Then pawn () + + Do + Select Case InKey$ + Case Is = Chr$(32) + 'Exit Case + Case Is = Chr$(13) + xiangqifen () + Case Is = Chr$(27) + End + End Select + Loop + +End Sub + +Sub shogi () + + Rem 1st roll + count = 0:index = 0 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + dc3 = 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + dc6 = 1 + w1 = shobo(dc2, dc1):b1 = shobo(dc5, dc4) + + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + w1 = shobo(dc2, dc1):b1 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While Abs(w1 - b1) < 11 + + w1 = shobo(dc2, dc1):b1 = shobo(dc5, dc4) + fw1x = dc1:fw1y = dc2:fb1x = dc4:fb1y = dc5 + fw1 = dc3:fb1 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then general () + If dc3 = 4 Then bishop () + If dc3 = 5 Then knight () + If dc3 = 6 Then rook () + If dc3 = 7 Then lance () + If dc3 = 8 Then pawn () + If dc3 = 9 Then tokin () + If dc3 = 10 Then dragon () + If dc3 = 11 Then horse () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then general () + If dc6 = 4 Then bishop () + If dc6 = 5 Then knight () + If dc6 = 6 Then rook () + If dc6 = 7 Then lance () + If dc6 = 8 Then pawn () + If dc6 = 9 Then tokin () + If dc6 = 10 Then dragon () + If dc6 = 11 Then horse () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + If dc1 = 9 Then letterI () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + If dc2 = 9 Then letter9 () + If dc2 = 10 Then letter0 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + If dc4 = 9 Then letterI () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + If dc5 = 9 Then letter9 () + If dc5 = 10 Then letter0 () + x = (dc1 * 40) + 100:y = Abs((dc2 * 40) - 480) - 60 + cf = 15: king () + x = (dc4 * 40) + 100:y = Abs((dc5 * 40) - 480) - 60 + cf = 0: king () + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + shogifen () + Case Is = Chr$(27) + End + End Select + Loop + + dices () + + Rem 2nd roll + count = 0:index = 0 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + dc3 = Int(Rnd * 10 + 2) + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + dc6 = Int(Rnd * 10 + 2) + w2 = shobo(dc2, dc1):b2 = shobo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + 'Exit Case + Case Is = 2 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + indexw3 = 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + indexw4 = 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + indexw5 = 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + fw2x = dc1:fw2y = dc2 + w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + indexw6 = 1 + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + fw2x = dc1:fw2y = dc2 + w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 7 + indexw7 = 1 + index = Int(Rnd * 2 + 1) + If index = 1 Then dc1 = 1 Else dc1 = 9 + If dc1 = 1 Then indexw71 = 1 Else indexw72 = 1 + Do + count = count + 1 + dc2 = Int(Rnd * 9 + 1) + w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 8 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc2 < 3 Or dc2 > 7 + Case Is = 9 + indexw9 = 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 10 + indexw10 = 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 11 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + End Select + Select Case dc6 + Case Is = 1 + 'Exit Case + Case Is = 2 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + indexb3 = 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + indexb4 = 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + indexb5 = 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + fb2x = dc4:fb2y = dc5 + b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + indexb6 = 1 + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + fb2x = dc4:fb2y = dc5 + b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 7 + indexb7 = 1 + index = Int(Rnd * 2 + 1) + If index = 1 Then dc4 = 1 Else dc4 = 9 + If dc4 = 1 Then indexb71 = 1 Else indexb72 = 1 + Do + count = count + 1 + dc5 = Int(Rnd * 9 + 1) + b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 8 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc5 < 3 Or dc5 > 7 + Case Is = 9 + indexb9 = 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 10 + indexb10 = 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 11 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + End Select + + w2 = shobo(dc2, dc1):b2 = shobo(dc5, dc4) + fw2x = dc1:fw2y = dc2:fb2x = dc4:fb2y = dc5 + fw2 = dc3:fb2 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then general () + If dc3 = 4 Then bishop () + If dc3 = 5 Then knight () + If dc3 = 6 Then rook () + If dc3 = 7 Then lance () + If dc3 = 8 Then pawn () + If dc3 = 9 Then horse () + If dc3 = 10 Then dragon () + If dc3 = 11 Then tokin () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then general () + If dc6 = 4 Then bishop () + If dc6 = 5 Then knight () + If dc6 = 6 Then rook () + If dc6 = 7 Then lance () + If dc6 = 8 Then pawn () + If dc6 = 9 Then horse () + If dc6 = 10 Then dragon () + If dc6 = 11 Then tokin () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + If dc1 = 9 Then letterI () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + If dc2 = 9 Then letter9 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + If dc4 = 9 Then letterI () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + If dc5 = 9 Then letter9 () + x = (dc1 * 40) + 100:y = Abs((dc2 * 40) - 480) - 60 + cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then general () + If dc3 = 4 Then bishop () + If dc3 = 5 Then knight () + If dc3 = 6 Then rook () + If dc3 = 7 Then lance () + If dc3 = 8 Then pawn () + If dc3 = 9 Then horse () + If dc3 = 10 Then dragon () + If dc3 = 11 Then tokin () + x = (dc4 * 40) + 100:y = Abs((dc5 * 40) - 480) - 60 + cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then general () + If dc6 = 4 Then bishop () + If dc6 = 5 Then knight () + If dc6 = 6 Then rook () + If dc6 = 7 Then lance () + If dc6 = 8 Then pawn () + If dc6 = 9 Then horse () + If dc6 = 10 Then dragon () + If dc6 = 11 Then tokin () + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + shogifen () + Case Is = Chr$(27) + End + End Select + Loop + + dices () + + Rem 3rd roll + count = 0:index = 0 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + dc3 = Int(Rnd * 10 + 2) + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + dc6 = Int(Rnd * 10 + 2) + w3 = shobo(dc2, dc1):b3 = shobo(dc5, dc4) + If dc3 = 4 Then indexw4 = indexw4 + 1 + If dc3 = 6 Then indexw6 = indexw6 + 1 + If dc3 = 9 Then indexw9 = indexw9 + 1 + If dc3 = 10 Then indexw10 = indexw10 + 1 + If indexw4 > 1 Then + dc3 = 8 + indexw4 = indexw4 - 1 + End If + If indexw6 > 1 Then + dc3 = 8 + indexw6 = indexw4 - 1 + End If + If indexw9 > 1 Then + dc3 = 8 + indexw9 = indexw4 - 1 + End If + If indexw10 > 1 Then + dc3 = 8 + indexw10 = indexw4 - 1 + End If + If indexb4 > 1 Then + dc6 = 8 + indexb4 = indexb4 - 1 + End If + If indexb6 > 1 Then + dc6 = 8 + indexb6 = indexb4 - 1 + End If + If indexb9 > 1 Then + dc6 = 8 + indexb9 = indexb4 - 1 + End If + If indexb10 > 1 Then + dc6 = 8 + indexb10 = indexb4 - 1 + End If + + Select Case dc3 + Case Is = 1 + 'Exit Case + Case Is = 2 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + indexw3 = indexw3 + 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + indexw4 = indexw4 + 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + indexw5 = indexw5 + 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + fw2x = dc1:fw2y = dc2 + w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + indexw6 = indexw6 + 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + fw2x = dc1:fw2y = dc2 + w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 7 + indexw7 = indexw7 + 1 + index = Int(Rnd * 2 + 1) + If index = 1 Then dc1 = 1 Else dc1 = 9 + If indexw71 = 1 Then dc1 = 9 + If indexw72 = 1 Then dc1 = 1 + Do + count = count + 1 + dc2 = Int(Rnd * 9 + 1) + w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 8 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc2 < 3 Or dc2 > 7 + Case Is = 9 + indexw9 = indexw9 + 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 10 + indexw10 = indexw10 + 1 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 11 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + End Select + Select Case dc6 + Case Is = 1 + 'Exit Case + Case Is = 2 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + indexb3 = indexb3 + 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + indexb4 = indexb4 + 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + indexb5 = indexb5 + 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + fb2x = dc4:fb2y = dc5 + b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + indexb6 = indexb6 + 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + fb2x = dc4:fb2y = dc5 + b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 7 + indexb7 = indexb7 + 1 + index = Int(Rnd * 2 + 1) + If index = 1 Then dc4 = 1 Else dc4 = 9 + If indexb71 = 1 Then dc4 = 9 + If indexb72 = 1 Then dc4 = 1 + Do + count = count + 1 + dc5 = Int(Rnd * 9 + 1) + b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 8 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc5 < 3 Or dc5 > 7 + Case Is = 9 + indexb9 = indexb9 + 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 10 + indexb10 = indexb10 + 1 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 11 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + End Select + + w3 = shobo(dc2, dc1):b3 = shobo(dc5, dc4) + fw3x = dc1:fw3y = dc2:fb3x = dc4:fb3y = dc5 + fw3 = dc3:fb3 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then general () + If dc3 = 4 Then bishop () + If dc3 = 5 Then knight () + If dc3 = 6 Then rook () + If dc3 = 7 Then lance () + If dc3 = 8 Then pawn () + If dc3 = 9 Then horse () + If dc3 = 10 Then dragon () + If dc3 = 11 Then tokin () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then general () + If dc6 = 4 Then bishop () + If dc6 = 5 Then knight () + If dc6 = 6 Then rook () + If dc6 = 7 Then lance () + If dc6 = 8 Then pawn () + If dc6 = 9 Then horse () + If dc6 = 10 Then dragon () + If dc6 = 11 Then tokin () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + If dc1 = 9 Then letterI () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + If dc2 = 9 Then letter9 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + If dc4 = 9 Then letterI () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + If dc5 = 9 Then letter9 () + x = (dc1 * 40) + 100:y = Abs((dc2 * 40) - 480) - 60 + cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then general () + If dc3 = 4 Then bishop () + If dc3 = 5 Then knight () + If dc3 = 6 Then rook () + If dc3 = 7 Then lance () + If dc3 = 8 Then pawn () + If dc3 = 9 Then horse () + If dc3 = 10 Then dragon () + If dc3 = 11 Then tokin () + x = (dc4 * 40) + 100:y = Abs((dc5 * 40) - 480) - 60 + cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then general () + If dc6 = 4 Then bishop () + If dc6 = 5 Then knight () + If dc6 = 6 Then rook () + If dc6 = 7 Then lance () + If dc6 = 8 Then pawn () + If dc6 = 9 Then horse () + If dc6 = 10 Then dragon () + If dc6 = 11 Then tokin () + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + shogifen () + Case Is = Chr$(27) + End + End Select + Loop + + dices () + + Rem 4th roll + count = 0:index = 0 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + dc3 = Int(Rnd * 10 + 2) + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + dc6 = Int(Rnd * 10 + 2) + w4 = shobo(dc2, dc1):b4 = shobo(dc5, dc4) + If dc3 = 4 Then indexw4 = indexw4 + 1 + If dc3 = 6 Then indexw6 = indexw6 + 1 + If dc3 = 9 Then indexw9 = indexw9 + 1 + If dc3 = 10 Then indexw10 = indexw10 + 1 + If indexw4 > 1 Then + dc3 = 8 + indexw4 = indexw4 - 1 + End If + If indexw6 > 1 Then + dc3 = 8 + indexw6 = indexw4 - 1 + End If + If indexw9 > 1 Then + dc3 = 8 + indexw9 = indexw4 - 1 + End If + If indexw10 > 1 Then + dc3 = 8 + indexw10 = indexw4 - 1 + End If + If indexb4 > 1 Then + dc6 = 8 + indexb4 = indexb4 - 1 + End If + If indexb6 > 1 Then + dc6 = 8 + indexb6 = indexb4 - 1 + End If + If indexb9 > 1 Then + dc6 = 8 + indexb9 = indexb4 - 1 + End If + If indexb10 > 1 Then + dc6 = 8 + indexb10 = indexb4 - 1 + End If + If indexw3 > 2 Or indexw5 > 2 Or indexw7 > 2 Then dc3 = 8 + If indexb3 > 2 Or indexb5 > 2 Or indexb7 > 2 Then dc6 = 8 + + Select Case dc3 + Case Is = 1 + 'Exit Case + Case Is = 2 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + fw2x = dc1:fw2y = dc2 + w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + fw2x = dc1:fw2y = dc2 + w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 7 + index = Int(Rnd * 2 + 1) + If index = 1 Then dc1 = 1 Else dc1 = 9 + If indexw71 = 1 Then dc1 = 9 + If indexw72 = 1 Then dc1 = 1 + Do + count = count + 1 + dc2 = Int(Rnd * 9 + 1) + w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 8 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc2 < 3 Or dc2 > 7 + Case Is = 9 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 10 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 11 + Do + count = count + 1 + dc1 = Int(Rnd * 9 + 1) + dc2 = Int(Rnd * 9 + 1) + w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + End Select + Select Case dc6 + Case Is = 1 + 'Exit Case + Case Is = 2 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + fb2x = dc4:fb2y = dc5 + b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + fb2x = dc4:fb2y = dc5 + b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 7 + index = Int(Rnd * 2 + 1) + If index = 1 Then dc4 = 1 Else dc4 = 9 + If indexb71 = 1 Then dc4 = 9 + If indexb72 = 1 Then dc4 = 1 + Do + count = count + 1 + dc5 = Int(Rnd * 9 + 1) + b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 8 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc5 < 3 Or dc5 > 7 + Case Is = 9 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 10 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 11 + Do + count = count + 1 + dc4 = Int(Rnd * 9 + 1) + dc5 = Int(Rnd * 9 + 1) + b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + End Select + + w4 = shobo(dc2, dc1):b4 = shobo(dc5, dc4) + fw4x = dc1:fw4y = dc2:fb4x = dc4:fb4y = dc5 + fw4 = dc3:fb4 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then general () + If dc3 = 4 Then bishop () + If dc3 = 5 Then knight () + If dc3 = 6 Then rook () + If dc3 = 7 Then lance () + If dc3 = 8 Then pawn () + If dc3 = 9 Then horse () + If dc3 = 10 Then dragon () + If dc3 = 11 Then tokin () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then general () + If dc6 = 4 Then bishop () + If dc6 = 5 Then knight () + If dc6 = 6 Then rook () + If dc6 = 7 Then lance () + If dc6 = 8 Then pawn () + If dc6 = 9 Then horse () + If dc6 = 10 Then dragon () + If dc6 = 11 Then tokin () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + If dc1 = 9 Then letterI () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + If dc2 = 9 Then letter9 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + If dc4 = 9 Then letterI () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + If dc5 = 9 Then letter9 () + x = (dc1 * 40) + 100:y = Abs((dc2 * 40) - 480) - 60 + cf = 15 + If dc3 = 1 Then king () + If dc3 = 2 Then queen () + If dc3 = 3 Then general () + If dc3 = 4 Then bishop () + If dc3 = 5 Then knight () + If dc3 = 6 Then rook () + If dc3 = 7 Then lance () + If dc3 = 8 Then pawn () + If dc3 = 9 Then horse () + If dc3 = 10 Then dragon () + If dc3 = 11 Then tokin () + x = (dc4 * 40) + 100:y = Abs((dc5 * 40) - 480) - 60 + cf = 0 + If dc6 = 1 Then king () + If dc6 = 2 Then queen () + If dc6 = 3 Then general () + If dc6 = 4 Then bishop () + If dc6 = 5 Then knight () + If dc6 = 6 Then rook () + If dc6 = 7 Then lance () + If dc6 = 8 Then pawn () + If dc6 = 9 Then horse () + If dc6 = 10 Then dragon () + If dc6 = 11 Then tokin () + + Do + Select Case InKey$ + Case Is = Chr$(32) + 'Exit Case + Case Is = Chr$(13) + shogifen () + Case Is = Chr$(27) + End + End Select + Loop + +End Sub + +Sub draughts () + + Rem 1st roll + count = 0:index = 0 + dc1 = Int(Rnd * 10 + 1) + dc2 = Int(Rnd * 10 + 1) + dc3 = Int(Rnd * 2 + 1) + dc4 = Int(Rnd * 10 + 1) + dc5 = Int(Rnd * 10 + 1) + dc6 = Int(Rnd * 2 + 1) + w1 = drabo(dc2, dc1):b1 = drabo(dc5, dc4) + + Do + Do + count = count + 1 + dc1 = Int(Rnd * 8 + 1) + dc2 = Int(Rnd * 8 + 1) + dc4 = Int(Rnd * 8 + 1) + dc5 = Int(Rnd * 8 + 1) + w1 = drabo(dc2, dc1):b1 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until w1 Mod 2 <> 0 And b1 Mod 2 <> 0 + count = count + 1 + If count > 8000 Then Exit Do + Loop While w1 = b1 + + w1 = drabo(dc2, dc1):b1 = drabo(dc5, dc4) + fw1x = dc1:fw1y = dc2:fb1x = dc4:fb1y = dc5 + fw1 = dc3:fb1 = dc6 + x = 20:y = 160:cf = 15 + If dc3 = 1 Then dame () + If dc3 = 2 Then checker () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then dame () + If dc6 = 2 Then checker () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + If dc1 = 9 Then letterI () + If dc1 = 10 Then letterJ () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + If dc2 = 9 Then letter9 () + If dc2 = 10 Then letter0 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + If dc4 = 9 Then letterI () + If dc4 = 10 Then letterJ () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + If dc5 = 9 Then letter9 () + If dc5 = 10 Then letter0 () + x = (dc1 * 40) + 80:y = Abs((dc2 * 40) - 480) - 40 + cf = 15 + If dc3 = 1 Then dame () + If dc3 = 2 Then checker () + x = (dc4 * 40) + 80:y = Abs((dc5 * 40) - 480) - 40 + cf = 0 + If dc6 = 1 Then dame () + If dc6 = 2 Then checker () + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + draughtsfen () + Case Is = Chr$(27) + End + End Select + Loop + + dices () + + Rem 2nd roll + count = 0:index = 0 + dc1 = Int(Rnd * 10 + 1) + dc2 = Int(Rnd * 10 + 1) + dc3 = Int(Rnd * 2 + 1) + dc4 = Int(Rnd * 10 + 1) + dc5 = Int(Rnd * 10 + 1) + dc6 = Int(Rnd * 2 + 1) + w2 = drabo(dc2, dc1):b2 = drabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Do + Do + count = count + 1 + dc1 = Int(Rnd * 10 + 1) + dc2 = Int(Rnd * 10 + 1) + w2 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w2 Mod 2 <> 0 + count = count + 1 + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 2 + Do + Do + count = count + 1 + dc1 = Int(Rnd * 10 + 1) + dc2 = Int(Rnd * 10 + 1) + w2 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w2 Mod 2 <> 0 + count = count + 1 + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + End Select + Select Case dc6 + Case Is = 1 + Do + Do + count = count + 1 + dc4 = Int(Rnd * 10 + 1) + dc5 = Int(Rnd * 10 + 1) + b2 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b2 Mod 2 <> 0 + count = count + 1 + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 2 + Do + Do + count = count + 1 + dc4 = Int(Rnd * 10 + 1) + dc5 = Int(Rnd * 10 + 1) + b2 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b2 Mod 2 <> 0 + count = count + 1 + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + End Select + + w2 = drabo(dc2, dc1):b2 = drabo(dc5, dc4) + fw2x = dc1:fw2y = dc2:fb2x = dc4:fb2y = dc5 + fw2 = dc3:fb2 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then dame () + If dc3 = 2 Then checker () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then dame () + If dc6 = 2 Then checker () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + If dc1 = 9 Then letterI () + If dc1 = 10 Then letterJ () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + If dc2 = 9 Then letter9 () + If dc2 = 10 Then letter0 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + If dc4 = 9 Then letterI () + If dc4 = 10 Then letterJ () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + If dc5 = 9 Then letter9 () + If dc5 = 10 Then letter0 () + x = (dc1 * 40) + 80:y = Abs((dc2 * 40) - 480) - 40 + cf = 15 + If dc3 = 1 Then dame () + If dc3 = 2 Then checker () + x = (dc4 * 40) + 80:y = Abs((dc5 * 40) - 480) - 40 + cf = 0 + If dc6 = 1 Then dame () + If dc6 = 2 Then checker () + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + draughtsfen () + Case Is = Chr$(27) + End + End Select + Loop + + dices () + + Rem 3rd roll + count = 0:index = 0 + dc1 = Int(Rnd * 10 + 1) + dc2 = Int(Rnd * 10 + 1) + dc3 = Int(Rnd * 2 + 1) + dc4 = Int(Rnd * 10 + 1) + dc5 = Int(Rnd * 10 + 1) + dc6 = Int(Rnd * 2 + 1) + w3 = drabo(dc2, dc1):b3 = drabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Do + Do + count = count + 1 + dc1 = Int(Rnd * 10 + 1) + dc2 = Int(Rnd * 10 + 1) + w3 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w3 Mod 2 <> 0 + count = count + 1 + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 2 + Do + Do + count = count + 1 + dc1 = Int(Rnd * 10 + 1) + dc2 = Int(Rnd * 10 + 1) + w3 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w3 Mod 2 <> 0 + count = count + 1 + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + End Select + Select Case dc6 + Case Is = 1 + Do + Do + count = count + 1 + dc4 = Int(Rnd * 10 + 1) + dc5 = Int(Rnd * 10 + 1) + b3 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b3 Mod 2 <> 0 + count = count + 1 + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 2 + Do + Do + count = count + 1 + dc4 = Int(Rnd * 10 + 1) + dc5 = Int(Rnd * 10 + 1) + b3 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b3 Mod 2 <> 0 + count = count + 1 + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + End Select + + w3 = drabo(dc2, dc1):b3 = drabo(dc5, dc4) + fw3x = dc1:fw3y = dc2:fb3x = dc4:fb3y = dc5 + fw3 = dc3:fb3 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then dame () + If dc3 = 2 Then checker () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then dame () + If dc6 = 2 Then checker () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + If dc1 = 9 Then letterI () + If dc1 = 10 Then letterJ () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + If dc2 = 9 Then letter9 () + If dc2 = 10 Then letter0 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + If dc4 = 9 Then letterI () + If dc4 = 10 Then letterJ () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + If dc5 = 9 Then letter9 () + If dc5 = 10 Then letter0 () + x = (dc1 * 40) + 80:y = Abs((dc2 * 40) - 480) - 40 + cf = 15 + If dc3 = 1 Then dame () + If dc3 = 2 Then checker () + x = (dc4 * 40) + 80:y = Abs((dc5 * 40) - 480) - 40 + cf = 0 + If dc6 = 1 Then dame () + If dc6 = 2 Then checker () + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + draughtsfen () + Case Is = Chr$(27) + End + End Select + Loop + + dices () + + Rem 4th roll + count = 0:index = 0 + dc1 = Int(Rnd * 10 + 1) + dc2 = Int(Rnd * 10 + 1) + dc3 = Int(Rnd * 2 + 1) + dc4 = Int(Rnd * 10 + 1) + dc5 = Int(Rnd * 10 + 1) + dc6 = Int(Rnd * 2 + 1) + w4 = drabo(dc2, dc1):b4 = drabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Do + Do + count = count + 1 + dc1 = Int(Rnd * 10 + 1) + dc2 = Int(Rnd * 10 + 1) + w4 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w4 Mod 2 <> 0 + count = count + 1 + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 2 + Do + Do + count = count + 1 + dc1 = Int(Rnd * 10 + 1) + dc2 = Int(Rnd * 10 + 1) + w4 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w4 Mod 2 <> 0 + count = count + 1 + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + End Select + Select Case dc6 + Case Is = 1 + Do + Do + count = count + 1 + dc4 = Int(Rnd * 10 + 1) + dc5 = Int(Rnd * 10 + 1) + b4 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b4 Mod 2 <> 0 + count = count + 1 + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 2 + Do + Do + count = count + 1 + dc4 = Int(Rnd * 10 + 1) + dc5 = Int(Rnd * 10 + 1) + b4 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b4 Mod 2 <> 0 + count = count + 1 + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + End Select + + w4 = drabo(dc2, dc1):b4 = drabo(dc5, dc4) + fw4x = dc1:fw4y = dc2:fb4x = dc4:fb4y = dc5 + fw4 = dc3:fb4 = dc6 + + x = 20:y = 160:cf = 15 + If dc3 = 1 Then dame () + If dc3 = 2 Then checker () + x = 580:y = 160:cf = 0 + If dc6 = 1 Then dame () + If dc6 = 2 Then checker () + x = 20:y = 220 + If dc1 = 1 Then letterA () + If dc1 = 2 Then letterB () + If dc1 = 3 Then letterC () + If dc1 = 4 Then letterD () + If dc1 = 5 Then letterE () + If dc1 = 6 Then letterF () + If dc1 = 7 Then letterG () + If dc1 = 8 Then letterH () + If dc1 = 9 Then letterI () + If dc1 = 10 Then letterJ () + x = 20:y = 280 + If dc2 = 1 Then letter1 () + If dc2 = 2 Then letter2 () + If dc2 = 3 Then letter3 () + If dc2 = 4 Then letter4 () + If dc2 = 5 Then letter5 () + If dc2 = 6 Then letter6 () + If dc2 = 7 Then letter7 () + If dc2 = 8 Then letter8 () + If dc2 = 9 Then letter9 () + If dc2 = 10 Then letter0 () + x = 580:y = 220 + If dc4 = 1 Then letterA () + If dc4 = 2 Then letterB () + If dc4 = 3 Then letterC () + If dc4 = 4 Then letterD () + If dc4 = 5 Then letterE () + If dc4 = 6 Then letterF () + If dc4 = 7 Then letterG () + If dc4 = 8 Then letterH () + If dc4 = 9 Then letterI () + If dc4 = 10 Then letterJ () + x = 580:y = 280 + If dc5 = 1 Then letter1 () + If dc5 = 2 Then letter2 () + If dc5 = 3 Then letter3 () + If dc5 = 4 Then letter4 () + If dc5 = 5 Then letter5 () + If dc5 = 6 Then letter6 () + If dc5 = 7 Then letter7 () + If dc5 = 8 Then letter8 () + If dc5 = 9 Then letter9 () + If dc5 = 10 Then letter0 () + x = (dc1 * 40) + 80:y = Abs((dc2 * 40) - 480) - 40 + cf = 15 + If dc3 = 1 Then dame () + If dc3 = 2 Then checker () + x = (dc4 * 40) + 80:y = Abs((dc5 * 40) - 480) - 40 + cf = 0 + If dc6 = 1 Then dame () + If dc6 = 2 Then checker () + + Do + Select Case InKey$ + Case Is = Chr$(32) + 'Exit Case + Case Is = Chr$(13) + draughtsfen () + Case Is = Chr$(27) + End + End Select + Loop + +End Sub + +Sub chessfen () + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then fig1w$ = "K" + If fw1 = 2 Then fig1w$ = "Q" + If fw1 = 3 Then fig1w$ = "B" + If fw1 = 4 Then fig1w$ = "N" + If fw1 = 5 Then fig1w$ = "R" + If fw1 = 6 Then fig1w$ = "P" + + If fb1 = 1 Then fig1b$ = "k" + If fb1 = 2 Then fig1b$ = "q" + If fb1 = 3 Then fig1b$ = "b" + If fb1 = 4 Then fig1b$ = "n" + If fb1 = 5 Then fig1b$ = "r" + If fb1 = 6 Then fig1b$ = "p" + + If fw2 = 1 Then fig2w$ = "K" + If fw2 = 2 Then fig2w$ = "Q" + If fw2 = 3 Then fig2w$ = "B" + If fw2 = 4 Then fig2w$ = "N" + If fw2 = 5 Then fig2w$ = "R" + If fw2 = 6 Then fig2w$ = "P" + + If fb2 = 1 Then fig2b$ = "k" + If fb2 = 2 Then fig2b$ = "q" + If fb2 = 3 Then fig2b$ = "b" + If fb2 = 4 Then fig2b$ = "n" + If fb2 = 5 Then fig2b$ = "r" + If fb2 = 6 Then fig2b$ = "p" + + If fw3 = 1 Then fig3w$ = "K" + If fw3 = 2 Then fig3w$ = "Q" + If fw3 = 3 Then fig3w$ = "B" + If fw3 = 4 Then fig3w$ = "N" + If fw3 = 5 Then fig3w$ = "R" + If fw3 = 6 Then fig3w$ = "P" + + If fb3 = 1 Then fig3b$ = "k" + If fb3 = 2 Then fig3b$ = "q" + If fb3 = 3 Then fig3b$ = "b" + If fb3 = 4 Then fig3b$ = "n" + If fb3 = 5 Then fig3b$ = "r" + If fb3 = 6 Then fig3b$ = "p" + + If fw4 = 1 Then fig4w$ = "K" + If fw4 = 2 Then fig4w$ = "Q" + If fw4 = 3 Then fig4w$ = "B" + If fw4 = 4 Then fig4w$ = "N" + If fw4 = 5 Then fig4w$ = "R" + If fw4 = 6 Then fig4w$ = "P" + + If fb4 = 1 Then fig4b$ = "k" + If fb4 = 2 Then fig4b$ = "q" + If fb4 = 3 Then fig4b$ = "b" + If fb4 = 4 Then fig4b$ = "n" + If fb4 = 5 Then fig4b$ = "r" + If fb4 = 6 Then fig4b$ = "p" + + Dim table(8, 8) As String + table(fw1y, fw1x) = fig1w$ + table(fb1y, fb1x) = fig1b$ + table(fw2y, fw2x) = fig2w$ + table(fb2y, fb2x) = fig2b$ + table(fw3y, fw3x) = fig3w$ + table(fb3y, fb3x) = fig3b$ + table(fw4y, fw4x) = fig4w$ + table(fb4y, fb4x) = fig4b$ + For row = 1 To 8: For col = 1 To 8 + If table(row, col) = "" Then table(row, col) = "+" + Next col: Next row + + mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + lin1$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + count = 0 + End If + Next index + + mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + lin2$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + count = 0 + End If + Next index + + mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + lin3$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + count = 0 + End If + Next index + + mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + lin4$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + count = 0 + End If + Next index + + mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + lin5$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + count = 0 + End If + Next index + + mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + lin6$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + count = 0 + End If + Next index + + mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + lin7$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + count = 0 + End If + Next index + + mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + lin8$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + count = 0 + End If + Next index + + fen$ = lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 28: Print fen$ + + Do + Loop Until InKey$ <> "" + + SetTextClpbrd (fen$) + + url$ = "https://syzygy-tables.info/?fen=" + fen$ + If InStr(_OS$, "[WINDOWS]") Then + Shell url$ + End If + If InStr(_OS$, "[LINUX]") Then + Shell "xdg-open " + url$ + End If + If InStr(_OS$, "[MACOSX]") Then + Shell "open -a safari https://" + url$ + End If + + System +End Sub + +Sub makrukfen () + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then fig1w$ = "L" + If fw1 = 2 Then fig1w$ = "S" + If fw1 = 3 Then fig1w$ = "N" + If fw1 = 4 Then fig1w$ = "H" + If fw1 = 5 Then fig1w$ = "B" + If fw1 = 6 Then fig1w$ = "C" + + If fb1 = 1 Then fig1b$ = "l" + If fb1 = 2 Then fig1b$ = "s" + If fb1 = 3 Then fig1b$ = "n" + If fb1 = 4 Then fig1b$ = "h" + If fb1 = 5 Then fig1b$ = "b" + If fb1 = 6 Then fig1b$ = "c" + + If fw2 = 1 Then fig2w$ = "L" + If fw2 = 2 Then fig2w$ = "S" + If fw2 = 3 Then fig2w$ = "N" + If fw2 = 4 Then fig2w$ = "H" + If fw2 = 5 Then fig2w$ = "B" + If fw2 = 6 Then fig2w$ = "C" + + If fb2 = 1 Then fig2b$ = "l" + If fb2 = 2 Then fig2b$ = "s" + If fb2 = 3 Then fig2b$ = "n" + If fb2 = 4 Then fig2b$ = "h" + If fb2 = 5 Then fig2b$ = "b" + If fb2 = 6 Then fig2b$ = "c" + + If fw3 = 1 Then fig3w$ = "L" + If fw3 = 2 Then fig3w$ = "S" + If fw3 = 3 Then fig3w$ = "N" + If fw3 = 4 Then fig3w$ = "H" + If fw3 = 5 Then fig3w$ = "B" + If fw3 = 6 Then fig3w$ = "C" + + If fb3 = 1 Then fig3b$ = "l" + If fb3 = 2 Then fig3b$ = "s" + If fb3 = 3 Then fig3b$ = "n" + If fb3 = 4 Then fig3b$ = "h" + If fb3 = 5 Then fig3b$ = "b" + If fb3 = 6 Then fig3b$ = "c" + + If fw4 = 1 Then fig4w$ = "L" + If fw4 = 2 Then fig4w$ = "S" + If fw4 = 3 Then fig4w$ = "N" + If fw4 = 4 Then fig4w$ = "H" + If fw4 = 5 Then fig4w$ = "B" + If fw4 = 6 Then fig4w$ = "C" + + If fb4 = 1 Then fig4b$ = "l" + If fb4 = 2 Then fig4b$ = "s" + If fb4 = 3 Then fig4b$ = "n" + If fb4 = 4 Then fig4b$ = "h" + If fb4 = 5 Then fig4b$ = "b" + If fb4 = 6 Then fig4b$ = "c" + + Dim table(8, 8) As String + table(fw1y, fw1x) = fig1w$ + table(fb1y, fb1x) = fig1b$ + table(fw2y, fw2x) = fig2w$ + table(fb2y, fb2x) = fig2b$ + table(fw3y, fw3x) = fig3w$ + table(fb3y, fb3x) = fig3b$ + table(fw4y, fw4x) = fig4w$ + table(fb4y, fb4x) = fig4b$ + For row = 1 To 8: For col = 1 To 8 + If table(row, col) = "" Then table(row, col) = "+" + Next col: Next row + + mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + lin1$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + count = 0 + End If + Next index + + mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + lin2$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + count = 0 + End If + Next index + + mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + lin3$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + count = 0 + End If + Next index + + mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + lin4$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + count = 0 + End If + Next index + + mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + lin5$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + count = 0 + End If + Next index + + mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + lin6$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + count = 0 + End If + Next index + + mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + lin7$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + count = 0 + End If + Next index + + mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + lin8$ = "" + count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + count = 0 + End If + Next index + + fen$ = lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 28: Print fen$ + + Do + Loop Until InKey$ <> "" + + SetTextClpbrd (fen$) + + System +End Sub + +Sub xiangqifen () + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then fig1w$ = "K" + If fw1 = 2 Then fig1w$ = "A" + If fw1 = 3 Then fig1w$ = "E" + If fw1 = 4 Then fig1w$ = "H" + If fw1 = 5 Then fig1w$ = "R" + If fw1 = 6 Then fig1w$ = "C" + If fw1 = 7 Then fig1w$ = "P" + + If fb1 = 1 Then fig1b$ = "k" + If fb1 = 2 Then fig1b$ = "a" + If fb1 = 3 Then fig1b$ = "e" + If fb1 = 4 Then fig1b$ = "h" + If fb1 = 5 Then fig1b$ = "r" + If fb1 = 6 Then fig1b$ = "c" + If fb1 = 7 Then fig1w$ = "p" + + If fw2 = 1 Then fig2w$ = "K" + If fw2 = 2 Then fig2w$ = "A" + If fw2 = 3 Then fig2w$ = "E" + If fw2 = 4 Then fig2w$ = "H" + If fw2 = 5 Then fig2w$ = "R" + If fw2 = 6 Then fig2w$ = "C" + If fw2 = 7 Then fig2w$ = "P" + + If fb2 = 1 Then fig2b$ = "k" + If fb2 = 2 Then fig2b$ = "a" + If fb2 = 3 Then fig2b$ = "e" + If fb2 = 4 Then fig2b$ = "h" + If fb2 = 5 Then fig2b$ = "r" + If fb2 = 6 Then fig2b$ = "c" + If fb2 = 7 Then fig2w$ = "p" + + If fw3 = 1 Then fig3w$ = "K" + If fw3 = 2 Then fig3w$ = "A" + If fw3 = 3 Then fig3w$ = "E" + If fw3 = 4 Then fig3w$ = "H" + If fw3 = 5 Then fig3w$ = "R" + If fw3 = 6 Then fig3w$ = "C" + If fw3 = 7 Then fig3w$ = "P" + + If fb3 = 1 Then fig3b$ = "k" + If fb3 = 2 Then fig3b$ = "a" + If fb3 = 3 Then fig3b$ = "e" + If fb3 = 4 Then fig3b$ = "h" + If fb3 = 5 Then fig3b$ = "r" + If fb3 = 6 Then fig3b$ = "c" + If fb3 = 7 Then fig3w$ = "p" + + If fw4 = 1 Then fig4w$ = "K" + If fw4 = 2 Then fig4w$ = "A" + If fw4 = 3 Then fig4w$ = "E" + If fw4 = 4 Then fig4w$ = "H" + If fw4 = 5 Then fig4w$ = "R" + If fw4 = 6 Then fig4w$ = "C" + If fw4 = 7 Then fig4w$ = "P" + + If fb4 = 1 Then fig4b$ = "k" + If fb4 = 2 Then fig4b$ = "a" + If fb4 = 3 Then fig4b$ = "e" + If fb4 = 4 Then fig4b$ = "h" + If fb4 = 5 Then fig4b$ = "r" + If fb4 = 6 Then fig4b$ = "c" + If fb4 = 7 Then fig4w$ = "p" + + Dim table(10, 9) As String + table(fw1y, fw1x) = fig1w$ + table(fb1y, fb1x) = fig1b$ + table(fw2y, fw2x) = fig2w$ + table(fb2y, fb2x) = fig2b$ + table(fw3y, fw3x) = fig3w$ + table(fb3y, fb3x) = fig3b$ + table(fw4y, fw4x) = fig4w$ + table(fb4y, fb4x) = fig4b$ + For row = 1 To 10: For col = 1 To 9 + If table(row, col) = "" Then table(row, col) = "+" + Next col: Next row + + mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + table(1, 9) + lin1$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + count = 0 + End If + Next index + + mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + table(2, 9) + lin2$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + count = 0 + End If + Next index + + mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + table(3, 9) + lin3$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + count = 0 + End If + Next index + + mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + table(4, 9) + lin4$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + count = 0 + End If + Next index + + mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + table(5, 9) + lin5$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + count = 0 + End If + Next index + + mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + table(6, 9) + lin6$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + count = 0 + End If + Next index + + mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + table(7, 9) + lin7$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + count = 0 + End If + Next index + + mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + table(8, 9) + lin8$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + count = 0 + End If + Next index + + mas9$ = table(9, 1) + table(9, 2) + table(9, 3) + table(9, 4) + table(9, 5) + table(9, 6) + table(9, 7) + table(9, 8) + table(9, 9) + lin9$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + lin9$ = lin9$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas9$, index, 1) <> "+" And count = 0 Then + lin9$ = lin9$ + Mid$(mas9$, index, 1) + End If + If Mid$(mas9$, index, 1) <> "+" And count > 0 Then + lin9$ = lin9$ + LTrim$(Str$(count)) + lin9$ = lin9$ + Mid$(mas9$, index, 1) + count = 0 + End If + Next index + + mas0$ = table(10, 1) + table(10, 2) + table(10, 3) + table(10, 4) + table(10, 5) + table(10, 6) + table(10, 7) + table(10, 8) + table(10, 9) + lin0$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas0$, index, 1) = "+" Then + count = count + 1 + lin0$ = lin0$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas0$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas0$, index, 1) <> "+" And count = 0 Then + lin0$ = lin0$ + Mid$(mas0$, index, 1) + End If + If Mid$(mas0$, index, 1) <> "+" And count > 0 Then + lin0$ = lin0$ + LTrim$(Str$(count)) + lin0$ = lin0$ + Mid$(mas0$, index, 1) + count = 0 + End If + Next index + + fen$ = lin0$ + "/" + lin9$ + "/" + lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 24: Print fen$ + + Do + Loop Until InKey$ <> "" + + SetTextClpbrd (fen$) + + System +End Sub + +Sub shogifen () + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then fig1w$ = "K" + If fw1 = 2 Then fig1w$ = "G" + If fw1 = 3 Then fig1w$ = "S" + If fw1 = 4 Then fig1w$ = "B" + If fw1 = 5 Then fig1w$ = "N" + If fw1 = 6 Then fig1w$ = "R" + If fw1 = 7 Then fig1w$ = "L" + If fw1 = 8 Then fig1w$ = "P" + If fw1 = 9 Then fig1w$ = "H" + If fw1 = 10 Then fig1w$ = "D" + If fw1 = 11 Then fig1w$ = "T" + + If fb1 = 1 Then fig1b$ = "k" + If fb1 = 2 Then fig1b$ = "g" + If fb1 = 3 Then fig1b$ = "a" + If fb1 = 4 Then fig1b$ = "b" + If fb1 = 5 Then fig1b$ = "n" + If fb1 = 6 Then fig1b$ = "r" + If fb1 = 7 Then fig1b$ = "l" + If fb1 = 8 Then fig1b$ = "p" + If fb1 = 9 Then fig1b$ = "h" + If fb1 = 10 Then fig1b$ = "d" + If fb1 = 11 Then fig1b$ = "t" + + If fw2 = 1 Then fig2w$ = "K" + If fw2 = 2 Then fig2w$ = "G" + If fw2 = 3 Then fig2w$ = "S" + If fw2 = 4 Then fig2w$ = "B" + If fw2 = 5 Then fig2w$ = "N" + If fw2 = 6 Then fig2w$ = "R" + If fw2 = 7 Then fig2w$ = "L" + If fw2 = 8 Then fig2w$ = "P" + If fw2 = 9 Then fig2w$ = "H" + If fw2 = 20 Then fig2w$ = "D" + If fw2 = 22 Then fig2w$ = "T" + + If fb2 = 1 Then fig2b$ = "k" + If fb2 = 2 Then fig2b$ = "g" + If fb2 = 3 Then fig2b$ = "a" + If fb2 = 4 Then fig2b$ = "b" + If fb2 = 5 Then fig2b$ = "n" + If fb2 = 6 Then fig2b$ = "r" + If fb2 = 7 Then fig2b$ = "l" + If fb2 = 8 Then fig2b$ = "p" + If fb2 = 9 Then fig2b$ = "h" + If fb2 = 20 Then fig2b$ = "d" + If fb2 = 22 Then fig2b$ = "t" + + If fw3 = 1 Then fig3w$ = "K" + If fw3 = 2 Then fig3w$ = "G" + If fw3 = 3 Then fig3w$ = "S" + If fw3 = 4 Then fig3w$ = "B" + If fw3 = 5 Then fig3w$ = "N" + If fw3 = 6 Then fig3w$ = "R" + If fw3 = 7 Then fig3w$ = "L" + If fw3 = 8 Then fig3w$ = "P" + If fw3 = 9 Then fig3w$ = "H" + If fw3 = 30 Then fig3w$ = "D" + If fw3 = 33 Then fig3w$ = "T" + + If fb3 = 1 Then fig3b$ = "k" + If fb3 = 2 Then fig3b$ = "g" + If fb3 = 3 Then fig3b$ = "a" + If fb3 = 4 Then fig3b$ = "b" + If fb3 = 5 Then fig3b$ = "n" + If fb3 = 6 Then fig3b$ = "r" + If fb3 = 7 Then fig3b$ = "l" + If fb3 = 8 Then fig3b$ = "p" + If fb3 = 9 Then fig3b$ = "h" + If fb3 = 30 Then fig3b$ = "d" + If fb3 = 33 Then fig3b$ = "t" + + If fw4 = 1 Then fig4w$ = "K" + If fw4 = 2 Then fig4w$ = "G" + If fw4 = 3 Then fig4w$ = "S" + If fw4 = 4 Then fig4w$ = "B" + If fw4 = 5 Then fig4w$ = "N" + If fw4 = 6 Then fig4w$ = "R" + If fw4 = 7 Then fig4w$ = "L" + If fw4 = 8 Then fig4w$ = "P" + If fw4 = 9 Then fig4w$ = "H" + If fw4 = 40 Then fig4w$ = "D" + If fw4 = 44 Then fig4w$ = "T" + + If fb4 = 1 Then fig4b$ = "k" + If fb4 = 2 Then fig4b$ = "g" + If fb4 = 3 Then fig4b$ = "a" + If fb4 = 4 Then fig4b$ = "b" + If fb4 = 5 Then fig4b$ = "n" + If fb4 = 6 Then fig4b$ = "r" + If fb4 = 7 Then fig4b$ = "l" + If fb4 = 8 Then fig4b$ = "p" + If fb4 = 9 Then fig4b$ = "h" + If fb4 = 40 Then fig4b$ = "d" + If fb4 = 44 Then fig4b$ = "t" + + Dim table(9, 9) As String + table(fw1y, fw1x) = fig1w$ + table(fb1y, fb1x) = fig1b$ + table(fw2y, fw2x) = fig2w$ + table(fb2y, fb2x) = fig2b$ + table(fw3y, fw3x) = fig3w$ + table(fb3y, fb3x) = fig3b$ + table(fw4y, fw4x) = fig4w$ + table(fb4y, fb4x) = fig4b$ + For row = 1 To 9: For col = 1 To 9 + If table(row, col) = "" Then table(row, col) = "+" + Next col: Next row + + mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + table(1, 9) + lin1$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + count = 0 + End If + Next index + + mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + table(2, 9) + lin2$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + count = 0 + End If + Next index + + mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + table(3, 9) + lin3$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + count = 0 + End If + Next index + + mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + table(4, 9) + lin4$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + count = 0 + End If + Next index + + mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + table(5, 9) + lin5$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + count = 0 + End If + Next index + + mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + table(6, 9) + lin6$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + count = 0 + End If + Next index + + mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + table(7, 9) + lin7$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + count = 0 + End If + Next index + + mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + table(8, 9) + lin8$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + count = 0 + End If + Next index + + mas9$ = table(9, 1) + table(9, 2) + table(9, 3) + table(9, 4) + table(9, 5) + table(9, 6) + table(9, 7) + table(9, 8) + table(9, 9) + lin9$ = "" + count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + lin9$ = lin9$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas9$, index, 1) <> "+" And count = 0 Then + lin9$ = lin9$ + Mid$(mas9$, index, 1) + End If + If Mid$(mas9$, index, 1) <> "+" And count > 0 Then + lin9$ = lin9$ + LTrim$(Str$(count)) + lin9$ = lin9$ + Mid$(mas9$, index, 1) + count = 0 + End If + Next index + + fen$ = lin9$ + "/" + lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 25: Print fen$ + + Do + Loop Until InKey$ <> "" + + SetTextClpbrd (fen$) + + System +End Sub + +Sub draughtsfen () + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then fig1w$ = "D" + If fw1 = 2 Then fig1w$ = "C" + + If fb1 = 1 Then fig1b$ = "d" + If fb1 = 2 Then fig1b$ = "c" + + If fw2 = 1 Then fig2w$ = "D" + If fw2 = 2 Then fig2w$ = "C" + + If fb2 = 1 Then fig2b$ = "d" + If fb2 = 2 Then fig2b$ = "c" + + If fw3 = 1 Then fig3w$ = "D" + If fw3 = 2 Then fig3w$ = "C" + + If fb3 = 1 Then fig3b$ = "d" + If fb3 = 2 Then fig3b$ = "c" + + If fw4 = 1 Then fig4w$ = "D" + If fw4 = 2 Then fig4w$ = "C" + + If fb4 = 1 Then fig4b$ = "d" + If fb4 = 2 Then fig4b$ = "c" + + Dim table(10, 10) As String + table(fw1y, fw1x) = fig1w$ + table(fb1y, fb1x) = fig1b$ + table(fw2y, fw2x) = fig2w$ + table(fb2y, fb2x) = fig2b$ + table(fw3y, fw3x) = fig3w$ + table(fb3y, fb3x) = fig3b$ + table(fw4y, fw4x) = fig4w$ + table(fb4y, fb4x) = fig4b$ + For row = 1 To 10: For col = 1 To 10 + If table(row, col) = "" Then table(row, col) = "+" + Next col: Next row + + mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + table(1, 9) + table(1, 10) + lin1$ = "" + count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + count = 0 + End If + Next index + + mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + table(2, 9) + table(2, 10) + lin2$ = "" + count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + count = 0 + End If + Next index + + mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + table(3, 9) + table(3, 10) + lin3$ = "" + count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + count = 0 + End If + Next index + + mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + table(4, 9) + table(4, 10) + lin4$ = "" + count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + count = 0 + End If + Next index + + mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + table(5, 9) + table(5, 10) + lin5$ = "" + count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + count = 0 + End If + Next index + + mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + table(6, 9) + table(6, 10) + lin6$ = "" + count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + count = 0 + End If + Next index + + mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + table(7, 9) + table(7, 10) + lin7$ = "" + count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + count = 0 + End If + Next index + + mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + table(8, 9) + table(8, 10) + lin8$ = "" + count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + count = 0 + End If + Next index + + mas9$ = table(9, 1) + table(9, 2) + table(9, 3) + table(9, 4) + table(9, 5) + table(9, 6) + table(9, 7) + table(9, 8) + table(9, 9) + table(9, 10) + lin9$ = "" + count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + lin9$ = lin9$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas9$, index, 1) <> "+" And count = 0 Then + lin9$ = lin9$ + Mid$(mas9$, index, 1) + End If + If Mid$(mas9$, index, 1) <> "+" And count > 0 Then + lin9$ = lin9$ + LTrim$(Str$(count)) + lin9$ = lin9$ + Mid$(mas9$, index, 1) + count = 0 + End If + Next index + + mas0$ = table(10, 1) + table(10, 2) + table(10, 3) + table(10, 4) + table(10, 5) + table(10, 6) + table(10, 7) + table(10, 8) + table(10, 9) + table(10, 10) + lin0$ = "" + count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas0$, index, 1) = "+" Then + count = count + 1 + lin0$ = lin0$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas0$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas0$, index, 1) <> "+" And count = 0 Then + lin0$ = lin0$ + Mid$(mas0$, index, 1) + End If + If Mid$(mas0$, index, 1) <> "+" And count > 0 Then + lin0$ = lin0$ + LTrim$(Str$(count)) + lin0$ = lin0$ + Mid$(mas0$, index, 1) + count = 0 + End If + Next index + + fen$ = lin0$ + "/" + lin9$ + "/" + lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 23: Print fen$ + + Do + Loop Until InKey$ <> "" + + SetTextClpbrd (fen$) + + System +End Sub + +Sub message () + Locate 2, 1: Color 9: Print " SPACEBAR - next pair"; " ENTER - display notation "; "ESCAPE - exit " + Locate 2, 5: Color 5: Print "SPACEBAR": Locate 2, 32: Color 5: Print "ENTER": Locate 2, 63: Color 5: Print "ESCAPE" +End Sub + +SUB SetTextClpbrd (Text AS STRING) + + IF OpenClipboard(0) THEN + DIM Dln AS INTEGER + DIM ClpID AS HANDLE + DIM PtToDat AS HGLOBAL + + Dln = len(Text) + 1 + PtToDat = GlobalAlloc(GMEM_MOVEABLE, Dln) + + memcpy(GlobalLock(PtToDat), SADD(Text), Dln) + GlobalUnlock(PtToDat) + + EmptyClipboard () + ClpID = SetClipboardData (CF_OEMTEXT, PtToDat) + + CloseClipboard () + GlobalFree(PtToDat) + END IF + +END SUB \ No newline at end of file diff --git a/sourcwlm.bas b/sourcwlm.bas new file mode 100644 index 0000000..c14be44 --- /dev/null +++ b/sourcwlm.bas @@ -0,0 +1,6734 @@ +$ExeIcon:'dicend.ico' +_Icon +_Title "Dice endgames" +Rem Let scr& = _NewImage(800, 600, 256) +Rem Screen scr& +Rem _FullScreen +Screen 12 +DefInt A-Z +Randomize Timer + +declare sub dice1 as type integer +declare sub dice2 as type integer +declare sub dice3 as type integer +declare sub dice4 as type integer +declare sub dice5 as type integer +declare sub dice6 as type integer +declare sub dice7 as type integer +declare sub dice8 as type integer +declare sub dice9 as type integer +declare sub dice0 as type integer +declare sub number1 as type integer +declare sub number2 as type integer +declare sub number3 as type integer +declare sub number4 as type integer +declare sub number5 as type integer +declare sub number6 as type integer +declare sub number7 as type integer +declare sub number8 as type integer +declare sub number9 as type integer +declare sub number0 as type integer +declare sub numberA as type integer +declare sub numberB as type integer +declare sub numberC as type integer +declare sub numberD as type integer +declare sub numberE as type integer +declare sub numberF as type integer +declare sub numberG as type integer +declare sub numberH as type integer +declare sub numberI as type integer +declare sub numberJ as type integer +declare sub letter1 as type integer +declare sub letter2 as type integer +declare sub letter3 as type integer +declare sub letter4 as type integer +declare sub letter5 as type integer +declare sub letter6 as type integer +declare sub letter7 as type integer +declare sub letter8 as type integer +declare sub letter9 as type integer +declare sub letter0 as type integer +declare sub letterA as type integer +declare sub letterB as type integer +declare sub letterC as type integer +declare sub letterD as type integer +declare sub letterE as type integer +declare sub letterF as type integer +declare sub letterG as type integer +declare sub letterH as type integer +declare sub letterI as type integer +declare sub letterJ as type integer +declare sub king as type integer +declare sub queen as type integer +declare sub bishop as type integer +declare sub knight as type integer +declare sub rook as type integer +declare sub pawn as type integer +declare sub cannon as type integer +declare sub lance as type integer +declare sub general as type integer +declare sub tokin as type integer +declare sub dragon as type integer +declare sub horse as type integer +declare sub dame as type integer +declare sub checker as type integer +declare sub cells as type integer +declare sub dices as type integer +declare sub chessboard as type integer +declare sub makrukboard as type integer +declare sub xiangqiboard as type integer +declare sub shogiboard as type integer +declare sub draughtsboard as type integer +declare sub chess as type string +declare sub makruk as type string +declare sub xiangqi as type string +declare sub shogi as type string +declare sub draughts as type string +declare sub chessfen as type string +declare sub makrukfen as type string +declare sub xiangqifen as type string +declare sub shogifen as type string +declare sub draughtsfen as type string + +Common Shared x, y, cd1, cd2, cn, cl, cf, cb1, cb2, cb3, cb4, cb5 As Integer +Common Shared dc1, dc2, dc3, dc4, dc5, dc6, w1, b1, w2, b2, w3, b3, w4, b4, fw1, fb1, fw2, fb2, fw3, fb3, fw4, fb4, row, col, index, count As Integer +Common Shared fw1x, fw1y, fb1x, fb1y, fw2x, fw2y, fb2x, fb2y, fw3x, fw3y, fb3x, fb3y, fw4x, fw4y, fb4x, fb4y As Integer +Common Shared fig1w, fig1b, fig2w, fig2b, fig3w, fig3b, fig4w, fig4b, mas1, mas2, mas3, mas4, mas5, mas6, mas7, mas8, mas9, mas0, lin1, lin2, lin3, lin4, lin5, lin6, lin7, lin8, lin9, lin0, fen As String +Let cd1 = 2: Let cd2 = 15: Let cn = 7: Let cl = 14: Let cf = 1: Let cb1 = 7: Let cb2 = 6: Let cb3 = 3: Let cb4 = 13: Let cb5 = 9 + +Dim Shared board(8, 8) As Integer +Let index = 100 +For row = 1 To 8: For col = 1 To 8 + Let board(row, col) = index + 1 + Let index = index + 1 +Next col: Next row + +Dim Shared xiabo(10, 9) As Integer +Let index = 100 +For row = 1 To 10: For col = 1 To 9 + Let xiabo(row, col) = index + 1 + Let index = index + 1 +Next col: Next row + +Dim Shared shobo(9, 9) As Integer +Let index = 100 +For row = 1 To 9: For col = 1 To 9 + Let shobo(row, col) = index + 1 + Let index = index + 1 +Next col: Next row + +Dim Shared drabo(10, 10) As Integer +Let index = 100 +For row = 1 To 10: For col = 1 To 10 + Let drabo(row, col) = index + 1 + Let index = index + 1 +Next col: Let index = index + 1: Next row + +Line (2, 2)-(122, 4), 14, BF: Line -(120, 338), 14, BF: Line -(2, 336), 14, BF: Line -(4, 2), 14, BF +Line (4, 42)-(120, 44), 14, BF: Paint (20, 20), 8, 14 +Line (128, 2)-(248, 4), 14, BF: Line -(246, 338), 14, BF: Line -(128, 336), 14, BF: Line -(130, 2), 14, BF +Line (130, 42)-(246, 44), 14, BF: Paint (160, 20), 8, 14 +Line (254, 2)-(394, 4), 14, BF: Line -(392, 386), 14, BF: Line -(254, 384), 14, BF: Line -(256, 2), 14, BF +Line (256, 42)-(392, 44), 14, BF: Paint (300, 20), 8, 14 +Line (400, 2)-(637, 4), 14, BF: Line -(635, 338), 14, BF: Line -(400, 336), 14, BF: Line -(402, 2), 14, BF +Line (402, 42)-(635, 44), 14, BF: Paint (440, 20), 8, 14 +Line (2, 344)-(248, 346), 14, BF: Line -(246, 432), 14, BF: Line -(2, 430), 14, BF: Line -(4, 344), 14, BF +Line (4, 378)-(246, 376), 14, BF: Paint (20, 360), 8, 14 +Color 14, 8: Locate 2, 4: Print "1 - Chess": Locate 2, 19: Print "2 - Makruk": Locate 2, 36: Print "3 - Xiangqi": Locate 2, 61: Print "4 - Shogi": Locate 23, 10: Print "5 - Draughts" +Color 12, 0: Locate 23, 52: Print "Press number to select game": Locate 24, 59: Print "or Esc to exit" + +Color 11, 0 +Let x = 10: For y = 50 To 300 Step 48 + Call cells +Next y +Let x = 10: Let y = 50: Call king +Let x = 10: Let y = y + 48: Call queen +Let x = 10: Let y = y + 48: Call bishop +Let x = 10: Let y = y + 48: Call knight +Let x = 10: Let y = y + 48: Call rook +Let x = 10: Let y = y + 48: Call pawn +Locate 5, 9: Print "King": Locate 8, 9: Print "Queen" +Locate 11, 9: Print "Bishop": Locate 14, 9: Print "Knight" +Locate 17, 9: Print "Rook": Locate 20, 9: Print "Pawn" +Let x = 136: For y = 50 To 300 Step 48 + Call cells +Next y +Let x = 136: Let y = 50: Call king +Let x = 136: Let y = y + 48: Call queen +Let x = 136: Let y = y + 48: Call bishop +Let x = 136: Let y = y + 48: Call knight +Let x = 136: Let y = y + 48: Call rook +Let x = 136: Let y = y + 48: Call checker +Locate 5, 25: Print "Lord": Locate 8, 25: Print "Seed" +Locate 11, 25: Print "Noble": Locate 14, 25: Print "Horse" +Locate 17, 25: Print "Boat": Locate 20, 25: Print "Shell" +Let x = 262: For y = 50 To 350 Step 48 + Call cells +Next y +Let x = 262: Let y = 50: Call king +Let x = 262: Let y = y + 48: Call queen +Let x = 262: Let y = y + 48: Call bishop +Let x = 262: Let y = y + 48: Call knight +Let x = 262: Let y = y + 48: Call rook +Let x = 262: Let y = y + 48: Call cannon +Let x = 262: Let y = y + 48: Call pawn +Locate 5, 41: Print "General": Locate 8, 41: Print "Advisor" +Locate 11, 41: Print "Elephant": Locate 14, 41: Print "Horse" +Locate 17, 41: Print "Chariot": Locate 20, 41: Print "Cannon" +Locate 23, 41: Print "Soldier" +Let x = 408: For y = 50 To 300 Step 48 + Call cells +Next y +Let x = 528: For y = 50 To 250 Step 48 + Call cells +Next y +Let x = 408: Let y = 50: Call king +Let x = 408: Let y = y + 48: Call queen +Let x = 408: Let y = y + 48: Call general +Let x = 408: Let y = y + 48: Call bishop +Let x = 408: Let y = y + 48: Call knight +Let x = 408: Let y = y + 48: Call rook +Let x = 528: Let y = 50: Call lance +Let x = 528: Let y = y + 48: Call pawn +Let x = 528: Let y = y + 48: Call horse +Let x = 528: Let y = y + 48: Call dragon +Let x = 528: Let y = y + 48: Call tokin +Locate 5, 59: Print "King": Locate 8, 59: Print "Gold" +Locate 11, 59: Print "Silver": Locate 14, 59: Print "Bishop" +Locate 17, 59: Print "Knight": Locate 20, 59: Print "Rook" +Locate 5, 74: Print "Lance": Locate 8, 74: Print "Pawn" +Locate 11, 74: Print "Horse": Locate 14, 74: Print "Dragon" +Locate 17, 74: Print "Tokin" +Let x = 10: Let y = 384 +Call cells: Call checker +Let x = 136: Let y = 384 +Call cells: Call dame +Locate 26, 9: Print "Checker": Locate 26, 25: Print "Dame" + +Do + Select Case InKey$ + Case Is = Chr$(49) + Cls + Call message + Call chessboard + Call dices + Call chess + Case Is = Chr$(50) + Cls + Call message + Call makrukboard + Call dices + Call makruk + Case Is = Chr$(51) + Cls + Call message + Call xiangqiboard + Call dices + Call xiangqi + Case Is = Chr$(52) + Cls + Call message + Call shogiboard + Call dices + Call shogi + Case Is = Chr$(53) + Cls + Call message + Call draughtsboard + Call dices + Call draughts + Case Is = Chr$(27) + Exit Do + End Select +Loop +End + +Sub dice1 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF +End Sub + +Sub dice2 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF +End Sub + +Sub dice3 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF +End Sub + +Sub dice4 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice5 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice6 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice7 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice8 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (16 + x, 4 + y)-(24 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (16 + x, 28 + y)-(24 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice9 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (16 + x, 4 + y)-(24 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (16 + x, 16 + y)-(24 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (16 + x, 28 + y)-(24 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF +End Sub + +Sub dice0 + Line (x, y)-(40 + x, 40 + y), cd1, BF + Line (4 + x, 4 + y)-(12 + x, 12 + y), cd2, BF + Line (28 + x, 4 + y)-(36 + x, 12 + y), cd2, BF + Line (4 + x, 16 + y)-(12 + x, 24 + y), cd2, BF + Line (28 + x, 16 + y)-(36 + x, 24 + y), cd2, BF + Line (4 + x, 28 + y)-(12 + x, 36 + y), cd2, BF + Line (28 + x, 28 + y)-(36 + x, 36 + y), cd2, BF + Line (16 + x, 1 + y)-(24 + x, 9 + y), cd2, BF + Line (16 + x, 11 + y)-(24 + x, 19 + y), cd2, BF + Line (16 + x, 21 + y)-(24 + x, 29 + y), cd2, BF + Line (16 + x, 31 + y)-(24 + x, 39 + y), cd2, BF +End Sub + +Sub number1 + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (5 + x, 8 + y)-(6 + x, 1 + y), cn, BF + Line (4 + x, 2 + y)-(1 + x, 5 + y), cn + Line (4 + x, 3 + y)-(1 + x, 6 + y), cn +End Sub + +Sub number2 + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (1 + x, 8 + y)-(2 + x, 7 + y), cn, BF + Line (10 + x, 4 + y)-(9 + x, 3 + y), cn, BF +End Sub + +Sub number3 + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (2 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (5 + x, 5 + y)-(9 + x, 6 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 4 + y), cn, BF + Line (9 + x, 7 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub number4 + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 1 + y)-(2 + x, 4 + y), cn, BF + Line (9 + x, 1 + y)-(10 + x, 10 + y), cn, BF +End Sub + +Sub number5 + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 8 + y)-(9 + x, 7 + y), cn, BF + Line (2 + x, 4 + y)-(1 + x, 3 + y), cn, BF +End Sub + +Sub number6 + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 8 + y)-(9 + x, 7 + y), cn, BF + Line (1 + x, 8 + y)-(2 + x, 3 + y), cn, BF +End Sub + +Sub number7 + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 3 + y)-(3 + x, 10 + y), cn + Line (9 + x, 3 + y)-(2 + x, 10 + y), cn + Line (8 + x, 3 + y)-(1 + x, 10 + y), cn +End Sub + +Sub number8 + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (2 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (2 + x, 6 + y)-(9 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(2 + x, 4 + y), cn, BF + Line (1 + x, 7 + y)-(2 + x, 9 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 4 + y), cn, BF + Line (9 + x, 7 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub number9 + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 8 + y)-(9 + x, 3 + y), cn, BF + Line (2 + x, 4 + y)-(1 + x, 3 + y), cn, BF +End Sub + +Sub number0 + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (2 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (1 + x, 2 + y)-(2 + x, 9 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub numberA + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(2 + x, 10 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 10 + y), cn, BF + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF +End Sub + +Sub numberB + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (1 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(9 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 4 + y), cn, BF + Line (9 + x, 7 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub numberC + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (1 + x, 1 + y)-(10 + x, 2 + y), cn, BF + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub numberD + Line (2 + x, 2 + y)-(9 + x, 1 + y), cn, BF + Line (2 + x, 10 + y)-(9 + x, 9 + y), cn, BF + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (9 + x, 2 + y)-(10 + x, 9 + y), cn, BF +End Sub + +Sub numberE + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF +End Sub + +Sub numberF + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF +End Sub + +Sub numberG + Line (1 + x, 10 + y)-(10 + x, 9 + y), cn, BF + Line (8 + x, 6 + y)-(6 + x, 5 + y), cn, BF + Line (1 + x, 2 + y)-(10 + x, 1 + y), cn, BF + Line (10 + x, 8 + y)-(9 + x, 5 + y), cn, BF + Line (1 + x, 8 + y)-(2 + x, 3 + y), cn, BF +End Sub + +Sub numberH + Line (1 + x, 6 + y)-(10 + x, 5 + y), cn, BF + Line (1 + x, 1 + y)-(2 + x, 10 + y), cn, BF + Line (9 + x, 1 + y)-(10 + x, 10 + y), cn, BF +End Sub + +Sub numberI + Line (3 + x, 2 + y)-(8 + x, 1 + y), cn, BF + Line (3 + x, 10 + y)-(8 + x, 9 + y), cn, BF + Line (5 + x, 3 + y)-(6 + x, 8 + y), cn, BF +End Sub + +Sub numberJ + Line (1 + x, 6 + y)-(2 + x, 9 + y), cn, BF + Line (9 + x, 1 + y)-(10 + x, 9 + y), cn, BF + Line (2 + x, 9 + y)-(9 + x, 10 + y), cn, BF +End Sub + +Sub letter1 + Line (4 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (18 + x, 31 + y)-(22 + x, 4 + y), cl, BF + Line (17 + x, 4 + y)-(4 + x, 17 + y), cl + Line (17 + x, 5 + y)-(5 + x, 17 + y), cl + Line (17 + x, 6 + y)-(6 + x, 17 + y), cl + Line (17 + x, 7 + y)-(7 + x, 17 + y), cl +End Sub + +Sub letter2 + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cl, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (32 + x, 9 + y)-(36 + x, 17 + y), cl, BF + Line (4 + x, 23 + y)-(8 + x, 31 + y), cl, BF +End Sub + +Sub letter3 + Line (4 + x, 4 + y)-(34 + x, 8 + y), cl, BF + Line (4 + x, 36 + y)-(34 + x, 32 + y), cl, BF + Line (36 + x, 23 + y)-(32 + x, 34 + y), cl, BF + Line (32 + x, 6 + y)-(36 + x, 17 + y), cl, BF + Line (18 + x, 18 + y)-(34 + x, 22 + y), cl, BF + Line (30 + x, 17 + y)-(31 + x, 17 + y), cl + Line (30 + x, 23 + y)-(31 + x, 23 + y), cl + Line (30 + x, 9 + y)-(31 + x, 9 + y), cl + Line (30 + x, 31 + y)-(31 + x, 31 + y), cl + PSet (31 + x, 10 + y), cl: PSet (31 + x, 30 + y), cl + PSet (31 + x, 16 + y), cl: PSet (31 + x, 24 + y), cl + PSet (35 + x, 18 + y), cl: PSet (35 + x, 22 + y), cl + PSet (35 + x, 5 + y), cl: PSet (35 + x, 35 + y), cl +End Sub + +Sub letter4 + Line (4 + x, 4 + y)-(8 + x, 17 + y), cl, BF + Line (32 + x, 4 + y)-(36 + x, 36 + y), cl, BF + Line (4 + x, 18 + y)-(34 + x, 22 + y), cl, BF +End Sub + +Sub letter5 + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cl, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (4 + x, 9 + y)-(8 + x, 17 + y), cl, BF + Line (32 + x, 23 + y)-(36 + x, 31 + y), cl, BF +End Sub + +Sub letter6 + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cl, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (4 + x, 9 + y)-(8 + x, 31 + y), cl, BF + Line (32 + x, 23 + y)-(36 + x, 31 + y), cl, BF +End Sub + +Sub letter7 + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (8 + x, 36 + y)-(35 + x, 9 + y), cl + Line (7 + x, 36 + y)-(34 + x, 9 + y), cl + Line (6 + x, 36 + y)-(33 + x, 9 + y), cl + Line (5 + x, 36 + y)-(32 + x, 9 + y), cl +End Sub + +Sub letter8 + Line (8 + x, 23 + y)-(4 + x, 34 + y), cl, BF + Line (4 + x, 6 + y)-(8 + x, 17 + y), cl, BF + Line (6 + x, 4 + y)-(34 + x, 8 + y), cl, BF + Line (6 + x, 36 + y)-(34 + x, 32 + y), cl, BF + Line (36 + x, 23 + y)-(32 + x, 34 + y), cl, BF + Line (32 + x, 6 + y)-(36 + x, 17 + y), cl, BF + Line (6 + x, 18 + y)-(34 + x, 22 + y), cl, BF + Line (30 + x, 17 + y)-(31 + x, 17 + y), cl + Line (30 + x, 23 + y)-(31 + x, 23 + y), cl + Line (10 + x, 17 + y)-(9 + x, 17 + y), cl + Line (10 + x, 23 + y)-(9 + x, 23 + y), cl + Line (9 + x, 31 + y)-(10 + x, 31 + y), cl + Line (30 + x, 31 + y)-(31 + x, 31 + y), cl + Line (9 + x, 9 + y)-(10 + x, 9 + y), cl + Line (30 + x, 9 + y)-(31 + x, 9 + y), cl + PSet (35 + x, 5 + y), cl: PSet (35 + x, 35 + y), cl + PSet (5 + x, 5 + y), cl: PSet (5 + x, 35 + y), cl + PSet (9 + x, 30 + y), cl: PSet (31 + x, 30 + y), cl + PSet (9 + x, 10 + y), cl: PSet (31 + x, 10 + y), cl + PSet (5 + x, 18 + y), cl: PSet (5 + x, 22 + y), cl + PSet (9 + x, 16 + y), cl: PSet (9 + x, 24 + y), cl + PSet (31 + x, 16 + y), cl: PSet (31 + x, 24 + y), cl + PSet (35 + x, 18 + y), cl: PSet (35 + x, 22 + y), cl +End Sub + +Sub letter9 + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cl, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (32 + x, 9 + y)-(36 + x, 31 + y), cl, BF +End Sub + +Sub letter0 + Line (6 + x, 4 + y)-(34 + x, 8 + y), cl, BF + Line (6 + x, 36 + y)-(34 + x, 32 + y), cl, BF + Line (4 + x, 6 + y)-(8 + x, 34 + y), cl, BF + Line (36 + x, 6 + y)-(32 + x, 34 + y), cl, BF + Line (9 + x, 9 + y)-(10 + x, 9 + y), cl + Line (30 + x, 9 + y)-(31 + x, 9 + y), cl + Line (9 + x, 31 + y)-(10 + x, 31 + y), cl + Line (30 + x, 31 + y)-(31 + x, 31 + y), cl + Line (9 + x, 9 + y)-(10 + x, 9 + y), cl + Line (30 + x, 9 + y)-(31 + x, 9 + y), cl + PSet (35 + x, 5 + y), cl: PSet (35 + x, 35 + y), cl + PSet (5 + x, 5 + y), cl: PSet (5 + x, 35 + y), cl + PSet (9 + x, 30 + y), cl: PSet (31 + x, 30 + y), cl + PSet (9 + x, 10 + y), cl: PSet (31 + x, 10 + y), cl +End Sub + +Sub letterA + Line (4 + x, 6 + y)-(8 + x, 36 + y), cl, BF + Line (32 + x, 6 + y)-(36 + x, 36 + y), cl, BF + Line (4 + x, 18 + y)-(34 + x, 22 + y), cl, BF + Line (6 + x, 4 + y)-(34 + x, 8 + y), cl, BF + Line (30 + x, 9 + y)-(31 + x, 9 + y), cl + Line (9 + x, 9 + y)-(10 + x, 9 + y), cl + PSet (9 + x, 10 + y), cl: PSet (31 + x, 10 + y), cl + PSet (5 + x, 5 + y), cl: PSet (35 + x, 5 + y), cl +End Sub + +Sub letterB + Line (4 + x, 9 + y)-(8 + x, 31 + y), cl, BF + Line (4 + x, 4 + y)-(34 + x, 8 + y), cl, BF + Line (4 + x, 36 + y)-(34 + x, 32 + y), cl, BF + Line (36 + x, 23 + y)-(32 + x, 34 + y), cl, BF + Line (32 + x, 6 + y)-(36 + x, 17 + y), cl, BF + Line (9 + x, 18 + y)-(34 + x, 22 + y), cl, BF + Line (30 + x, 17 + y)-(31 + x, 17 + y), cl + Line (30 + x, 23 + y)-(31 + x, 23 + y), cl + Line (30 + x, 9 + y)-(31 + x, 9 + y), cl + Line (30 + x, 31 + y)-(31 + x, 31 + y), cl + PSet (31 + x, 10 + y), cl: PSet (31 + x, 30 + y), cl + PSet (31 + x, 16 + y), cl: PSet (31 + x, 24 + y), cl + PSet (35 + x, 18 + y), cl: PSet (35 + x, 22 + y), cl + PSet (35 + x, 5 + y), cl: PSet (35 + x, 35 + y), cl +End Sub + +Sub letterC + Line (6 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (6 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (4 + x, 6 + y)-(8 + x, 34 + y), cl, BF + Line (9 + x, 9 + y)-(10 + x, 9 + y), cl + Line (9 + x, 31 + y)-(10 + x, 31 + y), cl + PSet (9 + x, 10 + y), cl: PSet (9 + x, 30 + y), cl + PSet (5 + x, 5 + y), cl: PSet (5 + x, 35 + y), cl +End Sub + +Sub letterD + Line (4 + x, 4 + y)-(34 + x, 8 + y), cl, BF + Line (4 + x, 36 + y)-(34 + x, 32 + y), cl, BF + Line (4 + x, 4 + y)-(8 + x, 36 + y), cl, BF + Line (32 + x, 6 + y)-(36 + x, 34 + y), cl, BF + Line (30 + x, 9 + y)-(31 + x, 9 + y), cl + Line (30 + x, 31 + y)-(31 + x, 31 + y), cl + PSet (31 + x, 10 + y), cl: PSet (31 + x, 30 + y), cl + PSet (35 + x, 5 + y), cl: PSet (35 + x, 35 + y), cl +End Sub + +Sub letterE + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cl, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (4 + x, 4 + y)-(8 + x, 36 + y), cl, BF +End Sub + +Sub letterF + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (4 + x, 18 + y)-(36 + x, 22 + y), cl, BF + Line (4 + x, 4 + y)-(8 + x, 36 + y), cl, BF +End Sub + +Sub letterG + Line (4 + x, 4 + y)-(36 + x, 8 + y), cl, BF + Line (20 + x, 18 + y)-(36 + x, 22 + y), cl, BF + Line (4 + x, 36 + y)-(36 + x, 32 + y), cl, BF + Line (4 + x, 9 + y)-(8 + x, 31 + y), cl, BF + Line (32 + x, 23 + y)-(36 + x, 31 + y), cl, BF +End Sub + +Sub letterH + Line (4 + x, 4 + y)-(8 + x, 36 + y), cl, BF + Line (32 + x, 4 + y)-(36 + x, 36 + y), cl, BF + Line (4 + x, 18 + y)-(34 + x, 22 + y), cl, BF +End Sub + +Sub letterI + Line (8 + x, 36 + y)-(32 + x, 32 + y), cl, BF + Line (18 + x, 31 + y)-(22 + x, 9 + y), cl, BF + Line (8 + x, 8 + y)-(32 + x, 3 + y), cl, BF +End Sub + +Sub letterJ + Line (6 + x, 36 + y)-(34 + x, 32 + y), cl, BF + Line (32 + x, 4 + y)-(36 + x, 34 + y), cl, BF + Line (4 + x, 18 + y)-(8 + x, 34 + y), cl, BF + Line (9 + x, 31 + y)-(10 + x, 31 + y), cl + Line (30 + x, 31 + y)-(31 + x, 31 + y), cl + PSet (9 + x, 30 + y), cl: PSet (31 + x, 30 + y), cl + PSet (5 + x, 35 + y), cl: PSet (35 + x, 35 + y), cl +End Sub + +Sub king + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (12 + x, 31 + y)-(28 + x, 31 + y), cf + Line (13 + x, 30 + y)-(27 + x, 30 + y), cf + Line (14 + x, 29 + y)-(26 + x, 29 + y), cf + Line (15 + x, 28 + y)-(25 + x, 28 + y), cf + Line (16 + x, 27 + y)-(24 + x, 10 + y), cf, BF + Line (15 + x, 24 + y)-(25 + x, 24 + y), cf + Line (14 + x, 23 + y)-(26 + x, 23 + y), cf + Line (13 + x, 22 + y)-(27 + x, 22 + y), cf + Line (12 + x, 21 + y)-(28 + x, 21 + y), cf + Line (11 + x, 20 + y)-(29 + x, 20 + y), cf + Line (10 + x, 19 + y)-(30 + x, 19 + y), cf + Line (9 + x, 18 + y)-(31 + x, 18 + y), cf + Line (8 + x, 17 + y)-(32 + x, 17 + y), cf + Line (7 + x, 16 + y)-(33 + x, 16 + y), cf + Line (6 + x, 15 + y)-(34 + x, 15 + y), cf + Line (5 + x, 14 + y)-(35 + x, 14 + y), cf + Line (4 + x, 13 + y)-(36 + x, 12 + y), cf, BF + Line (4 + x, 11 + y)-(14 + x, 10 + y), cf, BF + Line (5 + x, 9 + y)-(13 + x, 9 + y), cf + Line (6 + x, 8 + y)-(12 + x, 8 + y), cf + Line (7 + x, 7 + y)-(11 + x, 7 + y), cf + Line (26 + x, 11 + y)-(36 + x, 10 + y), cf, BF + Line (27 + x, 9 + y)-(35 + x, 9 + y), cf + Line (28 + x, 8 + y)-(34 + x, 8 + y), cf + Line (29 + x, 7 + y)-(33 + x, 7 + y), cf + Line (17 + x, 9 + y)-(23 + x, 8 + y), cf, BF + Line (18 + x, 7 + y)-(22 + x, 6 + y), cf, BF + Line (19 + x, 5 + y)-(21 + x, 4 + y), cf, BF +End Sub + +Sub queen + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 14 + y), cf, BF + Line (11 + x, 24 + y)-(29 + x, 24 + y), cf + Line (10 + x, 23 + y)-(30 + x, 23 + y), cf + Line (9 + x, 22 + y)-(31 + x, 22 + y), cf + Line (8 + x, 21 + y)-(32 + x, 21 + y), cf + Line (7 + x, 20 + y)-(33 + x, 20 + y), cf + Line (6 + x, 19 + y)-(34 + x, 18 + y), cf, BF + Line (6 + x, 17 + y)-(7 + x, 10 + y), cf, BF + Line (5 + x, 11 + y)-(8 + x, 14 + y), cf, BF + Line (4 + x, 12 + y)-(9 + x, 13 + y), cf, BF + Line (34 + x, 17 + y)-(33 + x, 10 + y), cf, BF + Line (35 + x, 11 + y)-(32 + x, 14 + y), cf, BF + Line (36 + x, 12 + y)-(31 + x, 13 + y), cf, BF + Line (12 + x, 13 + y)-(13 + x, 6 + y), cf, BF + Line (11 + x, 7 + y)-(14 + x, 10 + y), cf, BF + Line (10 + x, 8 + y)-(15 + x, 9 + y), cf, BF + Line (27 + x, 13 + y)-(28 + x, 6 + y), cf, BF + Line (26 + x, 7 + y)-(29 + x, 10 + y), cf, BF + Line (25 + x, 8 + y)-(30 + x, 9 + y), cf, BF + Line (19 + x, 13 + y)-(21 + x, 4 + y), cf, BF + Line (18 + x, 5 + y)-(22 + x, 8 + y), cf, BF + Line (17 + x, 6 + y)-(23 + x, 7 + y), cf, BF +End Sub + +Sub bishop + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (18 + x, 31 + y)-(22 + x, 6 + y), cf, BF + Line (19 + x, 5 + y)-(21 + x, 4 + y), cf, BF + Line (12 + x, 31 + y)-(28 + x, 31 + y), cf + Line (13 + x, 30 + y)-(27 + x, 30 + y), cf + Line (14 + x, 29 + y)-(26 + x, 29 + y), cf + Line (15 + x, 28 + y)-(25 + x, 28 + y), cf + Line (16 + x, 27 + y)-(24 + x, 27 + y), cf + Line (17 + x, 26 + y)-(23 + x, 26 + y), cf + Line (17 + x, 21 + y)-(23 + x, 8 + y), cf, BF + Line (16 + x, 19 + y)-(24 + x, 10 + y), cf, BF + Line (15 + x, 17 + y)-(25 + x, 12 + y), cf, BF + Line (14 + x, 15 + y)-(26 + x, 14 + y), cf, BF +End Sub + +Sub knight + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (12 + x, 31 + y)-(28 + x, 31 + y), cf + Line (13 + x, 30 + y)-(29 + x, 30 + y), cf + Line (14 + x, 29 + y)-(30 + x, 29 + y), cf + Line (15 + x, 28 + y)-(31 + x, 28 + y), cf + Line (16 + x, 27 + y)-(32 + x, 27 + y), cf + Line (17 + x, 26 + y)-(33 + x, 26 + y), cf + Line (18 + x, 25 + y)-(34 + x, 25 + y), cf + Line (19 + x, 24 + y)-(35 + x, 24 + y), cf + Line (20 + x, 23 + y)-(36 + x, 18 + y), cf, BF + Line (4 + x, 17 + y)-(35 + x, 17 + y), cf + Line (4 + x, 16 + y)-(34 + x, 16 + y), cf + Line (5 + x, 15 + y)-(33 + x, 15 + y), cf + Line (6 + x, 14 + y)-(32 + x, 14 + y), cf + Line (7 + x, 13 + y)-(31 + x, 13 + y), cf + Line (8 + x, 12 + y)-(30 + x, 12 + y), cf + Line (9 + x, 11 + y)-(29 + x, 11 + y), cf + Line (10 + x, 10 + y)-(28 + x, 10 + y), cf + Line (11 + x, 9 + y)-(27 + x, 9 + y), cf + Line (12 + x, 8 + y)-(26 + x, 8 + y), cf + Line (13 + x, 7 + y)-(25 + x, 7 + y), cf + Line (14 + x, 6 + y)-(24 + x, 6 + y), cf + Line (15 + x, 5 + y)-(23 + x, 5 + y), cf + Line (16 + x, 4 + y)-(22 + x, 4 + y), cf +End Sub + +Sub rook + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (4 + x, 4 + y)-(8 + x, 12 + y), cf, BF + Line (13 + x, 4 + y)-(17 + x, 12 + y), cf, BF + Line (23 + x, 4 + y)-(27 + x, 12 + y), cf, BF + Line (32 + x, 4 + y)-(36 + x, 12 + y), cf, BF + Line (4 + x, 12 + y)-(36 + x, 16 + y), cf, BF + Line (12 + x, 16 + y)-(28 + x, 32 + y), cf, BF + Line (9 + x, 16 + y)-(11 + x, 16 + y), cf + Line (29 + x, 16 + y)-(31 + x, 16 + y), cf + Line (10 + x, 17 + y)-(11 + x, 17 + y), cf + Line (29 + x, 17 + y)-(30 + x, 17 + y), cf + PSet (11 + x, 18 + y), cf: PSet (29 + x, 18 + y), cf + Line (9 + x, 31 + y)-(11 + x, 31 + y), cf + Line (29 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(11 + x, 30 + y), cf + Line (29 + x, 30 + y)-(30 + x, 30 + y), cf + PSet (11 + x, 29 + y), cf: PSet (29 + x, 29 + y), cf +End Sub + +Sub pawn + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (18 + x, 32 + y)-(22 + x, 4 + y), cf, BF + Line (12 + x, 9 + y)-(28 + x, 14 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 26 + y), cf + Line (15 + x, 25 + y)-(25 + x, 25 + y), cf + Line (16 + x, 24 + y)-(24 + x, 24 + y), cf + Line (17 + x, 23 + y)-(23 + x, 23 + y), cf + Line (17 + x, 19 + y)-(23 + x, 19 + y), cf + Line (16 + x, 18 + y)-(24 + x, 18 + y), cf + Line (15 + x, 17 + y)-(25 + x, 17 + y), cf + Line (14 + x, 16 + y)-(26 + x, 16 + y), cf + Line (13 + x, 15 + y)-(27 + x, 15 + y), cf + Line (13 + x, 8 + y)-(27 + x, 8 + y), cf + Line (14 + x, 7 + y)-(26 + x, 7 + y), cf + Line (15 + x, 6 + y)-(25 + x, 6 + y), cf + Line (16 + x, 5 + y)-(24 + x, 5 + y), cf + Line (17 + x, 4 + y)-(23 + x, 4 + y), cf +End Sub + +Sub cannon + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 26 + y), cf + Line (15 + x, 25 + y)-(25 + x, 25 + y), cf + Line (16 + x, 24 + y)-(24 + x, 4 + y), cf, BF + Line (6 + x, 9 + y)-(36 + x, 12 + y), cf, BF + Line (4 + x, 10 + y)-(6 + x, 11 + y), cf, BF + Line (14 + x, 16 + y)-(25 + x, 16 + y), cf + Line (12 + x, 15 + y)-(26 + x, 15 + y), cf + Line (10 + x, 14 + y)-(27 + x, 14 + y), cf + Line (8 + x, 13 + y)-(28 + x, 13 + y), cf + Line (8 + x, 8 + y)-(28 + x, 8 + y), cf + Line (10 + x, 7 + y)-(27 + x, 7 + y), cf + Line (12 + x, 6 + y)-(26 + x, 6 + y), cf + Line (14 + x, 5 + y)-(25 + x, 5 + y), cf + Line (16 + x, 4 + y)-(24 + x, 4 + y), cf +End Sub + +Sub general + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 26 + y), cf + Line (13 + x, 25 + y)-(27 + x, 22 + y), cf, BF + Line (16 + x, 21 + y)-(24 + x, 20 + y), cf, BF + Line (18 + x, 19 + y)-(22 + x, 12 + y), cf, BF + Line (19 + x, 11 + y)-(21 + x, 4 + y), cf, BF + Line (18 + x, 10 + y)-(22 + x, 5 + y), cf, BF + Line (17 + x, 9 + y)-(23 + x, 6 + y), cf, BF + Line (16 + x, 8 + y)-(24 + x, 7 + y), cf, BF + Line (15 + x, 20 + y)-(16 + x, 19 + y), cf, BF + Line (14 + x, 19 + y)-(15 + x, 18 + y), cf, BF + Line (13 + x, 18 + y)-(14 + x, 17 + y), cf, BF + Line (24 + x, 20 + y)-(25 + x, 19 + y), cf, BF + Line (25 + x, 19 + y)-(26 + x, 18 + y), cf, BF + Line (26 + x, 18 + y)-(27 + x, 17 + y), cf, BF + Line (11 + x, 18 + y)-(12 + x, 11 + y), cf, BF + Line (10 + x, 17 + y)-(13 + x, 12 + y), cf, BF + Line (9 + x, 16 + y)-(14 + x, 13 + y), cf, BF + Line (8 + x, 15 + y)-(15 + x, 14 + y), cf, BF + Line (28 + x, 18 + y)-(29 + x, 11 + y), cf, BF + Line (27 + x, 17 + y)-(30 + x, 12 + y), cf, BF + Line (26 + x, 16 + y)-(31 + x, 13 + y), cf, BF + Line (25 + x, 15 + y)-(32 + x, 14 + y), cf, BF + Line (4 + x, 24 + y)-(36 + x, 23 + y), cf, BF + Line (29 + x, 25 + y)-(35 + x, 22 + y), cf, BF + Line (30 + x, 26 + y)-(34 + x, 21 + y), cf, BF + Line (31 + x, 27 + y)-(33 + x, 20 + y), cf, BF + Line (5 + x, 25 + y)-(11 + x, 22 + y), cf, BF + Line (6 + x, 26 + y)-(10 + x, 21 + y), cf, BF + Line (7 + x, 27 + y)-(9 + x, 20 + y), cf, BF +End Sub + +Sub tokin + Line (10 + x, 10 + y)-(30 + x, 30 + y), cf, BF + Line (4 + x, 4 + y)-(5 + x, 5 + y), cf, BF + Line (5 + x, 5 + y)-(7 + x, 7 + y), cf, BF + Line (6 + x, 6 + y)-(9 + x, 9 + y), cf, BF + Line (7 + x, 7 + y)-(11 + x, 11 + y), cf, BF + Line (8 + x, 8 + y)-(12 + x, 12 + y), cf, BF + Line (36 + x, 4 + y)-(35 + x, 5 + y), cf, BF + Line (35 + x, 5 + y)-(33 + x, 7 + y), cf, BF + Line (34 + x, 6 + y)-(31 + x, 9 + y), cf, BF + Line (33 + x, 7 + y)-(29 + x, 11 + y), cf, BF + Line (32 + x, 8 + y)-(28 + x, 12 + y), cf, BF + Line (36 + x, 36 + y)-(35 + x, 35 + y), cf, BF + Line (35 + x, 35 + y)-(33 + x, 33 + y), cf, BF + Line (34 + x, 34 + y)-(31 + x, 31 + y), cf, BF + Line (33 + x, 33 + y)-(29 + x, 29 + y), cf, BF + Line (32 + x, 32 + y)-(28 + x, 28 + y), cf, BF + Line (4 + x, 36 + y)-(5 + x, 35 + y), cf, BF + Line (5 + x, 35 + y)-(7 + x, 33 + y), cf, BF + Line (6 + x, 34 + y)-(9 + x, 31 + y), cf, BF + Line (7 + x, 33 + y)-(11 + x, 29 + y), cf, BF + Line (8 + x, 32 + y)-(12 + x, 28 + y), cf, BF + Line (17 + x, 9 + y)-(23 + x, 8 + y), cf, BF + Line (18 + x, 7 + y)-(22 + x, 6 + y), cf, BF + Line (19 + x, 5 + y)-(21 + x, 4 + y), cf, BF + Line (17 + x, 31 + y)-(23 + x, 32 + y), cf, BF + Line (18 + x, 33 + y)-(22 + x, 34 + y), cf, BF + Line (19 + x, 35 + y)-(21 + x, 36 + y), cf, BF + Line (8 + x, 17 + y)-(9 + x, 23 + y), cf, BF + Line (6 + x, 18 + y)-(7 + x, 22 + y), cf, BF + Line (4 + x, 19 + y)-(5 + x, 21 + y), cf, BF + Line (32 + x, 17 + y)-(31 + x, 23 + y), cf, BF + Line (34 + x, 18 + y)-(33 + x, 22 + y), cf, BF + Line (36 + x, 19 + y)-(35 + x, 21 + y), cf, BF +End Sub + +Sub lance + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 24 + y), cf, BF + Line (15 + x, 23 + y)-(25 + x, 20 + y), cf, BF + Line (16 + x, 19 + y)-(24 + x, 16 + y), cf, BF + Line (17 + x, 15 + y)-(23 + x, 12 + y), cf, BF + Line (18 + x, 11 + y)-(22 + x, 8 + y), cf, BF + Line (19 + x, 7 + y)-(21 + x, 4 + y), cf, BF +End Sub + +Sub dragon + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (9 + x, 31 + y)-(31 + x, 31 + y), cf + Line (10 + x, 30 + y)-(30 + x, 30 + y), cf + Line (11 + x, 29 + y)-(29 + x, 29 + y), cf + Line (12 + x, 28 + y)-(28 + x, 28 + y), cf + Line (13 + x, 27 + y)-(27 + x, 27 + y), cf + Line (14 + x, 26 + y)-(26 + x, 26 + y), cf + Line (15 + x, 25 + y)-(25 + x, 25 + y), cf + Line (15 + x, 20 + y)-(25 + x, 20 + y), cf + Line (14 + x, 19 + y)-(26 + x, 19 + y), cf + Line (13 + x, 18 + y)-(27 + x, 18 + y), cf + Line (16 + x, 24 + y)-(24 + x, 8 + y), cf, BF + Line (17 + x, 7 + y)-(23 + x, 6 + y), cf, BF + Line (18 + x, 5 + y)-(22 + x, 5 + y), cf + Line (19 + x, 4 + y)-(21 + x, 4 + y), cf + Line (9 + x, 12 + y)-(31 + x, 17 + y), cf, BF + Line (10 + x, 11 + y)-(13 + x, 11 + y), cf + Line (11 + x, 10 + y)-(12 + x, 10 + y), cf + Line (27 + x, 11 + y)-(30 + x, 11 + y), cf + Line (28 + x, 10 + y)-(29 + x, 10 + y), cf + Line (10 + x, 11 + y)-(10 + x, 18 + y), cf + Line (9 + x, 12 + y)-(9 + x, 19 + y), cf + Line (8 + x, 13 + y)-(8 + x, 20 + y), cf + Line (7 + x, 14 + y)-(7 + x, 21 + y), cf + Line (6 + x, 15 + y)-(6 + x, 22 + y), cf + Line (5 + x, 16 + y)-(5 + x, 23 + y), cf + Line (4 + x, 17 + y)-(4 + x, 24 + y), cf + Line (30 + x, 11 + y)-(30 + x, 18 + y), cf + Line (31 + x, 12 + y)-(31 + x, 19 + y), cf + Line (32 + x, 13 + y)-(32 + x, 20 + y), cf + Line (33 + x, 14 + y)-(33 + x, 21 + y), cf + Line (34 + x, 15 + y)-(34 + x, 22 + y), cf + Line (35 + x, 16 + y)-(35 + x, 23 + y), cf + Line (36 + x, 17 + y)-(36 + x, 24 + y), cf +End Sub + +Sub horse + Line (8 + x, 36 + y)-(32 + x, 32 + y), cf, BF + Line (10 + x, 31 + y)-(11 + x, 26 + y), cf, BF + Line (16 + x, 31 + y)-(17 + x, 26 + y), cf, BF + Line (23 + x, 31 + y)-(24 + x, 26 + y), cf, BF + Line (29 + x, 31 + y)-(30 + x, 26 + y), cf, BF + Line (8 + x, 25 + y)-(32 + x, 14 + y), cf, BF + Line (7 + x, 24 + y)-(7 + x, 15 + y), cf + Line (6 + x, 23 + y)-(6 + x, 16 + y), cf + Line (5 + x, 22 + y)-(5 + x, 17 + y), cf + Line (4 + x, 21 + y)-(4 + x, 18 + y), cf + Line (33 + x, 24 + y)-(33 + x, 15 + y), cf + Line (34 + x, 23 + y)-(34 + x, 16 + y), cf + Line (35 + x, 22 + y)-(35 + x, 17 + y), cf + Line (36 + x, 21 + y)-(36 + x, 18 + y), cf + Line (14 + x, 13 + y)-(26 + x, 10 + y), cf, BF + Line (10 + x, 9 + y)-(30 + x, 7 + y), cf, BF + Line (10 + x, 6 + y)-(13 + x, 6 + y), cf + Line (10 + x, 5 + y)-(12 + x, 5 + y), cf + Line (10 + x, 4 + y)-(11 + x, 4 + y), cf + Line (30 + x, 6 + y)-(27 + x, 6 + y), cf + Line (30 + x, 5 + y)-(28 + x, 5 + y), cf + Line (30 + x, 4 + y)-(29 + x, 4 + y), cf + Line (16 + x, 6 + y)-(24 + x, 6 + y), cf + Line (17 + x, 5 + y)-(23 + x, 5 + y), cf + Line (18 + x, 4 + y)-(22 + x, 4 + y), cf +End Sub + +Sub dame + Line (14 + x, 36 + y)-(26 + x, 28 + y), cf, BF + Line (14 + x, 4 + y)-(26 + x, 12 + y), cf, BF + Line (4 + x, 14 + y)-(12 + x, 26 + y), cf, BF + Line (28 + x, 14 + y)-(36 + x, 26 + y), cf, BF + Line (17 + x, 36 + y)-(17 + x, 27 + y), cf + Line (16 + x, 36 + y)-(16 + x, 26 + y), cf + Line (15 + x, 36 + y)-(15 + x, 25 + y), cf + Line (14 + x, 36 + y)-(14 + x, 24 + y), cf + Line (13 + x, 35 + y)-(13 + x, 23 + y), cf + Line (12 + x, 34 + y)-(12 + x, 22 + y), cf + Line (23 + x, 36 + y)-(23 + x, 27 + y), cf + Line (24 + x, 36 + y)-(24 + x, 26 + y), cf + Line (25 + x, 36 + y)-(25 + x, 25 + y), cf + Line (26 + x, 36 + y)-(26 + x, 24 + y), cf + Line (27 + x, 35 + y)-(27 + x, 23 + y), cf + Line (28 + x, 34 + y)-(28 + x, 22 + y), cf + Line (17 + x, 4 + y)-(17 + x, 13 + y), cf + Line (16 + x, 4 + y)-(16 + x, 14 + y), cf + Line (15 + x, 4 + y)-(15 + x, 15 + y), cf + Line (14 + x, 4 + y)-(14 + x, 16 + y), cf + Line (13 + x, 5 + y)-(13 + x, 17 + y), cf + Line (12 + x, 6 + y)-(12 + x, 18 + y), cf + Line (23 + x, 4 + y)-(23 + x, 13 + y), cf + Line (24 + x, 4 + y)-(24 + x, 14 + y), cf + Line (25 + x, 4 + y)-(25 + x, 15 + y), cf + Line (26 + x, 4 + y)-(26 + x, 16 + y), cf + Line (27 + x, 5 + y)-(27 + x, 17 + y), cf + Line (28 + x, 6 + y)-(28 + x, 18 + y), cf + Line (5 + x, 13 + y)-(5 + x, 27 + y), cf + Line (6 + x, 12 + y)-(6 + x, 28 + y), cf + Line (7 + x, 11 + y)-(7 + x, 29 + y), cf + Line (8 + x, 10 + y)-(8 + x, 30 + y), cf + Line (9 + x, 9 + y)-(9 + x, 31 + y), cf + Line (10 + x, 8 + y)-(10 + x, 32 + y), cf + Line (11 + x, 7 + y)-(11 + x, 33 + y), cf + Line (35 + x, 13 + y)-(35 + x, 27 + y), cf + Line (34 + x, 12 + y)-(34 + x, 28 + y), cf + Line (33 + x, 11 + y)-(33 + x, 29 + y), cf + Line (32 + x, 10 + y)-(32 + x, 30 + y), cf + Line (31 + x, 9 + y)-(31 + x, 31 + y), cf + Line (30 + x, 8 + y)-(30 + x, 32 + y), cf + Line (29 + x, 7 + y)-(29 + x, 33 + y), cf +End Sub + +Sub checker + Line (14 + x, 36 + y)-(26 + x, 32 + y), cf, BF + Line (14 + x, 4 + y)-(26 + x, 8 + y), cf, BF + Line (4 + x, 14 + y)-(8 + x, 26 + y), cf, BF + Line (32 + x, 14 + y)-(36 + x, 26 + y), cf, BF + Line (13 + x, 35 + y)-(13 + x, 31 + y), cf + Line (12 + x, 34 + y)-(12 + x, 30 + y), cf + Line (11 + x, 33 + y)-(11 + x, 29 + y), cf + Line (10 + x, 32 + y)-(10 + x, 28 + y), cf + Line (9 + x, 31 + y)-(9 + x, 27 + y), cf + Line (8 + x, 30 + y)-(8 + x, 26 + y), cf + Line (27 + x, 35 + y)-(27 + x, 31 + y), cf + Line (28 + x, 34 + y)-(28 + x, 30 + y), cf + Line (29 + x, 33 + y)-(29 + x, 29 + y), cf + Line (30 + x, 32 + y)-(30 + x, 28 + y), cf + Line (31 + x, 31 + y)-(31 + x, 27 + y), cf + Line (32 + x, 30 + y)-(32 + x, 26 + y), cf + Line (13 + x, 5 + y)-(13 + x, 9 + y), cf + Line (12 + x, 6 + y)-(12 + x, 10 + y), cf + Line (11 + x, 7 + y)-(11 + x, 11 + y), cf + Line (10 + x, 8 + y)-(10 + x, 12 + y), cf + Line (9 + x, 9 + y)-(9 + x, 13 + y), cf + Line (8 + x, 10 + y)-(8 + x, 14 + y), cf + Line (27 + x, 5 + y)-(27 + x, 9 + y), cf + Line (28 + x, 6 + y)-(28 + x, 10 + y), cf + Line (29 + x, 7 + y)-(29 + x, 11 + y), cf + Line (30 + x, 8 + y)-(30 + x, 12 + y), cf + Line (31 + x, 9 + y)-(31 + x, 13 + y), cf + Line (32 + x, 10 + y)-(32 + x, 14 + y), cf + Line (5 + x, 13 + y)-(5 + x, 27 + y), cf + Line (6 + x, 12 + y)-(6 + x, 28 + y), cf + Line (7 + x, 11 + y)-(7 + x, 29 + y), cf + Line (35 + x, 13 + y)-(35 + x, 27 + y), cf + Line (34 + x, 12 + y)-(34 + x, 28 + y), cf + Line (33 + x, 11 + y)-(33 + x, 29 + y), cf + Line (17 + x, 28 + y)-(23 + x, 24 + y), cf, BF + Line (17 + x, 12 + y)-(23 + x, 16 + y), cf, BF + Line (12 + x, 17 + y)-(16 + x, 23 + y), cf, BF + Line (24 + x, 17 + y)-(28 + x, 23 + y), cf, BF + Line (18 + x, 28 + y)-(18 + x, 23 + y), cf + Line (17 + x, 28 + y)-(17 + x, 22 + y), cf + Line (16 + x, 27 + y)-(16 + x, 21 + y), cf + Line (22 + x, 28 + y)-(22 + x, 23 + y), cf + Line (23 + x, 28 + y)-(23 + x, 22 + y), cf + Line (24 + x, 27 + y)-(24 + x, 21 + y), cf + Line (18 + x, 12 + y)-(18 + x, 17 + y), cf + Line (17 + x, 12 + y)-(17 + x, 18 + y), cf + Line (16 + x, 13 + y)-(16 + x, 19 + y), cf + Line (22 + x, 12 + y)-(22 + x, 17 + y), cf + Line (23 + x, 12 + y)-(23 + x, 18 + y), cf + Line (24 + x, 13 + y)-(24 + x, 19 + y), cf + Line (13 + x, 16 + y)-(13 + x, 24 + y), cf + Line (14 + x, 15 + y)-(14 + x, 25 + y), cf + Line (15 + x, 14 + y)-(15 + x, 26 + y), cf + Line (27 + x, 16 + y)-(27 + x, 24 + y), cf + Line (26 + x, 15 + y)-(26 + x, 25 + y), cf + Line (25 + x, 14 + y)-(25 + x, 26 + y), cf +End Sub + +Sub cells + Line (x, y)-(x + 40, y + 40), cd1, BF + Line (x - 1, y - 1)-(x + 41, y + 41), cb1, B +End Sub + +Sub dices + Line (20, 160)-(60, 200), cd1, BF + Line (20, 220)-(60, 260), cd1, BF + Line (20, 280)-(60, 320), cd1, BF + Line (580, 160)-(620, 200), cd1, BF + Line (580, 220)-(620, 260), cd1, BF + Line (580, 280)-(620, 320), cd1, BF + Line (19, 159)-(61, 201), cb1, B + Line (19, 219)-(61, 261), cb1, B + Line (19, 279)-(61, 321), cb1, B + Line (579, 159)-(621, 201), cb1, B + Line (579, 219)-(621, 261), cb1, B + Line (579, 279)-(621, 321), cb1, B +End Sub + +Sub chessboard + Line (160, 80)-(480, 400), cb2, BF + For x = 160 To 480 Step 40 + Line (x, 80)-(x, 400), cb1 + Next x + For y = 80 To 400 Step 40 + Line (160, y)-(480, y), cb1 + Next y + For y = 320 To 80 Step -80: For x = 400 To 160 Step -80 + Line (x + 1, y + 1)-(x + 39, y + 39), cb3, BF + Line (x + 41, y + 41)-(x + 79, y + 79), cb3, BF + Next x: Next y + Let y = 405 + Let x = 175: Call numberA + Let x = 215: Call numberB + Let x = 255: Call numberC + Let x = 295: Call numberD + Let x = 335: Call numberE + Let x = 375: Call numberF + Let x = 415: Call numberG + Let x = 455: Call numberH + Let x = 145 + Let y = 95: Call number8 + Let y = 135: Call number7 + Let y = 175: Call number6 + Let y = 215: Call number5 + Let y = 255: Call number4 + Let y = 295: Call number3 + Let y = 335: Call number2 + Let y = 375: Call number1 +End Sub + +Sub makrukboard + Line (160, 80)-(480, 400), cb2, BF + For x = 160 To 480 Step 40 + Line (x, 80)-(x, 400), cb1 + Next x + For y = 80 To 400 Step 40 + Line (160, y)-(480, y), cb1 + Next y + Let y = 405 + Let x = 175: Call numberA + Let x = 215: Call numberB + Let x = 255: Call numberC + Let x = 295: Call numberD + Let x = 335: Call numberE + Let x = 375: Call numberF + Let x = 415: Call numberG + Let x = 455: Call numberH + Let x = 145 + Let y = 95: Call number8 + Let y = 135: Call number7 + Let y = 175: Call number6 + Let y = 215: Call number5 + Let y = 255: Call number4 + Let y = 295: Call number3 + Let y = 335: Call number2 + Let y = 375: Call number1 +End Sub + +Sub xiangqiboard + Line (140, 40)-(500, 440), cb2, BF + For x = 140 To 500 Step 40 + Line (x, 40)-(x, 440), cb1 + Next x + For y = 40 To 440 Step 40 + Line (140, y)-(500, y), cb1 + Next y + Line (259, 161)-(381, 159), cb4, BF + Line (259, 41)-(261, 159), cb4, BF + Line (379, 41)-(381, 159), cb4, BF + Line (259, 321)-(381, 319), cb4, BF + Line (259, 439)-(261, 319), cb4, BF + Line (379, 439)-(381, 319), cb4, BF + Line (141, 238)-(499, 242), cb5, BF + Let y = 445 + Let x = 155: Call numberA + Let x = 195: Call numberB + Let x = 235: Call numberC + Let x = 275: Call numberD + Let x = 315: Call numberE + Let x = 355: Call numberF + Let x = 395: Call numberG + Let x = 435: Call numberH + Let x = 475: Call numberI + Let x = 125 + Let y = 55: Call number0 + Let y = 95: Call number9 + Let y = 135: Call number8 + Let y = 175: Call number7 + Let y = 215: Call number6 + Let y = 255: Call number5 + Let y = 295: Call number4 + Let y = 335: Call number3 + Let y = 375: Call number2 + Let y = 415: Call number1 +End Sub + +Sub shogiboard + Line (140, 60)-(500, 420), cb2, BF + For x = 140 To 500 Step 40 + Line (x, 60)-(x, 420), cb1 + Next x + For y = 60 To 400 Step 40 + Line (140, y)-(500, y), cb1 + Next y + Let y = 425 + Let x = 155: Call numberA + Let x = 195: Call numberB + Let x = 235: Call numberC + Let x = 275: Call numberD + Let x = 315: Call numberE + Let x = 355: Call numberF + Let x = 395: Call numberG + Let x = 435: Call numberH + Let x = 475: Call numberI + Let x = 125 + Let y = 75: Call number9 + Let y = 115: Call number8 + Let y = 155: Call number7 + Let y = 195: Call number6 + Let y = 235: Call number5 + Let y = 275: Call number4 + Let y = 315: Call number3 + Let y = 355: Call number2 + Let y = 395: Call number1 +End Sub + +Sub draughtsboard + Line (120, 40)-(520, 440), cb2, BF + For x = 120 To 520 Step 40 + Line (x, 40)-(x, 440), cb1 + Next x + For y = 40 To 440 Step 40 + Line (120, y)-(520, y), cb1 + Next y + For y = 360 To 40 Step -80: For x = 440 To 120 Step -80 + Line (x + 1, y + 1)-(x + 39, y + 39), cb3, BF + Line (x + 41, y + 41)-(x + 79, y + 79), cb3, BF + Next x: Next y + Let y = 445 + Let x = 135: Call numberA + Let x = 175: Call numberB + Let x = 215: Call numberC + Let x = 255: Call numberD + Let x = 295: Call numberE + Let x = 335: Call numberF + Let x = 375: Call numberG + Let x = 415: Call numberH + Let x = 455: Call numberI + Let x = 495: Call numberJ + Let x = 105 + Let y = 55: Call number0 + Let y = 95: Call number9 + Let y = 135: Call number8 + Let y = 175: Call number7 + Let y = 215: Call number6 + Let y = 255: Call number5 + Let y = 295: Call number4 + Let y = 335: Call number3 + Let y = 375: Call number2 + Let y = 415: Call number1 +End Sub + +Sub chess + + Rem 1st roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = 1 + Let w1 = board(dc2, dc1): Let b1 = board(dc5, dc4) + + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let w1 = board(dc2, dc1): Let b1 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While Abs(w1 - b1) < 10 + + Let w1 = board(dc2, dc1): Let b1 = board(dc5, dc4) + Let fw1x = dc1: Let fw1y = dc2: Let fb1x = dc4: Let fb1y = dc5 + Let fw1 = dc3: Let fb1 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15: Call king + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0: Call king + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call chessfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 2nd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = Int(Rnd * 5 + 2) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = Int(Rnd * 5 + 2) + Let w2 = board(dc2, dc1): Let b2 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc2 = 1 Or dc2 = 8 + End Select + Select Case dc6 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc5 = 1 Or dc5 = 8 + End Select + + Let w2 = board(dc2, dc1): Let b2 = board(dc5, dc4) + Let fw2x = dc1: Let fw2y = dc2: Let fb2x = dc4: Let fb2y = dc5 + Let fw2 = dc3: Let fb2 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call pawn + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call pawn + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call chessfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 3rd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = Int(Rnd * 5 + 2) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = Int(Rnd * 5 + 2) + Let w3 = board(dc2, dc1): Let b3 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw3x = dc1: Let fw3y = dc2 + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw3x = dc1: Let fw3y = dc2 + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc2 = 1 Or dc2 = 8 + End Select + Select Case dc6 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb3x = dc4: Let fb3y = dc5 + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb3x = dc4: Let fb3y = dc5 + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc5 = 1 Or dc5 = 8 + End Select + + Let w3 = board(dc2, dc1): Let b3 = board(dc5, dc4) + Let fw3x = dc1: Let fw3y = dc2: Let fb3x = dc4: Let fb3y = dc5 + Let fw3 = dc3: Let fb3 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call pawn + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call pawn + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call chessfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 4th roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = Int(Rnd * 5 + 2) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = Int(Rnd * 5 + 2) + Let w4 = board(dc2, dc1): Let b4 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw4x = dc1: Let fw4y = dc2 + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw4x = dc1: Let fw4y = dc2 + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc2 = 1 Or dc2 = 8 + End Select + Select Case dc6 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb4x = dc4: Let fb4y = dc5 + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb4x = dc4: Let fb4y = dc5 + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc5 = 1 Or dc5 = 8 + End Select + + Let w4 = board(dc2, dc1): Let b4 = board(dc5, dc4) + Let fw4x = dc1: Let fw4y = dc2: Let fb4x = dc4: Let fb4y = dc5 + Let fw4 = dc3: Let fb4 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call pawn + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call pawn + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Case + Case Is = Chr$(13) + Call chessfen + Case Is = Chr$(27) + End + End Select + Loop +End Sub + +Sub makruk + + Rem 1st roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = 1 + Let w1 = board(dc2, dc1): Let b1 = board(dc5, dc4) + + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let w1 = board(dc2, dc1): Let b1 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While Abs(w1 - b1) < 10 + + Let w1 = board(dc2, dc1): Let b1 = board(dc5, dc4) + Let fw1x = dc1: Let fw1y = dc2: Let fb1x = dc4: Let fb1y = dc5 + Let fw1 = dc3: Let fb1 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15: Call king + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0: Call king + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call makrukfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 2nd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = Int(Rnd * 5 + 2) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = Int(Rnd * 5 + 2) + Let w2 = board(dc2, dc1): Let b2 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + Let indexw3 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Let indexw4 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Let indexw5 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w2 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc2 < 3 Or dc2 > 5 + End Select + Select Case dc6 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + Let indexb3 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Let indexb4 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Let indexb5 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b2 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc5 < 4 Or dc5 > 6 + End Select + + Let w2 = board(dc2, dc1): Let b2 = board(dc5, dc4) + Let fw2x = dc1: Let fw2y = dc2: Let fb2x = dc4: Let fb2y = dc5 + Let fw2 = dc3: Let fb2 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call checker + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call checker + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call makrukfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 3rd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = Int(Rnd * 5 + 2) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = Int(Rnd * 5 + 2) + Let w3 = board(dc2, dc1): Let b3 = board(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + Let indexw3 = indexw3 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Let indexw4 = indexw4 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Let indexw5 = indexw5 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw3x = dc1: Let fw3y = dc2 + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w3 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc2 < 3 Or dc2 > 5 + End Select + Select Case dc6 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + Let indexb3 = indexb3 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Let indexb4 = indexb4 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Let indexb5 = indexb5 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb3x = dc4: Let fb3y = dc5 + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b3 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc5 < 4 Or dc5 > 6 + End Select + + Let w3 = board(dc2, dc1): Let b3 = board(dc5, dc4) + Let fw3x = dc1: Let fw3y = dc2: Let fb3x = dc4: Let fb3y = dc5 + Let fw3 = dc3: Let fb3 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call checker + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call checker + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call makrukfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 4th roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc3 = Int(Rnd * 5 + 2) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let dc6 = Int(Rnd * 5 + 2) + Let w4 = board(dc2, dc1): Let b4 = board(dc5, dc4) + If indexw3 > 2 Or indexw4 > 2 Or indexw5 > 2 Then Let dc3 = 6 + If indexb3 > 2 Or indexb4 > 2 Or indexb5 > 2 Then Let dc6 = 6 + + Select Case dc3 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let fw4x = dc1: Let fw4y = dc2 + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let w4 = board(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc2 < 3 Or dc2 > 5 + End Select + Select Case dc6 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let fb4x = dc4: Let fb4y = dc5 + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let b4 = board(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc5 <= 4 Or dc5 >= 6 + End Select + + Let w4 = board(dc2, dc1): Let b4 = board(dc5, dc4) + Let fw4x = dc1: Let fw4y = dc2: Let fb4x = dc4: Let fb4y = dc5 + Let fw4 = dc3: Let fb4 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + Let x = (dc1 * 40) + 120: Let y = Abs((dc2 * 40) - 480) - 80 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call checker + Let x = (dc4 * 40) + 120: Let y = Abs((dc5 * 40) - 480) - 80 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call checker + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Case + Case Is = Chr$(13) + Call makrukfen + Case Is = Chr$(27) + End + End Select + Loop + +End Sub + +Sub xiangqi + + Rem 1st roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 3 + 4) + Let dc2 = Int(Rnd * 3 + 1) + Let dc3 = 1 + Let dc4 = Int(Rnd * 3 + 4) + Let dc5 = Int(Rnd * 3 + 8) + Let dc6 = 1 + Let w1 = xiabo(dc2, dc1): Let b1 = xiabo(dc5, dc4) + + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 3 + 4) + Let dc2 = Int(Rnd * 3 + 1) + Let dc4 = Int(Rnd * 3 + 4) + Let dc5 = Int(Rnd * 3 + 8) + Let w1 = xiabo(dc2, dc1): Let b1 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w1 = b1 + + Let w1 = xiabo(dc2, dc1): Let b1 = xiabo(dc5, dc4) + Let fw1x = dc1: Let fw1y = dc2: Let fb1x = dc4: Let fb1y = dc5 + Let fw1 = dc3: Let fb1 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call cannon + If dc3 = 7 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call cannon + If dc6 = 7 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15: Call king + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0: Call king + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call xiangqifen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 2nd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let dc3 = Int(Rnd * 6 + 2) + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let dc6 = Int(Rnd * 6 + 2) + Let w2 = xiabo(dc2, dc1): Let b2 = xiabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Exit Case + Case Is = 2 + Let indexw2 = 1 + Let dc1 = Int(Rnd * 3 + 4) + Let dc2 = Int(Rnd * 3 + 1) + Do + Let count = count + 1 + Let index = Int(Rnd * 5 + 1) + If index = 1 Then + Let dc1 = 4 + Let dc2 = 1 + End If + If index = 2 Then + Let dc1 = 6 + Let dc2 = 1 + End If + If index = 3 Then + Let dc1 = 5 + Let dc2 = 2 + End If + If index = 4 Then + Let dc1 = 4 + Let dc2 = 3 + End If + If index = 5 Then + Let dc1 = 6 + Let dc2 = 3 + End If + Let w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or w2 Mod 2 <> 0 + Case Is = 3 + Let indexw3 = 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 5 + 1) + Do + Let count = count + 1 + Let index = Int(Rnd * 7 + 1) + If index = 1 Then + Let dc1 = 3 + Let dc2 = 1 + End If + If index = 2 Then + Let dc1 = 7 + Let dc2 = 1 + End If + If index = 3 Then + Let dc1 = 1 + Let dc2 = 3 + End If + If index = 4 Then + Let dc1 = 5 + Let dc2 = 3 + End If + If index = 5 Then + Let dc1 = 9 + Let dc2 = 3 + End If + If index = 6 Then + Let dc1 = 3 + Let dc2 = 5 + End If + If index = 7 Then + Let dc1 = 7 + Let dc2 = 5 + End If + Let w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Let indexw4 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Let indexw5 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Let indexw6 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 7 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w2 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc2 < 4 Or dc2 > 7 + End Select + Select Case dc6 + Case Is = 1 + Exit Case + Case Is = 2 + Let indexb2 = 1 + Let dc4 = Int(Rnd * 3 + 4) + Let dc5 = Int(Rnd * 3 + 8) + Do + Let count = count + 1 + Let index = Int(Rnd * 5 + 1) + If index = 1 Then + Let dc4 = 4 + Let dc5 = 10 + End If + If index = 2 Then + Let dc4 = 6 + Let dc5 = 10 + End If + If index = 3 Then + Let dc4 = 5 + Let dc5 = 9 + End If + If index = 4 Then + Let dc4 = 4 + Let dc5 = 8 + End If + If index = 5 Then + Let dc4 = 6 + Let dc5 = 8 + End If + Let b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or b2 Mod 2 = 0 + Case Is = 3 + Let indexb3 = 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 5 + 6) + Do + Let count = count + 1 + Let index = Int(Rnd * 7 + 1) + If index = 1 Then + Let dc4 = 3 + Let dc5 = 10 + End If + If index = 2 Then + Let dc4 = 7 + Let dc5 = 10 + End If + If index = 3 Then + Let dc4 = 1 + Let dc5 = 8 + End If + If index = 4 Then + Let dc4 = 5 + Let dc5 = 8 + End If + If index = 5 Then + Let dc4 = 9 + Let dc5 = 8 + End If + If index = 6 Then + Let dc4 = 3 + Let dc5 = 6 + End If + If index = 7 Then + Let dc4 = 7 + Let dc5 = 6 + End If + Let b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or b2 + Case Is = 4 + Let indexb4 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Let indexb5 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Let indexb6 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 7 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b2 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc5 < 3 Or dc5 > 8 + End Select + + Let w2 = xiabo(dc2, dc1): Let b2 = xiabo(dc5, dc4) + Let fw2x = dc1: Let fw2y = dc2: Let fb2x = dc4: Let fb2y = dc5 + Let fw2 = dc3: Let fb2 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call cannon + If dc3 = 7 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call cannon + If dc6 = 7 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call cannon + If dc3 = 7 Then Call pawn + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call cannon + If dc6 = 7 Then Call pawn + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call xiangqifen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 3rd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let dc3 = Int(Rnd * 6 + 2) + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let dc6 = Int(Rnd * 6 + 2) + Let w3 = xiabo(dc2, dc1): Let b3 = xiabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Exit Case + Case Is = 2 + Let indexw2 = indexw2 + 1 + Let dc1 = Int(Rnd * 3 + 4) + Let dc2 = Int(Rnd * 3 + 1) + Do + Let count = count + 1 + Let index = Int(Rnd * 5 + 1) + If index = 1 Then + Let dc1 = 4 + Let dc2 = 1 + End If + If index = 2 Then + Let dc1 = 6 + Let dc2 = 1 + End If + If index = 3 Then + Let dc1 = 5 + Let dc2 = 2 + End If + If index = 4 Then + Let dc1 = 4 + Let dc2 = 3 + End If + If index = 5 Then + Let dc1 = 6 + Let dc2 = 3 + End If + Let w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or w3 Mod 2 <> 0 + Case Is = 3 + Let indexw3 = indexw3 + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 5 + 1) + Do + Let count = count + 1 + Let index = Int(Rnd * 7 + 1) + If index = 1 Then + Let dc1 = 3 + Let dc2 = 1 + End If + If index = 2 Then + Let dc1 = 7 + Let dc2 = 1 + End If + If index = 3 Then + Let dc1 = 1 + Let dc2 = 3 + End If + If index = 4 Then + Let dc1 = 5 + Let dc2 = 3 + End If + If index = 5 Then + Let dc1 = 9 + Let dc2 = 3 + End If + If index = 6 Then + Let dc1 = 3 + Let dc2 = 5 + End If + If index = 7 Then + Let dc1 = 7 + Let dc2 = 5 + End If + Let w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Let indexw4 = indexw4 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Let indexw5 = indexw5 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let fw3x = dc1: Let fw3y = dc2 + Let w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Let indexw6 = indexw6 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let fw3x = dc1: Let fw3y = dc2 + Let w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 7 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w3 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc2 < 4 Or dc2 > 7 + End Select + Select Case dc6 + Case Is = 1 + Exit Case + Case Is = 2 + Let indexb2 = indexb2 + 1 + Let dc4 = Int(Rnd * 3 + 4) + Let dc5 = Int(Rnd * 3 + 8) + Do + Let count = count + 1 + Let index = Int(Rnd * 5 + 1) + If index = 1 Then + Let dc4 = 4 + Let dc5 = 10 + End If + If index = 2 Then + Let dc4 = 6 + Let dc5 = 10 + End If + If index = 3 Then + Let dc4 = 5 + Let dc5 = 9 + End If + If index = 4 Then + Let dc4 = 4 + Let dc5 = 8 + End If + If index = 5 Then + Let dc4 = 6 + Let dc5 = 8 + End If + Let b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or b3 Mod 2 = 0 + Case Is = 3 + Let indexb3 = indexb3 + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 5 + 6) + Do + Let count = count + 1 + Let index = Int(Rnd * 7 + 1) + If index = 1 Then + Let dc4 = 3 + Let dc5 = 10 + End If + If index = 2 Then + Let dc4 = 7 + Let dc5 = 10 + End If + If index = 3 Then + Let dc4 = 1 + Let dc5 = 8 + End If + If index = 4 Then + Let dc4 = 5 + Let dc5 = 8 + End If + If index = 5 Then + Let dc4 = 9 + Let dc5 = 8 + End If + If index = 6 Then + Let dc4 = 3 + Let dc5 = 6 + End If + If index = 7 Then + Let dc4 = 7 + Let dc5 = 6 + End If + Let b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Let indexb4 = indexb4 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Let indexb5 = indexb5 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let fb3x = dc4: Let fb3y = dc5 + Let b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Let indexb6 = indexb6 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let fb3x = dc4: Let fb3y = dc5 + Let b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 7 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b3 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc5 < 3 Or dc5 > 8 + End Select + + Let w3 = xiabo(dc2, dc1): Let b3 = xiabo(dc5, dc4) + Let fw3x = dc1: Let fw3y = dc2: Let fb3x = dc4: Let fb3y = dc5 + Let fw3 = dc3: Let fb3 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call cannon + If dc3 = 7 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call cannon + If dc6 = 7 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call cannon + If dc3 = 7 Then Call pawn + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call cannon + If dc6 = 7 Then Call pawn + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call xiangqifen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 4th roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let dc3 = Int(Rnd * 6 + 2) + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let dc6 = Int(Rnd * 6 + 2) + Let w4 = xiabo(dc2, dc1): Let b2 = xiabo(dc5, dc4) + If indexw2 > 2 Or indexw3 > 2 Or indexw4 > 2 Or indexw5 > 2 Or indexw6 > 2 Then dc3 = 7 + If indexb2 > 2 Or indexb3 > 2 Or indexb4 > 2 Or indexb5 > 2 Or indexb6 > 2 Then dc6 = 7 + + Select Case dc3 + Case Is = 1 + Exit Case + Case Is = 2 + Let dc1 = Int(Rnd * 3 + 4) + Let dc2 = Int(Rnd * 3 + 1) + Do + Let count = count + 1 + Let index = Int(Rnd * 5 + 1) + If index = 1 Then + Let dc1 = 4 + Let dc2 = 1 + End If + If index = 2 Then + Let dc1 = 6 + Let dc2 = 1 + End If + If index = 3 Then + Let dc1 = 5 + Let dc2 = 2 + End If + If index = 4 Then + Let dc1 = 4 + Let dc2 = 3 + End If + If index = 5 Then + Let dc1 = 6 + Let dc2 = 3 + End If + Let w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or w4 Mod 2 <> 0 + Case Is = 3 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 5 + 1) + Do + Let count = count + 1 + Let index = Int(Rnd * 7 + 1) + If index = 1 Then + Let dc1 = 3 + Let dc2 = 1 + End If + If index = 2 Then + Let dc1 = 7 + Let dc2 = 1 + End If + If index = 3 Then + Let dc1 = 1 + Let dc2 = 3 + End If + If index = 4 Then + Let dc1 = 5 + Let dc2 = 3 + End If + If index = 5 Then + Let dc1 = 9 + Let dc2 = 3 + End If + If index = 6 Then + Let dc1 = 3 + Let dc2 = 5 + End If + If index = 7 Then + Let dc1 = 7 + Let dc2 = 5 + End If + Let w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let fw4x = dc1: Let fw4y = dc2 + Let w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let fw4x = dc1: Let fw4y = dc2 + Let w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 7 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w4 = xiabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 < 3 Or dc2 > 8 + End Select + Select Case dc6 + Case Is = 1 + Exit Case + Case Is = 2 + Let dc4 = Int(Rnd * 3 + 4) + Let dc5 = Int(Rnd * 3 + 8) + Do + Let count = count + 1 + Let index = Int(Rnd * 5 + 1) + If index = 1 Then + Let dc4 = 4 + Let dc5 = 10 + End If + If index = 2 Then + Let dc4 = 6 + Let dc5 = 10 + End If + If index = 3 Then + Let dc4 = 5 + Let dc5 = 9 + End If + If index = 4 Then + Let dc4 = 4 + Let dc5 = 8 + End If + If index = 5 Then + Let dc4 = 6 + Let dc5 = 8 + End If + Let b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or b4 Mod 2 = 0 + Case Is = 3 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 5 + 6) + Do + Let count = count + 1 + Let index = Int(Rnd * 7 + 1) + If index = 1 Then + Let dc4 = 3 + Let dc5 = 10 + End If + If index = 2 Then + Let dc4 = 7 + Let dc5 = 10 + End If + If index = 3 Then + Let dc4 = 1 + Let dc5 = 8 + End If + If index = 4 Then + Let dc4 = 5 + Let dc5 = 8 + End If + If index = 5 Then + Let dc4 = 9 + Let dc5 = 8 + End If + If index = 6 Then + Let dc4 = 3 + Let dc5 = 6 + End If + If index = 7 Then + Let dc4 = 7 + Let dc5 = 6 + End If + Let b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let fb4x = dc4: Let fb4y = dc5 + Let b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let fb4x = dc4: Let fb4y = dc5 + Let b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 7 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b4 = xiabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc5 < 3 Or dc5 > 8 + End Select + + Let w4 = xiabo(dc2, dc1): Let b4 = xiabo(dc5, dc4) + Let fw4x = dc1: Let fw4y = dc2: Let fb4x = dc4: Let fb4y = dc5 + Let fw4 = dc3: Let fb4 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call cannon + If dc3 = 7 Then Call pawn + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call cannon + If dc6 = 7 Then Call pawn + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call bishop + If dc3 = 4 Then Call knight + If dc3 = 5 Then Call rook + If dc3 = 6 Then Call cannon + If dc3 = 7 Then Call pawn + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call bishop + If dc6 = 4 Then Call knight + If dc6 = 5 Then Call rook + If dc6 = 6 Then Call cannon + If dc6 = 7 Then Call pawn + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Case + Case Is = Chr$(13) + Call xiangqifen + Case Is = Chr$(27) + End + End Select + Loop + +End Sub + +Sub shogi + + Rem 1st roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let dc3 = 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let dc6 = 1 + Let w1 = shobo(dc2, dc1): Let b1 = shobo(dc5, dc4) + + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let w1 = shobo(dc2, dc1): Let b1 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While Abs(w1 - b1) < 11 + + Let w1 = shobo(dc2, dc1): Let b1 = shobo(dc5, dc4) + Let fw1x = dc1: Let fw1y = dc2: Let fb1x = dc4: Let fb1y = dc5 + Let fw1 = dc3: Let fb1 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call general + If dc3 = 4 Then Call bishop + If dc3 = 5 Then Call knight + If dc3 = 6 Then Call rook + If dc3 = 7 Then Call lance + If dc3 = 8 Then Call pawn + If dc3 = 9 Then Call tokin + If dc3 = 10 Then Call dragon + If dc3 = 11 Then Call horse + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call general + If dc6 = 4 Then Call bishop + If dc6 = 5 Then Call knight + If dc6 = 6 Then Call rook + If dc6 = 7 Then Call lance + If dc6 = 8 Then Call pawn + If dc6 = 9 Then Call tokin + If dc6 = 10 Then Call dragon + If dc6 = 11 Then Call horse + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 60 + Let cf = 15: Call king + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 60 + Let cf = 0: Call king + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call shogifen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 2nd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let dc3 = Int(Rnd * 10 + 2) + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let dc6 = Int(Rnd * 10 + 2) + Let w2 = shobo(dc2, dc1): Let b2 = shobo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + Let indexw3 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Let indexw4 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Let indexw5 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + Let indexw6 = 1 + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 7 + Let indexw7 = 1 + Let index = Int(Rnd * 2 + 1) + If index = 1 Then Let dc1 = 1 Else Let dc1 = 9 + If dc1 = 1 Then Let indexw71 = 1 Else Let indexw72 = 1 + Do + Let count = count + 1 + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 8 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc2 < 3 Or dc2 > 7 + Case Is = 9 + Let indexw9 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 10 + Let indexw10 = 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 11 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w2 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + End Select + Select Case dc6 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 3 + Let indexb3 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 4 + Let indexb4 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 5 + Let indexb5 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 6 + Do + Let indexb6 = 1 + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 7 + Let indexb7 = 1 + Let index = Int(Rnd * 2 + 1) + If index = 1 Then Let dc4 = 1 Else Let dc4 = 9 + If dc4 = 1 Then Let indexb71 = 1 Else Let indexb72 = 1 + Do + Let count = count + 1 + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 8 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 Or dc5 < 3 Or dc5 > 7 + Case Is = 9 + Let indexb9 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 10 + Let indexb10 = 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 11 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b2 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + End Select + + Let w2 = shobo(dc2, dc1): Let b2 = shobo(dc5, dc4) + Let fw2x = dc1: Let fw2y = dc2: Let fb2x = dc4: Let fb2y = dc5 + Let fw2 = dc3: Let fb2 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call general + If dc3 = 4 Then Call bishop + If dc3 = 5 Then Call knight + If dc3 = 6 Then Call rook + If dc3 = 7 Then Call lance + If dc3 = 8 Then Call pawn + If dc3 = 9 Then Call horse + If dc3 = 10 Then Call dragon + If dc3 = 11 Then Call tokin + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call general + If dc6 = 4 Then Call bishop + If dc6 = 5 Then Call knight + If dc6 = 6 Then Call rook + If dc6 = 7 Then Call lance + If dc6 = 8 Then Call pawn + If dc6 = 9 Then Call horse + If dc6 = 10 Then Call dragon + If dc6 = 11 Then Call tokin + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 60 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call general + If dc3 = 4 Then Call bishop + If dc3 = 5 Then Call knight + If dc3 = 6 Then Call rook + If dc3 = 7 Then Call lance + If dc3 = 8 Then Call pawn + If dc3 = 9 Then Call horse + If dc3 = 10 Then Call dragon + If dc3 = 11 Then Call tokin + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 60 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call general + If dc6 = 4 Then Call bishop + If dc6 = 5 Then Call knight + If dc6 = 6 Then Call rook + If dc6 = 7 Then Call lance + If dc6 = 8 Then Call pawn + If dc6 = 9 Then Call horse + If dc6 = 10 Then Call dragon + If dc6 = 11 Then Call tokin + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call shogifen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 3rd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let dc3 = Int(Rnd * 10 + 2) + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let dc6 = Int(Rnd * 10 + 2) + Let w3 = shobo(dc2, dc1): Let b3 = shobo(dc5, dc4) + If dc3 = 4 Then Let indexw4 = indexw4 + 1 + If dc3 = 6 Then Let indexw6 = indexw6 + 1 + If dc3 = 9 Then Let indexw9 = indexw9 + 1 + If dc3 = 10 Then Let indexw10 = indexw10 + 1 + If indexw4 > 1 Then + Let dc3 = 8 + Let indexw4 = indexw4 - 1 + End If + If indexw6 > 1 Then + Let dc3 = 8 + Let indexw6 = indexw4 - 1 + End If + If indexw9 > 1 Then + Let dc3 = 8 + Let indexw9 = indexw4 - 1 + End If + If indexw10 > 1 Then + Let dc3 = 8 + Let indexw10 = indexw4 - 1 + End If + If indexb4 > 1 Then + Let dc6 = 8 + Let indexb4 = indexb4 - 1 + End If + If indexb6 > 1 Then + Let dc6 = 8 + Let indexb6 = indexb4 - 1 + End If + If indexb9 > 1 Then + Let dc6 = 8 + Let indexb9 = indexb4 - 1 + End If + If indexb10 > 1 Then + Let dc6 = 8 + Let indexb10 = indexb4 - 1 + End If + + Select Case dc3 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + Let indexw3 = indexw3 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Let indexw4 = indexw4 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Let indexw5 = indexw5 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Let indexw6 = indexw6 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 7 + Let indexw7 = indexw7 + 1 + Let index = Int(Rnd * 2 + 1) + If index = 1 Then Let dc1 = 1 Else Let dc1 = 9 + If indexw71 = 1 Then dc1 = 9 + If indexw72 = 1 Then dc1 = 1 + Do + Let count = count + 1 + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 8 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc2 < 3 Or dc2 > 7 + Case Is = 9 + Let indexw9 = indexw9 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 10 + Let indexw10 = indexw10 + 1 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 11 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w3 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + End Select + Select Case dc6 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 3 + Let indexb3 = indexb3 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 4 + Let indexb4 = indexb4 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 5 + Let indexb5 = indexb5 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 6 + Let indexb6 = indexb6 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 7 + Let indexb7 = indexb7 + 1 + Let index = Int(Rnd * 2 + 1) + If index = 1 Then Let dc4 = 1 Else Let dc4 = 9 + If indexb71 = 1 Then dc4 = 9 + If indexb72 = 1 Then dc4 = 1 + Do + Let count = count + 1 + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 8 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 Or dc5 < 3 Or dc5 > 7 + Case Is = 9 + Let indexb9 = indexb9 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 10 + Let indexb10 = indexb10 + 1 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 11 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b3 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + End Select + + Let w3 = shobo(dc2, dc1): Let b3 = shobo(dc5, dc4) + Let fw3x = dc1: Let fw3y = dc2: Let fb3x = dc4: Let fb3y = dc5 + Let fw3 = dc3: Let fb3 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call general + If dc3 = 4 Then Call bishop + If dc3 = 5 Then Call knight + If dc3 = 6 Then Call rook + If dc3 = 7 Then Call lance + If dc3 = 8 Then Call pawn + If dc3 = 9 Then Call horse + If dc3 = 10 Then Call dragon + If dc3 = 11 Then Call tokin + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call general + If dc6 = 4 Then Call bishop + If dc6 = 5 Then Call knight + If dc6 = 6 Then Call rook + If dc6 = 7 Then Call lance + If dc6 = 8 Then Call pawn + If dc6 = 9 Then Call horse + If dc6 = 10 Then Call dragon + If dc6 = 11 Then Call tokin + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 60 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call general + If dc3 = 4 Then Call bishop + If dc3 = 5 Then Call knight + If dc3 = 6 Then Call rook + If dc3 = 7 Then Call lance + If dc3 = 8 Then Call pawn + If dc3 = 9 Then Call horse + If dc3 = 10 Then Call dragon + If dc3 = 11 Then Call tokin + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 60 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call general + If dc6 = 4 Then Call bishop + If dc6 = 5 Then Call knight + If dc6 = 6 Then Call rook + If dc6 = 7 Then Call lance + If dc6 = 8 Then Call pawn + If dc6 = 9 Then Call horse + If dc6 = 10 Then Call dragon + If dc6 = 11 Then Call tokin + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call shogifen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 4th roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let dc3 = Int(Rnd * 10 + 2) + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let dc6 = Int(Rnd * 10 + 2) + Let w4 = shobo(dc2, dc1): Let b4 = shobo(dc5, dc4) + If dc3 = 4 Then Let indexw4 = indexw4 + 1 + If dc3 = 6 Then Let indexw6 = indexw6 + 1 + If dc3 = 9 Then Let indexw9 = indexw9 + 1 + If dc3 = 10 Then Let indexw10 = indexw10 + 1 + If indexw4 > 1 Then + Let dc3 = 8 + Let indexw4 = indexw4 - 1 + End If + If indexw6 > 1 Then + Let dc3 = 8 + Let indexw6 = indexw4 - 1 + End If + If indexw9 > 1 Then + Let dc3 = 8 + Let indexw9 = indexw4 - 1 + End If + If indexw10 > 1 Then + Let dc3 = 8 + Let indexw10 = indexw4 - 1 + End If + If indexb4 > 1 Then + Let dc6 = 8 + Let indexb4 = indexb4 - 1 + End If + If indexb6 > 1 Then + Let dc6 = 8 + Let indexb6 = indexb4 - 1 + End If + If indexb9 > 1 Then + Let dc6 = 8 + Let indexb9 = indexb4 - 1 + End If + If indexb10 > 1 Then + Let dc6 = 8 + Let indexb10 = indexb4 - 1 + End If + If indexw3 > 2 Or indexw5 > 2 Or indexw7 > 2 Then Let dc3 = 8 + If indexb3 > 2 Or indexb5 > 2 Or indexb7 > 2 Then Let dc6 = 8 + + Select Case dc3 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let fw2x = dc1: Let fw2y = dc2 + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 7 + Let index = Int(Rnd * 2 + 1) + If index = 1 Then Let dc1 = 1 Else Let dc1 = 9 + If indexw71 = 1 Then dc1 = 9 + If indexw72 = 1 Then dc1 = 1 + Do + Let count = count + 1 + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 8 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc2 < 3 Or dc2 > 7 + Case Is = 9 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 10 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 11 + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 9 + 1) + Let dc2 = Int(Rnd * 9 + 1) + Let w4 = shobo(dc2, dc1) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + End Select + Select Case dc6 + Case Is = 1 + Exit Case + Case Is = 2 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 3 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 4 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 5 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 6 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let fb2x = dc4: Let fb2y = dc5 + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 7 + Let index = Int(Rnd * 2 + 1) + If index = 1 Then Let dc4 = 1 Else Let dc4 = 9 + If indexb71 = 1 Then dc4 = 9 + If indexb72 = 1 Then dc4 = 1 + Do + Let count = count + 1 + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 8 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 Or dc5 < 3 Or dc5 > 7 + Case Is = 9 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 10 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 11 + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 9 + 1) + Let dc5 = Int(Rnd * 9 + 1) + Let b4 = shobo(dc5, dc4) + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + End Select + + Let w4 = shobo(dc2, dc1): Let b4 = shobo(dc5, dc4) + Let fw4x = dc1: Let fw4y = dc2: Let fb4x = dc4: Let fb4y = dc5 + Let fw4 = dc3: Let fb4 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call general + If dc3 = 4 Then Call bishop + If dc3 = 5 Then Call knight + If dc3 = 6 Then Call rook + If dc3 = 7 Then Call lance + If dc3 = 8 Then Call pawn + If dc3 = 9 Then Call horse + If dc3 = 10 Then Call dragon + If dc3 = 11 Then Call tokin + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call general + If dc6 = 4 Then Call bishop + If dc6 = 5 Then Call knight + If dc6 = 6 Then Call rook + If dc6 = 7 Then Call lance + If dc6 = 8 Then Call pawn + If dc6 = 9 Then Call horse + If dc6 = 10 Then Call dragon + If dc6 = 11 Then Call tokin + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + Let x = (dc1 * 40) + 100: Let y = Abs((dc2 * 40) - 480) - 60 + Let cf = 15 + If dc3 = 1 Then Call king + If dc3 = 2 Then Call queen + If dc3 = 3 Then Call general + If dc3 = 4 Then Call bishop + If dc3 = 5 Then Call knight + If dc3 = 6 Then Call rook + If dc3 = 7 Then Call lance + If dc3 = 8 Then Call pawn + If dc3 = 9 Then Call horse + If dc3 = 10 Then Call dragon + If dc3 = 11 Then Call tokin + Let x = (dc4 * 40) + 100: Let y = Abs((dc5 * 40) - 480) - 60 + Let cf = 0 + If dc6 = 1 Then Call king + If dc6 = 2 Then Call queen + If dc6 = 3 Then Call general + If dc6 = 4 Then Call bishop + If dc6 = 5 Then Call knight + If dc6 = 6 Then Call rook + If dc6 = 7 Then Call lance + If dc6 = 8 Then Call pawn + If dc6 = 9 Then Call horse + If dc6 = 10 Then Call dragon + If dc6 = 11 Then Call tokin + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Case + Case Is = Chr$(13) + Call shogifen + Case Is = Chr$(27) + End + End Select + Loop + +End Sub + +Sub draughts + + Rem 1st roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let dc3 = Int(Rnd * 2 + 1) + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let dc6 = Int(Rnd * 2 + 1) + Let w1 = drabo(dc2, dc1): Let b1 = drabo(dc5, dc4) + + Do + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 8 + 1) + Let dc2 = Int(Rnd * 8 + 1) + Let dc4 = Int(Rnd * 8 + 1) + Let dc5 = Int(Rnd * 8 + 1) + Let w1 = drabo(dc2, dc1): Let b1 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until w1 Mod 2 <> 0 And b1 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w1 = b1 + + Let w1 = drabo(dc2, dc1): Let b1 = drabo(dc5, dc4) + Let fw1x = dc1: Let fw1y = dc2: Let fb1x = dc4: Let fb1y = dc5 + Let fw1 = dc3: Let fb1 = dc6 + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + If dc1 = 10 Then Call letterJ + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + If dc4 = 10 Then Call letterJ + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 80: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = (dc4 * 40) + 80: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call draughtsfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 2nd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let dc3 = Int(Rnd * 2 + 1) + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let dc6 = Int(Rnd * 2 + 1) + Let w2 = drabo(dc2, dc1): Let b2 = drabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Do + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w2 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w2 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 2 + Do + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w2 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w2 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + End Select + Select Case dc6 + Case Is = 1 + Do + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b2 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b2 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + Case Is = 2 + Do + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b2 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b2 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w2 = w1 Or w2 = b1 Or w2 = b2 Or b2 = w1 Or b2 = b1 + End Select + + Let w2 = drabo(dc2, dc1): Let b2 = drabo(dc5, dc4) + Let fw2x = dc1: Let fw2y = dc2: Let fb2x = dc4: Let fb2y = dc5 + Let fw2 = dc3: Let fb2 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + If dc1 = 10 Then Call letterJ + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + If dc4 = 10 Then Call letterJ + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 80: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = (dc4 * 40) + 80: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call draughtsfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 3rd roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let dc3 = Int(Rnd * 2 + 1) + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let dc6 = Int(Rnd * 2 + 1) + Let w3 = drabo(dc2, dc1): Let b3 = drabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Do + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w3 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w3 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 2 + Do + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w3 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w3 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + End Select + Select Case dc6 + Case Is = 1 + Do + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b3 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b3 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + Case Is = 2 + Do + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b3 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b3 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w3 = w1 Or w3 = w2 Or w3 = b1 Or w3 = b2 Or w3 = b3 Or b3 = w1 Or b3 = w2 Or b3 = b1 Or b3 = b2 + End Select + + Let w3 = drabo(dc2, dc1): Let b3 = drabo(dc5, dc4) + Let fw3x = dc1: Let fw3y = dc2: Let fb3x = dc4: Let fb3y = dc5 + Let fw3 = dc3: Let fb3 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + If dc1 = 10 Then Call letterJ + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + If dc4 = 10 Then Call letterJ + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 80: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = (dc4 * 40) + 80: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Do + Case Is = Chr$(13) + Call draughtsfen + Case Is = Chr$(27) + End + End Select + Loop + + Call dices + + Rem 4th roll + Let count = 0: Let index = 0 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let dc3 = Int(Rnd * 2 + 1) + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let dc6 = Int(Rnd * 2 + 1) + Let w4 = drabo(dc2, dc1): Let b4 = drabo(dc5, dc4) + + Select Case dc3 + Case Is = 1 + Do + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w4 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w4 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 2 + Do + Do + Let count = count + 1 + Let dc1 = Int(Rnd * 10 + 1) + Let dc2 = Int(Rnd * 10 + 1) + Let w4 = drabo(dc2, dc1) + If count > 8000 Then Exit Do + Loop Until w4 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + End Select + Select Case dc6 + Case Is = 1 + Do + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b4 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b4 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + Case Is = 2 + Do + Do + Let count = count + 1 + Let dc4 = Int(Rnd * 10 + 1) + Let dc5 = Int(Rnd * 10 + 1) + Let b4 = drabo(dc5, dc4) + If count > 8000 Then Exit Do + Loop Until b4 Mod 2 <> 0 + Let count = count + 1 + If count > 8000 Then Exit Do + Loop While w4 = w1 Or w4 = w2 Or w4 = w3 Or w4 = b1 Or w4 = b2 Or w4 = b3 Or w4 = b4 Or b4 = w1 Or b4 = w2 Or b4 = w3 Or b4 = b1 Or b4 = b2 Or b4 = b3 + End Select + + Let w4 = drabo(dc2, dc1): Let b4 = drabo(dc5, dc4) + Let fw4x = dc1: Let fw4y = dc2: Let fb4x = dc4: Let fb4y = dc5 + Let fw4 = dc3: Let fb4 = dc6 + + Let x = 20: Let y = 160: Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = 580: Let y = 160: Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + Let x = 20: Let y = 220 + If dc1 = 1 Then Call letterA + If dc1 = 2 Then Call letterB + If dc1 = 3 Then Call letterC + If dc1 = 4 Then Call letterD + If dc1 = 5 Then Call letterE + If dc1 = 6 Then Call letterF + If dc1 = 7 Then Call letterG + If dc1 = 8 Then Call letterH + If dc1 = 9 Then Call letterI + If dc1 = 10 Then Call letterJ + Let x = 20: Let y = 280 + If dc2 = 1 Then Call letter1 + If dc2 = 2 Then Call letter2 + If dc2 = 3 Then Call letter3 + If dc2 = 4 Then Call letter4 + If dc2 = 5 Then Call letter5 + If dc2 = 6 Then Call letter6 + If dc2 = 7 Then Call letter7 + If dc2 = 8 Then Call letter8 + If dc2 = 9 Then Call letter9 + If dc2 = 10 Then Call letter0 + Let x = 580: Let y = 220 + If dc4 = 1 Then Call letterA + If dc4 = 2 Then Call letterB + If dc4 = 3 Then Call letterC + If dc4 = 4 Then Call letterD + If dc4 = 5 Then Call letterE + If dc4 = 6 Then Call letterF + If dc4 = 7 Then Call letterG + If dc4 = 8 Then Call letterH + If dc4 = 9 Then Call letterI + If dc4 = 10 Then Call letterJ + Let x = 580: Let y = 280 + If dc5 = 1 Then Call letter1 + If dc5 = 2 Then Call letter2 + If dc5 = 3 Then Call letter3 + If dc5 = 4 Then Call letter4 + If dc5 = 5 Then Call letter5 + If dc5 = 6 Then Call letter6 + If dc5 = 7 Then Call letter7 + If dc5 = 8 Then Call letter8 + If dc5 = 9 Then Call letter9 + If dc5 = 10 Then Call letter0 + Let x = (dc1 * 40) + 80: Let y = Abs((dc2 * 40) - 480) - 40 + Let cf = 15 + If dc3 = 1 Then Call dame + If dc3 = 2 Then Call checker + Let x = (dc4 * 40) + 80: Let y = Abs((dc5 * 40) - 480) - 40 + Let cf = 0 + If dc6 = 1 Then Call dame + If dc6 = 2 Then Call checker + + Do + Select Case InKey$ + Case Is = Chr$(32) + Exit Case + Case Is = Chr$(13) + Call draughtsfen + Case Is = Chr$(27) + End + End Select + Loop + +End Sub + +Sub chessfen + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then Let fig1w$ = "K" + If fw1 = 2 Then Let fig1w$ = "Q" + If fw1 = 3 Then Let fig1w$ = "B" + If fw1 = 4 Then Let fig1w$ = "N" + If fw1 = 5 Then Let fig1w$ = "R" + If fw1 = 6 Then Let fig1w$ = "P" + + If fb1 = 1 Then Let fig1b$ = "k" + If fb1 = 2 Then Let fig1b$ = "q" + If fb1 = 3 Then Let fig1b$ = "b" + If fb1 = 4 Then Let fig1b$ = "n" + If fb1 = 5 Then Let fig1b$ = "r" + If fb1 = 6 Then Let fig1b$ = "p" + + If fw2 = 1 Then Let fig2w$ = "K" + If fw2 = 2 Then Let fig2w$ = "Q" + If fw2 = 3 Then Let fig2w$ = "B" + If fw2 = 4 Then Let fig2w$ = "N" + If fw2 = 5 Then Let fig2w$ = "R" + If fw2 = 6 Then Let fig2w$ = "P" + + If fb2 = 1 Then Let fig2b$ = "k" + If fb2 = 2 Then Let fig2b$ = "q" + If fb2 = 3 Then Let fig2b$ = "b" + If fb2 = 4 Then Let fig2b$ = "n" + If fb2 = 5 Then Let fig2b$ = "r" + If fb2 = 6 Then Let fig2b$ = "p" + + If fw3 = 1 Then Let fig3w$ = "K" + If fw3 = 2 Then Let fig3w$ = "Q" + If fw3 = 3 Then Let fig3w$ = "B" + If fw3 = 4 Then Let fig3w$ = "N" + If fw3 = 5 Then Let fig3w$ = "R" + If fw3 = 6 Then Let fig3w$ = "P" + + If fb3 = 1 Then Let fig3b$ = "k" + If fb3 = 2 Then Let fig3b$ = "q" + If fb3 = 3 Then Let fig3b$ = "b" + If fb3 = 4 Then Let fig3b$ = "n" + If fb3 = 5 Then Let fig3b$ = "r" + If fb3 = 6 Then Let fig3b$ = "p" + + If fw4 = 1 Then Let fig4w$ = "K" + If fw4 = 2 Then Let fig4w$ = "Q" + If fw4 = 3 Then Let fig4w$ = "B" + If fw4 = 4 Then Let fig4w$ = "N" + If fw4 = 5 Then Let fig4w$ = "R" + If fw4 = 6 Then Let fig4w$ = "P" + + If fb4 = 1 Then Let fig4b$ = "k" + If fb4 = 2 Then Let fig4b$ = "q" + If fb4 = 3 Then Let fig4b$ = "b" + If fb4 = 4 Then Let fig4b$ = "n" + If fb4 = 5 Then Let fig4b$ = "r" + If fb4 = 6 Then Let fig4b$ = "p" + + Dim table(8, 8) As String + Let table(fw1y, fw1x) = fig1w$ + Let table(fb1y, fb1x) = fig1b$ + Let table(fw2y, fw2x) = fig2w$ + Let table(fb2y, fb2x) = fig2b$ + Let table(fw3y, fw3x) = fig3w$ + Let table(fb3y, fb3x) = fig3b$ + Let table(fw4y, fw4x) = fig4w$ + Let table(fb4y, fb4x) = fig4b$ + For row = 1 To 8: For col = 1 To 8 + If table(row, col) = "" Then Let table(row, col) = "+" + Next col: Next row + + Let mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + Let lin1$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + Let count = 0 + End If + Next index + + Let mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + Let lin2$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + Let count = 0 + End If + Next index + + Let mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + Let lin3$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + Let count = 0 + End If + Next index + + Let mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + Let lin4$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + Let count = 0 + End If + Next index + + Let mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + Let lin5$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + Let count = 0 + End If + Next index + + Let mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + Let lin6$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + Let count = 0 + End If + Next index + + Let mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + Let lin7$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + Let count = 0 + End If + Next index + + Let mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + Let lin8$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + Let count = 0 + End If + Next index + + Let fen$ = lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 28: Print fen$ + + Do + Loop Until InKey$ <> "" + + _Clipboard$ = fen$ + + url$ = "https://syzygy-tables.info/?fen=" + fen$ + If InStr(_OS$, "[WINDOWS]") Then + Shell url$ + End If + If InStr(_OS$, "[LINUX]") Then + Shell "xdg-open " + url$ + End If + If InStr(_OS$, "[MACOSX]") Then + Shell "open -a safari https://" + url$ + End If + + System +End Sub + +Sub makrukfen + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then Let fig1w$ = "L" + If fw1 = 2 Then Let fig1w$ = "S" + If fw1 = 3 Then Let fig1w$ = "N" + If fw1 = 4 Then Let fig1w$ = "H" + If fw1 = 5 Then Let fig1w$ = "B" + If fw1 = 6 Then Let fig1w$ = "C" + + If fb1 = 1 Then Let fig1b$ = "l" + If fb1 = 2 Then Let fig1b$ = "s" + If fb1 = 3 Then Let fig1b$ = "n" + If fb1 = 4 Then Let fig1b$ = "h" + If fb1 = 5 Then Let fig1b$ = "b" + If fb1 = 6 Then Let fig1b$ = "c" + + If fw2 = 1 Then Let fig2w$ = "L" + If fw2 = 2 Then Let fig2w$ = "S" + If fw2 = 3 Then Let fig2w$ = "N" + If fw2 = 4 Then Let fig2w$ = "H" + If fw2 = 5 Then Let fig2w$ = "B" + If fw2 = 6 Then Let fig2w$ = "C" + + If fb2 = 1 Then Let fig2b$ = "l" + If fb2 = 2 Then Let fig2b$ = "s" + If fb2 = 3 Then Let fig2b$ = "n" + If fb2 = 4 Then Let fig2b$ = "h" + If fb2 = 5 Then Let fig2b$ = "b" + If fb2 = 6 Then Let fig2b$ = "c" + + If fw3 = 1 Then Let fig3w$ = "L" + If fw3 = 2 Then Let fig3w$ = "S" + If fw3 = 3 Then Let fig3w$ = "N" + If fw3 = 4 Then Let fig3w$ = "H" + If fw3 = 5 Then Let fig3w$ = "B" + If fw3 = 6 Then Let fig3w$ = "C" + + If fb3 = 1 Then Let fig3b$ = "l" + If fb3 = 2 Then Let fig3b$ = "s" + If fb3 = 3 Then Let fig3b$ = "n" + If fb3 = 4 Then Let fig3b$ = "h" + If fb3 = 5 Then Let fig3b$ = "b" + If fb3 = 6 Then Let fig3b$ = "c" + + If fw4 = 1 Then Let fig4w$ = "L" + If fw4 = 2 Then Let fig4w$ = "S" + If fw4 = 3 Then Let fig4w$ = "N" + If fw4 = 4 Then Let fig4w$ = "H" + If fw4 = 5 Then Let fig4w$ = "B" + If fw4 = 6 Then Let fig4w$ = "C" + + If fb4 = 1 Then Let fig4b$ = "l" + If fb4 = 2 Then Let fig4b$ = "s" + If fb4 = 3 Then Let fig4b$ = "n" + If fb4 = 4 Then Let fig4b$ = "h" + If fb4 = 5 Then Let fig4b$ = "b" + If fb4 = 6 Then Let fig4b$ = "c" + + Dim table(8, 8) As String + Let table(fw1y, fw1x) = fig1w$ + Let table(fb1y, fb1x) = fig1b$ + Let table(fw2y, fw2x) = fig2w$ + Let table(fb2y, fb2x) = fig2b$ + Let table(fw3y, fw3x) = fig3w$ + Let table(fb3y, fb3x) = fig3b$ + Let table(fw4y, fw4x) = fig4w$ + Let table(fb4y, fb4x) = fig4b$ + For row = 1 To 8: For col = 1 To 8 + If table(row, col) = "" Then Let table(row, col) = "+" + Next col: Next row + + Let mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + Let lin1$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + Let count = 0 + End If + Next index + + Let mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + Let lin2$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + Let count = 0 + End If + Next index + + Let mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + Let lin3$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + Let count = 0 + End If + Next index + + Let mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + Let lin4$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + Let count = 0 + End If + Next index + + Let mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + Let lin5$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + Let count = 0 + End If + Next index + + Let mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + Let lin6$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + Let count = 0 + End If + Next index + + Let mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + Let lin7$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + Let count = 0 + End If + Next index + + Let mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + Let lin8$ = "" + Let count = 0 + For index = 1 To 8 + If index = 8 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 8 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + Let count = 0 + End If + Next index + + Let fen$ = lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 28: Print fen$ + + Do + Loop Until InKey$ <> "" + + _Clipboard$ = fen$ + + System +End Sub + +Sub xiangqifen + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then Let fig1w$ = "K" + If fw1 = 2 Then Let fig1w$ = "A" + If fw1 = 3 Then Let fig1w$ = "E" + If fw1 = 4 Then Let fig1w$ = "H" + If fw1 = 5 Then Let fig1w$ = "R" + If fw1 = 6 Then Let fig1w$ = "C" + If fw1 = 7 Then Let fig1w$ = "P" + + If fb1 = 1 Then Let fig1b$ = "k" + If fb1 = 2 Then Let fig1b$ = "a" + If fb1 = 3 Then Let fig1b$ = "e" + If fb1 = 4 Then Let fig1b$ = "h" + If fb1 = 5 Then Let fig1b$ = "r" + If fb1 = 6 Then Let fig1b$ = "c" + If fb1 = 7 Then Let fig1w$ = "p" + + If fw2 = 1 Then Let fig2w$ = "K" + If fw2 = 2 Then Let fig2w$ = "A" + If fw2 = 3 Then Let fig2w$ = "E" + If fw2 = 4 Then Let fig2w$ = "H" + If fw2 = 5 Then Let fig2w$ = "R" + If fw2 = 6 Then Let fig2w$ = "C" + If fw2 = 7 Then Let fig2w$ = "P" + + If fb2 = 1 Then Let fig2b$ = "k" + If fb2 = 2 Then Let fig2b$ = "a" + If fb2 = 3 Then Let fig2b$ = "e" + If fb2 = 4 Then Let fig2b$ = "h" + If fb2 = 5 Then Let fig2b$ = "r" + If fb2 = 6 Then Let fig2b$ = "c" + If fb2 = 7 Then Let fig2w$ = "p" + + If fw3 = 1 Then Let fig3w$ = "K" + If fw3 = 2 Then Let fig3w$ = "A" + If fw3 = 3 Then Let fig3w$ = "E" + If fw3 = 4 Then Let fig3w$ = "H" + If fw3 = 5 Then Let fig3w$ = "R" + If fw3 = 6 Then Let fig3w$ = "C" + If fw3 = 7 Then Let fig3w$ = "P" + + If fb3 = 1 Then Let fig3b$ = "k" + If fb3 = 2 Then Let fig3b$ = "a" + If fb3 = 3 Then Let fig3b$ = "e" + If fb3 = 4 Then Let fig3b$ = "h" + If fb3 = 5 Then Let fig3b$ = "r" + If fb3 = 6 Then Let fig3b$ = "c" + If fb3 = 7 Then Let fig3w$ = "p" + + If fw4 = 1 Then Let fig4w$ = "K" + If fw4 = 2 Then Let fig4w$ = "A" + If fw4 = 3 Then Let fig4w$ = "E" + If fw4 = 4 Then Let fig4w$ = "H" + If fw4 = 5 Then Let fig4w$ = "R" + If fw4 = 6 Then Let fig4w$ = "C" + If fw4 = 7 Then Let fig4w$ = "P" + + If fb4 = 1 Then Let fig4b$ = "k" + If fb4 = 2 Then Let fig4b$ = "a" + If fb4 = 3 Then Let fig4b$ = "e" + If fb4 = 4 Then Let fig4b$ = "h" + If fb4 = 5 Then Let fig4b$ = "r" + If fb4 = 6 Then Let fig4b$ = "c" + If fb4 = 7 Then Let fig4w$ = "p" + + Dim table(10, 9) As String + Let table(fw1y, fw1x) = fig1w$ + Let table(fb1y, fb1x) = fig1b$ + Let table(fw2y, fw2x) = fig2w$ + Let table(fb2y, fb2x) = fig2b$ + Let table(fw3y, fw3x) = fig3w$ + Let table(fb3y, fb3x) = fig3b$ + Let table(fw4y, fw4x) = fig4w$ + Let table(fb4y, fb4x) = fig4b$ + For row = 1 To 10: For col = 1 To 9 + If table(row, col) = "" Then Let table(row, col) = "+" + Next col: Next row + + Let mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + table(1, 9) + Let lin1$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + Let count = 0 + End If + Next index + + Let mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + table(2, 9) + Let lin2$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + Let count = 0 + End If + Next index + + Let mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + table(3, 9) + Let lin3$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + Let count = 0 + End If + Next index + + Let mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + table(4, 9) + Let lin4$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + Let count = 0 + End If + Next index + + Let mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + table(5, 9) + Let lin5$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + Let count = 0 + End If + Next index + + Let mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + table(6, 9) + Let lin6$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + Let count = 0 + End If + Next index + + Let mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + table(7, 9) + Let lin7$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + Let count = 0 + End If + Next index + + Let mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + table(8, 9) + Let lin8$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + Let count = 0 + End If + Next index + + Let mas9$ = table(9, 1) + table(9, 2) + table(9, 3) + table(9, 4) + table(9, 5) + table(9, 6) + table(9, 7) + table(9, 8) + table(9, 9) + Let lin9$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + lin9$ = lin9$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas9$, index, 1) <> "+" And count = 0 Then + lin9$ = lin9$ + Mid$(mas9$, index, 1) + End If + If Mid$(mas9$, index, 1) <> "+" And count > 0 Then + lin9$ = lin9$ + LTrim$(Str$(count)) + lin9$ = lin9$ + Mid$(mas9$, index, 1) + Let count = 0 + End If + Next index + + Let mas0$ = table(10, 1) + table(10, 2) + table(10, 3) + table(10, 4) + table(10, 5) + table(10, 6) + table(10, 7) + table(10, 8) + table(10, 9) + Let lin0$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas0$, index, 1) = "+" Then + count = count + 1 + lin0$ = lin0$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas0$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas0$, index, 1) <> "+" And count = 0 Then + lin0$ = lin0$ + Mid$(mas0$, index, 1) + End If + If Mid$(mas0$, index, 1) <> "+" And count > 0 Then + lin0$ = lin0$ + LTrim$(Str$(count)) + lin0$ = lin0$ + Mid$(mas0$, index, 1) + Let count = 0 + End If + Next index + + Let fen$ = lin0$ + "/" + lin9$ + "/" + lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 24: Print fen$ + + Do + Loop Until InKey$ <> "" + + _Clipboard$ = fen$ + + System +End Sub + +Sub shogifen + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then Let fig1w$ = "K" + If fw1 = 2 Then Let fig1w$ = "G" + If fw1 = 3 Then Let fig1w$ = "S" + If fw1 = 4 Then Let fig1w$ = "B" + If fw1 = 5 Then Let fig1w$ = "N" + If fw1 = 6 Then Let fig1w$ = "R" + If fw1 = 7 Then Let fig1w$ = "L" + If fw1 = 8 Then Let fig1w$ = "P" + If fw1 = 9 Then Let fig1w$ = "H" + If fw1 = 10 Then Let fig1w$ = "D" + If fw1 = 11 Then Let fig1w$ = "T" + + If fb1 = 1 Then Let fig1b$ = "k" + If fb1 = 2 Then Let fig1b$ = "g" + If fb1 = 3 Then Let fig1b$ = "a" + If fb1 = 4 Then Let fig1b$ = "b" + If fb1 = 5 Then Let fig1b$ = "n" + If fb1 = 6 Then Let fig1b$ = "r" + If fb1 = 7 Then Let fig1b$ = "l" + If fb1 = 8 Then Let fig1b$ = "p" + If fb1 = 9 Then Let fig1b$ = "h" + If fb1 = 10 Then Let fig1b$ = "d" + If fb1 = 11 Then Let fig1b$ = "t" + + If fw2 = 1 Then Let fig2w$ = "K" + If fw2 = 2 Then Let fig2w$ = "G" + If fw2 = 3 Then Let fig2w$ = "S" + If fw2 = 4 Then Let fig2w$ = "B" + If fw2 = 5 Then Let fig2w$ = "N" + If fw2 = 6 Then Let fig2w$ = "R" + If fw2 = 7 Then Let fig2w$ = "L" + If fw2 = 8 Then Let fig2w$ = "P" + If fw2 = 9 Then Let fig2w$ = "H" + If fw2 = 20 Then Let fig2w$ = "D" + If fw2 = 22 Then Let fig2w$ = "T" + + If fb2 = 1 Then Let fig2b$ = "k" + If fb2 = 2 Then Let fig2b$ = "g" + If fb2 = 3 Then Let fig2b$ = "a" + If fb2 = 4 Then Let fig2b$ = "b" + If fb2 = 5 Then Let fig2b$ = "n" + If fb2 = 6 Then Let fig2b$ = "r" + If fb2 = 7 Then Let fig2b$ = "l" + If fb2 = 8 Then Let fig2b$ = "p" + If fb2 = 9 Then Let fig2b$ = "h" + If fb2 = 20 Then Let fig2b$ = "d" + If fb2 = 22 Then Let fig2b$ = "t" + + If fw3 = 1 Then Let fig3w$ = "K" + If fw3 = 2 Then Let fig3w$ = "G" + If fw3 = 3 Then Let fig3w$ = "S" + If fw3 = 4 Then Let fig3w$ = "B" + If fw3 = 5 Then Let fig3w$ = "N" + If fw3 = 6 Then Let fig3w$ = "R" + If fw3 = 7 Then Let fig3w$ = "L" + If fw3 = 8 Then Let fig3w$ = "P" + If fw3 = 9 Then Let fig3w$ = "H" + If fw3 = 30 Then Let fig3w$ = "D" + If fw3 = 33 Then Let fig3w$ = "T" + + If fb3 = 1 Then Let fig3b$ = "k" + If fb3 = 2 Then Let fig3b$ = "g" + If fb3 = 3 Then Let fig3b$ = "a" + If fb3 = 4 Then Let fig3b$ = "b" + If fb3 = 5 Then Let fig3b$ = "n" + If fb3 = 6 Then Let fig3b$ = "r" + If fb3 = 7 Then Let fig3b$ = "l" + If fb3 = 8 Then Let fig3b$ = "p" + If fb3 = 9 Then Let fig3b$ = "h" + If fb3 = 30 Then Let fig3b$ = "d" + If fb3 = 33 Then Let fig3b$ = "t" + + If fw4 = 1 Then Let fig4w$ = "K" + If fw4 = 2 Then Let fig4w$ = "G" + If fw4 = 3 Then Let fig4w$ = "S" + If fw4 = 4 Then Let fig4w$ = "B" + If fw4 = 5 Then Let fig4w$ = "N" + If fw4 = 6 Then Let fig4w$ = "R" + If fw4 = 7 Then Let fig4w$ = "L" + If fw4 = 8 Then Let fig4w$ = "P" + If fw4 = 9 Then Let fig4w$ = "H" + If fw4 = 40 Then Let fig4w$ = "D" + If fw4 = 44 Then Let fig4w$ = "T" + + If fb4 = 1 Then Let fig4b$ = "k" + If fb4 = 2 Then Let fig4b$ = "g" + If fb4 = 3 Then Let fig4b$ = "a" + If fb4 = 4 Then Let fig4b$ = "b" + If fb4 = 5 Then Let fig4b$ = "n" + If fb4 = 6 Then Let fig4b$ = "r" + If fb4 = 7 Then Let fig4b$ = "l" + If fb4 = 8 Then Let fig4b$ = "p" + If fb4 = 9 Then Let fig4b$ = "h" + If fb4 = 40 Then Let fig4b$ = "d" + If fb4 = 44 Then Let fig4b$ = "t" + + Dim table(9, 9) As String + Let table(fw1y, fw1x) = fig1w$ + Let table(fb1y, fb1x) = fig1b$ + Let table(fw2y, fw2x) = fig2w$ + Let table(fb2y, fb2x) = fig2b$ + Let table(fw3y, fw3x) = fig3w$ + Let table(fb3y, fb3x) = fig3b$ + Let table(fw4y, fw4x) = fig4w$ + Let table(fb4y, fb4x) = fig4b$ + For row = 1 To 9: For col = 1 To 9 + If table(row, col) = "" Then Let table(row, col) = "+" + Next col: Next row + + Let mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + table(1, 9) + Let lin1$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + Let count = 0 + End If + Next index + + Let mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + table(2, 9) + Let lin2$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + Let count = 0 + End If + Next index + + Let mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + table(3, 9) + Let lin3$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + Let count = 0 + End If + Next index + + Let mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + table(4, 9) + Let lin4$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + Let count = 0 + End If + Next index + + Let mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + table(5, 9) + Let lin5$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + Let count = 0 + End If + Next index + + Let mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + table(6, 9) + Let lin6$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + Let count = 0 + End If + Next index + + Let mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + table(7, 9) + Let lin7$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + Let count = 0 + End If + Next index + + Let mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + table(8, 9) + Let lin8$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + Let count = 0 + End If + Next index + + Let mas9$ = table(9, 1) + table(9, 2) + table(9, 3) + table(9, 4) + table(9, 5) + table(9, 6) + table(9, 7) + table(9, 8) + table(9, 9) + Let lin9$ = "" + Let count = 0 + For index = 1 To 9 + If index = 9 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + lin9$ = lin9$ + LTrim$(Str$(count)) + End If + If index < 9 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas9$, index, 1) <> "+" And count = 0 Then + lin9$ = lin9$ + Mid$(mas9$, index, 1) + End If + If Mid$(mas9$, index, 1) <> "+" And count > 0 Then + lin9$ = lin9$ + LTrim$(Str$(count)) + lin9$ = lin9$ + Mid$(mas9$, index, 1) + Let count = 0 + End If + Next index + + Let fen$ = lin9$ + "/" + lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 25: Print fen$ + + Do + Loop Until InKey$ <> "" + + _Clipboard$ = fen$ + + System +End Sub + +Sub draughtsfen + + Rem Forsyth-Edwards notation + + If fw1 = 1 Then Let fig1w$ = "D" + If fw1 = 2 Then Let fig1w$ = "C" + + If fb1 = 1 Then Let fig1b$ = "d" + If fb1 = 2 Then Let fig1b$ = "c" + + If fw2 = 1 Then Let fig2w$ = "D" + If fw2 = 2 Then Let fig2w$ = "C" + + If fb2 = 1 Then Let fig2b$ = "d" + If fb2 = 2 Then Let fig2b$ = "c" + + If fw3 = 1 Then Let fig3w$ = "D" + If fw3 = 2 Then Let fig3w$ = "C" + + If fb3 = 1 Then Let fig3b$ = "d" + If fb3 = 2 Then Let fig3b$ = "c" + + If fw4 = 1 Then Let fig4w$ = "D" + If fw4 = 2 Then Let fig4w$ = "C" + + If fb4 = 1 Then Let fig4b$ = "d" + If fb4 = 2 Then Let fig4b$ = "c" + + Dim table(10, 10) As String + Let table(fw1y, fw1x) = fig1w$ + Let table(fb1y, fb1x) = fig1b$ + Let table(fw2y, fw2x) = fig2w$ + Let table(fb2y, fb2x) = fig2b$ + Let table(fw3y, fw3x) = fig3w$ + Let table(fb3y, fb3x) = fig3b$ + Let table(fw4y, fw4x) = fig4w$ + Let table(fb4y, fb4x) = fig4b$ + For row = 1 To 10: For col = 1 To 10 + If table(row, col) = "" Then Let table(row, col) = "+" + Next col: Next row + + Let mas1$ = table(1, 1) + table(1, 2) + table(1, 3) + table(1, 4) + table(1, 5) + table(1, 6) + table(1, 7) + table(1, 8) + table(1, 9) + table(1, 10) + Let lin1$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + lin1$ = lin1$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas1$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas1$, index, 1) <> "+" And count = 0 Then + lin1$ = lin1$ + Mid$(mas1$, index, 1) + End If + If Mid$(mas1$, index, 1) <> "+" And count > 0 Then + lin1$ = lin1$ + LTrim$(Str$(count)) + lin1$ = lin1$ + Mid$(mas1$, index, 1) + Let count = 0 + End If + Next index + + Let mas2$ = table(2, 1) + table(2, 2) + table(2, 3) + table(2, 4) + table(2, 5) + table(2, 6) + table(2, 7) + table(2, 8) + table(2, 9) + table(2, 10) + Let lin2$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + lin2$ = lin2$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas2$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas2$, index, 1) <> "+" And count = 0 Then + lin2$ = lin2$ + Mid$(mas2$, index, 1) + End If + If Mid$(mas2$, index, 1) <> "+" And count > 0 Then + lin2$ = lin2$ + LTrim$(Str$(count)) + lin2$ = lin2$ + Mid$(mas2$, index, 1) + Let count = 0 + End If + Next index + + Let mas3$ = table(3, 1) + table(3, 2) + table(3, 3) + table(3, 4) + table(3, 5) + table(3, 6) + table(3, 7) + table(3, 8) + table(3, 9) + table(3, 10) + Let lin3$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + lin3$ = lin3$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas3$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas3$, index, 1) <> "+" And count = 0 Then + lin3$ = lin3$ + Mid$(mas3$, index, 1) + End If + If Mid$(mas3$, index, 1) <> "+" And count > 0 Then + lin3$ = lin3$ + LTrim$(Str$(count)) + lin3$ = lin3$ + Mid$(mas3$, index, 1) + Let count = 0 + End If + Next index + + Let mas4$ = table(4, 1) + table(4, 2) + table(4, 3) + table(4, 4) + table(4, 5) + table(4, 6) + table(4, 7) + table(4, 8) + table(4, 9) + table(4, 10) + Let lin4$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + lin4$ = lin4$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas4$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas4$, index, 1) <> "+" And count = 0 Then + lin4$ = lin4$ + Mid$(mas4$, index, 1) + End If + If Mid$(mas4$, index, 1) <> "+" And count > 0 Then + lin4$ = lin4$ + LTrim$(Str$(count)) + lin4$ = lin4$ + Mid$(mas4$, index, 1) + Let count = 0 + End If + Next index + + Let mas5$ = table(5, 1) + table(5, 2) + table(5, 3) + table(5, 4) + table(5, 5) + table(5, 6) + table(5, 7) + table(5, 8) + table(5, 9) + table(5, 10) + Let lin5$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + lin5$ = lin5$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas5$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas5$, index, 1) <> "+" And count = 0 Then + lin5$ = lin5$ + Mid$(mas5$, index, 1) + End If + If Mid$(mas5$, index, 1) <> "+" And count > 0 Then + lin5$ = lin5$ + LTrim$(Str$(count)) + lin5$ = lin5$ + Mid$(mas5$, index, 1) + Let count = 0 + End If + Next index + + Let mas6$ = table(6, 1) + table(6, 2) + table(6, 3) + table(6, 4) + table(6, 5) + table(6, 6) + table(6, 7) + table(6, 8) + table(6, 9) + table(6, 10) + Let lin6$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + lin6$ = lin6$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas6$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas6$, index, 1) <> "+" And count = 0 Then + lin6$ = lin6$ + Mid$(mas6$, index, 1) + End If + If Mid$(mas6$, index, 1) <> "+" And count > 0 Then + lin6$ = lin6$ + LTrim$(Str$(count)) + lin6$ = lin6$ + Mid$(mas6$, index, 1) + Let count = 0 + End If + Next index + + Let mas7$ = table(7, 1) + table(7, 2) + table(7, 3) + table(7, 4) + table(7, 5) + table(7, 6) + table(7, 7) + table(7, 8) + table(7, 9) + table(7, 10) + Let lin7$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + lin7$ = lin7$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas7$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas7$, index, 1) <> "+" And count = 0 Then + lin7$ = lin7$ + Mid$(mas7$, index, 1) + End If + If Mid$(mas7$, index, 1) <> "+" And count > 0 Then + lin7$ = lin7$ + LTrim$(Str$(count)) + lin7$ = lin7$ + Mid$(mas7$, index, 1) + Let count = 0 + End If + Next index + + Let mas8$ = table(8, 1) + table(8, 2) + table(8, 3) + table(8, 4) + table(8, 5) + table(8, 6) + table(8, 7) + table(8, 8) + table(8, 9) + table(8, 10) + Let lin8$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + lin8$ = lin8$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas8$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas8$, index, 1) <> "+" And count = 0 Then + lin8$ = lin8$ + Mid$(mas8$, index, 1) + End If + If Mid$(mas8$, index, 1) <> "+" And count > 0 Then + lin8$ = lin8$ + LTrim$(Str$(count)) + lin8$ = lin8$ + Mid$(mas8$, index, 1) + Let count = 0 + End If + Next index + + Let mas9$ = table(9, 1) + table(9, 2) + table(9, 3) + table(9, 4) + table(9, 5) + table(9, 6) + table(9, 7) + table(9, 8) + table(9, 9) + table(9, 10) + Let lin9$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + lin9$ = lin9$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas9$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas9$, index, 1) <> "+" And count = 0 Then + lin9$ = lin9$ + Mid$(mas9$, index, 1) + End If + If Mid$(mas9$, index, 1) <> "+" And count > 0 Then + lin9$ = lin9$ + LTrim$(Str$(count)) + lin9$ = lin9$ + Mid$(mas9$, index, 1) + Let count = 0 + End If + Next index + + Let mas0$ = table(10, 1) + table(10, 2) + table(10, 3) + table(10, 4) + table(10, 5) + table(10, 6) + table(10, 7) + table(10, 8) + table(10, 9) + table(10, 10) + Let lin0$ = "" + Let count = 0 + For index = 1 To 10 + If index = 10 And Mid$(mas0$, index, 1) = "+" Then + count = count + 1 + lin0$ = lin0$ + LTrim$(Str$(count)) + End If + If index < 10 And Mid$(mas0$, index, 1) = "+" Then + count = count + 1 + End If + If Mid$(mas0$, index, 1) <> "+" And count = 0 Then + lin0$ = lin0$ + Mid$(mas0$, index, 1) + End If + If Mid$(mas0$, index, 1) <> "+" And count > 0 Then + lin0$ = lin0$ + LTrim$(Str$(count)) + lin0$ = lin0$ + Mid$(mas0$, index, 1) + Let count = 0 + End If + Next index + + Let fen$ = lin0$ + "/" + lin9$ + "/" + lin8$ + "/" + lin7$ + "/" + lin6$ + "/" + lin5$ + "/" + lin4$ + "/" + lin3$ + "/" + lin2$ + "/" + lin1$ + + Color 10 + Locate 2, 1: Print " Press any key to display the Forsyth-Edwards notation " + Do + Loop Until InKey$ <> "" + Locate 2, 1: Print " " + Color 12 + Locate 2, 23: Print fen$ + + Do + Loop Until InKey$ <> "" + + _Clipboard$ = fen$ + + System +End Sub + +Sub message + Locate 2, 1: Color 9: Print " SPACEBAR - next pair"; " ENTER - display notation "; "ESCAPE - exit " + Locate 2, 5: Color 5: Print "SPACEBAR": Locate 2, 32: Color 5: Print "ENTER": Locate 2, 63: Color 5: Print "ESCAPE" +End Sub \ No newline at end of file -- 2.11.0