summaryrefslogtreecommitdiff
authorleseb <leseb>2002-03-14 10:31:39 (UTC)
committer leseb <leseb>2002-03-14 10:31:39 (UTC)
commit1003de6f3b0c508960e0e717333a64603fffb133 (patch) (unidiff)
treedbc1c56f0644f0348e35e6e5856ef07110f7fcb7
parent13d8ac43bf8d4c6e492e57d2ab3c7353935a9365 (diff)
downloadopie-1003de6f3b0c508960e0e717333a64603fffb133.zip
opie-1003de6f3b0c508960e0e717333a64603fffb133.tar.gz
opie-1003de6f3b0c508960e0e717333a64603fffb133.tar.bz2
Initial commit
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile2
-rw-r--r--apps/Games/kcheckers.desktop6
-rw-r--r--noncore/games/kcheckers/.cvsignore3
-rw-r--r--noncore/games/kcheckers/checkers.cpp337
-rw-r--r--noncore/games/kcheckers/checkers.h56
-rw-r--r--noncore/games/kcheckers/echeckers.cpp349
-rw-r--r--noncore/games/kcheckers/echeckers.h28
-rw-r--r--noncore/games/kcheckers/field.cpp31
-rw-r--r--noncore/games/kcheckers/field.h27
-rw-r--r--noncore/games/kcheckers/kcheckers.cpp382
-rw-r--r--noncore/games/kcheckers/kcheckers.h97
-rw-r--r--noncore/games/kcheckers/kcheckers.pro19
-rw-r--r--noncore/games/kcheckers/main.cpp18
-rw-r--r--noncore/games/kcheckers/pics/biglogo.xpm41
-rw-r--r--noncore/games/kcheckers/pics/contexthelp.xpm20
-rw-r--r--noncore/games/kcheckers/pics/exit.xpm21
-rw-r--r--noncore/games/kcheckers/pics/king_black.xpm39
-rw-r--r--noncore/games/kcheckers/pics/king_white.xpm39
-rw-r--r--noncore/games/kcheckers/pics/logo.xpm23
-rw-r--r--noncore/games/kcheckers/pics/man_black.xpm39
-rw-r--r--noncore/games/kcheckers/pics/man_white.xpm41
-rw-r--r--noncore/games/kcheckers/pics/marble1.xpm240
-rw-r--r--noncore/games/kcheckers/pics/marble2.xpm595
-rw-r--r--noncore/games/kcheckers/pics/marble3.xpm33
-rw-r--r--noncore/games/kcheckers/pics/wood1.xpm117
-rw-r--r--noncore/games/kcheckers/pics/wood2.xpm114
-rw-r--r--noncore/games/kcheckers/pics/wood3.xpm33
-rw-r--r--noncore/games/kcheckers/rcheckers.cpp476
-rw-r--r--noncore/games/kcheckers/rcheckers.h28
-rw-r--r--pics/KCheckers.xpm41
30 files changed, 3294 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1370f24..17d23ef 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ APPS=$(LOCALAPPS) addressbook calculator clock datebook \
38 todo wordgame embeddedkonsole taskbar sysinfo \ 38 todo wordgame embeddedkonsole taskbar sysinfo \
39 parashoot snake citytime showimg netsetup tableviewer \ 39 parashoot snake citytime showimg netsetup tableviewer \
40 qipkg mindbreaker go qasteroids qcop fifteen keypebble today opiemail/converter opiemail \ 40 qipkg mindbreaker go qasteroids qcop fifteen keypebble today opiemail/converter opiemail \
41 noncore/tictac noncore/opieftp 41 noncore/tictac noncore/opieftp noncore/kcheckers
42 42
43DOCS = docs/src/opie-policy 43DOCS = docs/src/opie-policy
44single: mpegplayer/libmpeg3 44single: mpegplayer/libmpeg3
diff --git a/apps/Games/kcheckers.desktop b/apps/Games/kcheckers.desktop
new file mode 100644
index 0000000..4515b3a
--- a/dev/null
+++ b/apps/Games/kcheckers.desktop
@@ -0,0 +1,6 @@
1[Desktop Entry]
2Comment=A Ckeckers Game
3Exec=kcheckers
4Icon=KCheckers
5Type=Application
6Name=KCheckers
diff --git a/noncore/games/kcheckers/.cvsignore b/noncore/games/kcheckers/.cvsignore
new file mode 100644
index 0000000..2c33e73
--- a/dev/null
+++ b/noncore/games/kcheckers/.cvsignore
@@ -0,0 +1,3 @@
1moc_*
2*.moc
3Makefile*
diff --git a/noncore/games/kcheckers/checkers.cpp b/noncore/games/kcheckers/checkers.cpp
new file mode 100644
index 0000000..1e4dd1f
--- a/dev/null
+++ b/noncore/games/kcheckers/checkers.cpp
@@ -0,0 +1,337 @@
1//
2// KCheckers Engine
3
4//
5// Board = 54 Fields:
6//
7// | 06 07 08 09| MAN2
8// |11 12 13 14 |
9// | 17 18 19 20|
10// |22 23 24 25 |
11// | 28 29 30 31|
12// |33 34 35 36 |
13// | 39 40 41 42|
14// |44 45 46 47 | MAN1
15
16#include <time.h>
17#include <stdlib.h>
18
19#include "checkers.h"
20
21
22Checkers::Checkers(int skill)
23{
24 for(int i=0;i<54;i++) board[i]=NONE;
25 board[6] =MAN2; board[7] =MAN2; board[8] =MAN2; board[9] =MAN2;
26 board[11]=MAN2; board[12]=MAN2; board[13]=MAN2; board[14]=MAN2;
27 board[17]=MAN2; board[18]=MAN2; board[19]=MAN2; board[20]=MAN2;
28 board[22]=FREE; board[23]=FREE; board[24]=FREE; board[25]=FREE;
29 board[28]=FREE; board[29]=FREE; board[30]=FREE; board[31]=FREE;
30 board[33]=MAN1; board[34]=MAN1; board[35]=MAN1; board[36]=MAN1;
31 board[39]=MAN1; board[40]=MAN1; board[41]=MAN1; board[42]=MAN1;
32 board[44]=MAN1; board[45]=MAN1; board[46]=MAN1; board[47]=MAN1;
33
34 levelmax=skill;
35
36 srand(time(0)); // Seed the random number generator
37}
38
39
40///////////////////////////////////////////////////
41//
42// User Functions
43//
44///////////////////////////////////////////////////
45
46
47bool Checkers::checkMove1()
48{
49 for(int i=6;i<48;i++)
50 {
51 switch(board[i])
52 {
53 case MAN1:
54 if(board[i-6]==FREE) return true;
55 if(board[i-5]==FREE) return true;
56 break;
57 case KING1:
58 if(board[i-6]==FREE) return true;
59 if(board[i-5]==FREE) return true;
60 if(board[i+5]==FREE) return true;
61 if(board[i+6]==FREE) return true;
62 }
63 }
64 return false;
65}
66
67
68////////////////////////////////////////////////////
69//
70// Computer Functions
71//
72////////////////////////////////////////////////////
73
74
75void Checkers::go2()
76{
77 level=0;
78 for(int i=6;i<48;i++) bestboard[i]=board[i];
79 turn();
80 for(int i=6;i<48;i++) board[i]=bestboard[i];
81 ;
82}
83
84
85void Checkers::turn(int &resMax,bool capture)
86{
87 if(level<levelmax)
88 {
89 bool f12,f13,f14,f17,f18,f19,f23,f24,f25,f28,f29,f30,f34,f35,f36,f39,f40,f41;
90 if(capture)
91 {
92 if(board[12]==NONE) {f12=true;board[12]=FREE;} else f12=false;
93 if(board[13]==NONE) {f13=true;board[13]=FREE;} else f13=false;
94 if(board[14]==NONE) {f14=true;board[14]=FREE;} else f14=false;
95 if(board[17]==NONE) {f17=true;board[17]=FREE;} else f17=false;
96 if(board[18]==NONE) {f18=true;board[18]=FREE;} else f18=false;
97 if(board[19]==NONE) {f19=true;board[19]=FREE;} else f19=false;
98 if(board[23]==NONE) {f23=true;board[23]=FREE;} else f23=false;
99 if(board[24]==NONE) {f24=true;board[24]=FREE;} else f24=false;
100 if(board[25]==NONE) {f25=true;board[25]=FREE;} else f25=false;
101 if(board[28]==NONE) {f28=true;board[28]=FREE;} else f28=false;
102 if(board[29]==NONE) {f29=true;board[29]=FREE;} else f29=false;
103 if(board[30]==NONE) {f30=true;board[30]=FREE;} else f30=false;
104 if(board[34]==NONE) {f34=true;board[34]=FREE;} else f34=false;
105 if(board[35]==NONE) {f35=true;board[35]=FREE;} else f35=false;
106 if(board[36]==NONE) {f36=true;board[36]=FREE;} else f36=false;
107 if(board[39]==NONE) {f39=true;board[39]=FREE;} else f39=false;
108 if(board[40]==NONE) {f40=true;board[40]=FREE;} else f40=false;
109 if(board[41]==NONE) {f41=true;board[41]=FREE;} else f41=false;
110 }
111
112 int b6=board[6];
113 int b7=board[7];
114 int b8=board[8];
115 int b9=board[9];
116 int b11=board[11];
117 int b12=board[12];
118 int b13=board[13];
119 int b14=board[14];
120 int b17=board[17];
121 int b18=board[18];
122 int b19=board[19];
123 int b20=board[20];
124 int b22=board[22];
125 int b23=board[23];
126 int b24=board[24];
127 int b25=board[25];
128 int b28=board[28];
129 int b29=board[29];
130 int b30=board[30];
131 int b31=board[31];
132 int b33=board[33];
133 int b34=board[34];
134 int b35=board[35];
135 int b36=board[36];
136 int b39=board[39];
137 int b40=board[40];
138 int b41=board[41];
139 int b42=board[42];
140 int b44=board[44];
141 int b45=board[45];
142 int b46=board[46];
143 int b47=board[47];
144
145 board[6]=FULL-b47;
146 board[7]=FULL-b46;
147 board[8]=FULL-b45;
148 board[9]=FULL-b44;
149 board[11]=FULL-b42;
150 board[12]=FULL-b41;
151 board[13]=FULL-b40;
152 board[14]=FULL-b39;
153 board[17]=FULL-b36;
154 board[18]=FULL-b35;
155 board[19]=FULL-b34;
156 board[20]=FULL-b33;
157 board[22]=FULL-b31;
158 board[23]=FULL-b30;
159 board[24]=FULL-b29;
160 board[25]=FULL-b28;
161 board[28]=FULL-b25;
162 board[29]=FULL-b24;
163 board[30]=FULL-b23;
164 board[31]=FULL-b22;
165 board[33]=FULL-b20;
166 board[34]=FULL-b19;
167 board[35]=FULL-b18;
168 board[36]=FULL-b17;
169 board[39]=FULL-b14;
170 board[40]=FULL-b13;
171 board[41]=FULL-b12;
172 board[42]=FULL-b11;
173 board[44]=FULL-b9;
174 board[45]=FULL-b8;
175 board[46]=FULL-b7;
176 board[47]=FULL-b6;
177
178 int res=-turn();
179
180 board[6]=b6;
181 board[7]=b7;
182 board[8]=b8;
183 board[9]=b9;
184 board[11]=b11;
185 board[12]=b12;
186 board[13]=b13;
187 board[14]=b14;
188 board[17]=b17;
189 board[18]=b18;
190 board[19]=b19;
191 board[20]=b20;
192 board[22]=b22;
193 board[23]=b23;
194 board[24]=b24;
195 board[25]=b25;
196 board[28]=b28;
197 board[29]=b29;
198 board[30]=b30;
199 board[31]=b31;
200 board[33]=b33;
201 board[34]=b34;
202 board[35]=b35;
203 board[36]=b36;
204 board[39]=b39;
205 board[40]=b40;
206 board[41]=b41;
207 board[42]=b42;
208 board[44]=b44;
209 board[45]=b45;
210 board[46]=b46;
211 board[47]=b47;
212
213 if(res>resMax)
214 {
215 resMax=res;
216 if(level==1)
217 {
218 for(int i=6;i<48;i++) bestboard[i]=board[i];
219 bestcounter=1;
220 }
221 }
222 else if(res==resMax && level==1)
223 {
224 bestcounter++;
225 if((rand()%bestcounter)==0)
226 {
227 for(int i=6;i<48;i++) bestboard[i]=board[i];
228 }
229 }
230
231 if(capture)
232 {
233 if(f12) board[12]=NONE;
234 if(f13) board[13]=NONE;
235 if(f14) board[14]=NONE;
236 if(f17) board[17]=NONE;
237 if(f18) board[18]=NONE;
238 if(f19) board[19]=NONE;
239 if(f23) board[23]=NONE;
240 if(f24) board[24]=NONE;
241 if(f25) board[25]=NONE;
242 if(f28) board[28]=NONE;
243 if(f29) board[29]=NONE;
244 if(f30) board[30]=NONE;
245 if(f34) board[34]=NONE;
246 if(f35) board[35]=NONE;
247 if(f36) board[36]=NONE;
248 if(f39) board[39]=NONE;
249 if(f40) board[40]=NONE;
250 if(f41) board[41]=NONE;
251 }
252 }
253 else if(resMax<0) resMax=0;
254}
255
256
257bool Checkers::checkMove2()
258{
259 for(int i=6;i<48;i++)
260 {
261 switch(board[i])
262 {
263 case MAN2:
264 if(board[i+5]==FREE) return true;
265 if(board[i+6]==FREE) return true;
266 break;
267 case KING2:
268 if(board[i-6]==FREE) return true;
269 if(board[i-5]==FREE) return true;
270 if(board[i+5]==FREE) return true;
271 if(board[i+6]==FREE) return true;
272 }
273 }
274 return false;
275}
276
277
278int Checkers::turn()
279{
280 int resMax=(level-levelmax)*10;
281 level++;
282 if(checkCapture2())
283 {
284 for(int i=6;i<48;i++)
285 {
286 switch(board[i])
287 {
288 case MAN2:
289 manCapture2(i,resMax);
290 break;
291 case KING2:
292 kingCapture2(i,UL,resMax);
293 kingCapture2(i,UR,resMax);
294 kingCapture2(i,DL,resMax);
295 kingCapture2(i,DR,resMax);
296 }
297 }
298 }
299 else if(checkMove2())
300 {
301 for(int i=6;i<48;i++)
302 {
303 switch(board[i])
304 {
305 case MAN2:
306 if(board[i+5]==FREE)
307 {
308 board[i]=FREE;
309 if(i>38) board[i+5]=KING2;
310 else board[i+5]=MAN2;
311 turn(resMax);
312 board[i+5]=FREE;
313 board[i]=MAN2;
314 }
315 if(board[i+6]==FREE)
316 {
317 board[i]=FREE;
318 if(i>38) board[i+6]=KING2;
319 else board[i+6]=MAN2;
320 turn(resMax);
321 board[i+6]=FREE;
322 board[i]=MAN2;
323 }
324 break;
325 case KING2:
326 kingMove2(i,resMax);
327 break;
328 }
329 }
330 }
331 else ;
332
333 level--;
334 return resMax;
335}
336
337
diff --git a/noncore/games/kcheckers/checkers.h b/noncore/games/kcheckers/checkers.h
new file mode 100644
index 0000000..bd2be08
--- a/dev/null
+++ b/noncore/games/kcheckers/checkers.h
@@ -0,0 +1,56 @@
1#ifndef CHECKERS_H
2#define CHECKERS_H
3
4#define NONE 0
5#define MAN1 1
6#define KING1 2
7#define FREE 3
8#define KING2 4
9#define MAN2 5
10#define FULL 6
11
12#define UL -6
13#define UR -5
14#define DL 5
15#define DR 6
16
17
18class Checkers
19{
20 public:
21 Checkers(int);
22 virtual bool go1(int,int)=0;
23
24 void go2();
25 bool checkMove1();
26 bool checkMove2();
27
28 virtual bool checkCapture1()=0;
29 virtual bool checkCapture2()=0;
30
31 void setLevel(int i) {levelmax=i;};
32 int getBoard(int i) {return board[i];};
33
34 protected:
35 int level; // Current level
36 int levelmax; // Maximum level
37
38 int turn();
39 void turn(int &,bool capture=false);
40
41 int to;
42 int board[54];
43 int bestboard[54];
44 int bestcounter;
45
46 virtual void kingMove2(int,int &)=0;
47
48 virtual bool manCapture2(int,int &)=0;
49 virtual bool kingCapture2(int,int,int &)=0;
50
51 virtual bool manCapture1(int,int,bool &)=0;
52 virtual bool kingCapture1(int,int,bool &)=0;
53
54};
55
56#endif
diff --git a/noncore/games/kcheckers/echeckers.cpp b/noncore/games/kcheckers/echeckers.cpp
new file mode 100644
index 0000000..1146059
--- a/dev/null
+++ b/noncore/games/kcheckers/echeckers.cpp
@@ -0,0 +1,349 @@
1//
2// English Checkers
3
4
5#include "echeckers.h"
6
7
8///////////////////////////////////////////////////
9//
10// User Functions
11//
12///////////////////////////////////////////////////
13
14
15bool ECheckers::go1(int from,int field)
16{
17 to=field;
18
19 if(checkCapture1())
20 {
21 bool capture=false;
22 switch(board[from])
23 {
24 case MAN1:
25 if(manCapture1(from,UL,capture)) return true;
26 if(manCapture1(from,UR,capture)) return true;
27 return false;
28 case KING1:
29 if(kingCapture1(from,UL,capture)) return true;
30 if(kingCapture1(from,UR,capture)) return true;
31 if(kingCapture1(from,DL,capture)) return true;
32 if(kingCapture1(from,DR,capture)) return true;
33 return false;
34 }
35 }
36 else
37 {
38 switch(board[from])
39 {
40 case MAN1:
41 if((to==(from-6))||(to==(from-5)))
42 {
43 board[from]=FREE;
44 if(to<10) board[to]=KING1;
45 else board[to]=MAN1;
46 return true;
47 }
48 return false;
49 case KING1:
50 if((to==(from-6))||(to==(from-5))||
51 (to==(from+5))||(to==(from+6)) )
52 {
53 board[from]=FREE;
54 board[to]=KING1;
55 return true;
56 }
57 return false;
58 }
59 }
60 return false;
61}
62
63
64bool ECheckers::checkCapture1()
65{
66 for(int i=6;i<48;i++)
67 {
68 switch(board[i])
69 {
70 case MAN1:
71 if(board[i-6]==MAN2 || board[i-6]==KING2)
72 if(board[i-12]==FREE) return true;
73 if(board[i-5]==MAN2 || board[i-5]==KING2)
74 if(board[i-10]==FREE) return true;
75 break;
76 case KING1:
77 if(board[i-6]==MAN2 || board[i-6]==KING2)
78 if(board[i-12]==FREE) return true;
79 if(board[i-5]==MAN2 || board[i-5]==KING2)
80 if(board[i-10]==FREE) return true;
81 if(board[i+5]==MAN2 || board[i+5]==KING2)
82 if(board[i+10]==FREE) return true;
83 if(board[i+6]==MAN2 || board[i+6]==KING2)
84 if(board[i+12]==FREE) return true;
85 }
86 }
87 return false;
88}
89
90
91// Return TRUE if a course of the user true
92// Return FALSE if a course of the user incorrect
93
94bool ECheckers::manCapture1(int from,int direction,bool &capture)
95{
96 int i=from+direction;
97 if(board[i]==MAN2 || board[i]==KING2)
98 {
99 int k=i+direction;
100 if(board[k]==FREE)
101 {
102 bool next=false;
103 int save=board[i];
104 board[from]=FREE;
105 board[i]=NONE;
106
107 if(k<10)
108 {
109 board[k]=KING1;
110 if(kingCapture1(k,direction+11,next)) {board[i]=FREE;return true;}
111 }
112 else
113 {
114 board[k]=MAN1;
115 if(manCapture1(k,UL,next)) {board[i]=FREE;return true;}
116 if(manCapture1(k,UR,next)) {board[i]=FREE;return true;}
117 }
118
119 if((!next) && k==to) {board[i]=FREE;return true;}
120
121 board[k]=FREE;
122 board[i]=save;
123 board[from]=MAN1;
124 capture=true;
125 }
126 }
127 return false;
128}
129
130
131bool ECheckers::kingCapture1(int from,int direction,bool &capture)
132{
133 int i=from+direction;
134 if(board[i]==MAN2 || board[i]==KING2)
135 {
136 int k=i+direction;
137 if(board[k]==FREE)
138 {
139 bool next=false;
140 int save=board[i];
141 board[from]=FREE;
142 board[i]=NONE;
143 board[k]=KING1;
144
145 if(direction==UL || direction==DR)
146 {
147 if(kingCapture1(k,UR,next)) {board[i]=FREE;return true;}
148 if(kingCapture1(k,DL,next)) {board[i]=FREE;return true;}
149 }
150 else
151 {
152 if(kingCapture1(k,UL,next)) {board[i]=FREE;return true;}
153 if(kingCapture1(k,DR,next)) {board[i]=FREE;return true;}
154 }
155 if(kingCapture1(k,direction,next)) {board[i]=FREE;return true;}
156
157 if((!next) && k==to) {board[i]=FREE;return true;}
158
159 board[k]=FREE;
160 board[i]=save;
161 board[from]=KING1;
162 capture=true;
163 }
164 }
165 return false;
166}
167
168
169////////////////////////////////////////////////////
170//
171// Computer Functions
172//
173////////////////////////////////////////////////////
174
175
176void ECheckers::kingMove2(int from,int &resMax)
177{
178 board[from]=FREE;
179
180 int i=from-6;
181 if(board[i]==FREE)
182 {
183 board[i]=KING2;
184 turn(resMax);
185 board[i]=FREE;
186 }
187
188 i=from-5;
189 if(board[i]==FREE)
190 {
191 board[i]=KING2;
192 turn(resMax);
193 board[i]=FREE;
194 }
195
196 i=from+5;
197 if(board[i]==FREE)
198 {
199 board[i]=KING2;
200 turn(resMax);
201 board[i]=FREE;
202 }
203
204 i=from+6;
205 if(board[i]==FREE)
206 {
207 board[i]=KING2;
208 turn(resMax);
209 board[i]=FREE;
210 }
211
212 board[from]=KING2;
213}
214
215
216bool ECheckers::checkCapture2()
217{
218 for(int i=6;i<48;i++)
219 {
220 switch(board[i])
221 {
222 case MAN2:
223 if(board[i+5]==MAN1 || board[i+5]==KING1)
224 if(board[i+10]==FREE) return true;
225 if(board[i+6]==MAN1 || board[i+6]==KING1)
226 if(board[i+12]==FREE) return true;
227 break;
228 case KING2:
229 if(board[i-6]==MAN1 || board[i-6]==KING1)
230 if(board[i-12]==FREE) return true;
231 if(board[i-5]==MAN1 || board[i-5]==KING1)
232 if(board[i-10]==FREE) return true;
233 if(board[i+5]==MAN1 || board[i+5]==KING1)
234 if(board[i+10]==FREE) return true;
235 if(board[i+6]==MAN1 || board[i+6]==KING1)
236 if(board[i+12]==FREE) return true;
237 }
238 }
239 return false;
240}
241
242
243// Return TRUE if it is possible to capture
244// Return FALSE if it is impossible to capture
245
246bool ECheckers::manCapture2(int from,int &resMax)
247{
248 bool capture=false;
249
250 int i=from+5;
251 if(board[i]==MAN1 || board[i]==KING1)
252 {
253 int k=from+10;
254 if(board[k]==FREE)
255 {
256 int save=board[i];
257 board[from]=FREE;
258 board[i]=NONE;
259 resMax--;
260 if(from>32)
261 {
262 board[k]=KING2;
263 if(!kingCapture2(k,UL,resMax)) turn(resMax,true);
264 }
265 else
266 {
267 board[k]=MAN2;
268 if(!manCapture2(k,resMax)) turn(resMax,true);
269 }
270 resMax++;
271 board[k]=FREE;
272 board[i]=save;
273 board[from]=MAN2;
274 capture=true;
275 }
276 }
277
278 i=from+6;
279 if(board[i]==MAN1 || board[i]==KING1)
280 {
281 int k=from+12;
282 if(board[k]==FREE)
283 {
284 int save=board[i];
285 board[from]=FREE;
286 board[i]=NONE;
287 resMax--;
288 if(from>32)
289 {
290 board[k]=KING2;
291 if(!kingCapture2(k,UR,resMax)) turn(resMax,true);
292 }
293 else
294 {
295 board[k]=MAN2;
296 if(!manCapture2(k,resMax)) turn(resMax,true);
297 }
298 resMax++;
299 board[k]=FREE;
300 board[i]=save;
301 board[from]=MAN2;
302 capture=true;
303 }
304 }
305
306 if(capture) return true;
307 return false;
308}
309
310
311bool ECheckers::kingCapture2(int from,int direction,int &resMax)
312{
313 int i=from+direction;
314 if(board[i]==MAN1 || board[i]==KING1)
315 {
316 int k=i+direction;
317 if(board[k]==FREE)
318 {
319 bool capture=false;
320 int save=board[i];
321 board[from]=FREE;
322 board[i]=NONE;
323 resMax--;
324
325 board[k]=KING2;
326 if(direction==UL || direction==DR)
327 {
328 if(kingCapture2(k,UR,resMax)) capture=true;
329 if(kingCapture2(k,DL,resMax)) capture=true;
330 }
331 else
332 {
333 if(kingCapture2(k,UL,resMax)) capture=true;
334 if(kingCapture2(k,DR,resMax)) capture=true;
335 }
336 if(kingCapture2(k,direction,resMax)) capture=true;
337
338 if(!capture) turn(resMax,true);
339 board[k]=FREE;
340
341 resMax++;
342 board[i]=save;
343 board[from]=KING2;
344 return true;
345 }
346 }
347 return false;
348}
349
diff --git a/noncore/games/kcheckers/echeckers.h b/noncore/games/kcheckers/echeckers.h
new file mode 100644
index 0000000..5ca3ecc
--- a/dev/null
+++ b/noncore/games/kcheckers/echeckers.h
@@ -0,0 +1,28 @@
1
2#ifndef ECHECKERS_H
3#define ECHECKERS_H
4
5#include <checkers.h>
6
7
8class ECheckers:public Checkers
9{
10 public:
11 ECheckers(int skill):Checkers(skill){};
12 bool go1(int,int);
13
14 bool checkCapture1();
15 bool checkCapture2();
16
17 private:
18 void kingMove2(int,int &);
19
20 bool manCapture1(int,int,bool &);
21 bool kingCapture1(int,int,bool &);
22
23 bool manCapture2(int,int &);
24 bool kingCapture2(int,int,int &);
25
26};
27
28#endif
diff --git a/noncore/games/kcheckers/field.cpp b/noncore/games/kcheckers/field.cpp
new file mode 100644
index 0000000..0755008
--- a/dev/null
+++ b/noncore/games/kcheckers/field.cpp
@@ -0,0 +1,31 @@
1
2#include <qpainter.h>
3
4#include "field.h"
5
6Field::Field(QWidget *parent,int i):QWidget(parent)
7{
8 pixmap=new QPixmap(SIZE,SIZE);
9 number=i;
10}
11
12void Field::paintEvent(QPaintEvent*)
13{
14 bitBlt(this,0,0,pixmap);
15}
16
17void Field::mousePressEvent(QMouseEvent* mouseevent)
18{
19 if(mouseevent->button()!=Qt::LeftButton) return;
20 emit click(number);
21}
22
23void Field::draw(QImage *image)
24{
25 QPainter paint;
26 paint.begin(pixmap);
27 paint.drawImage(0,0,*image);
28 paint.end();
29 update();
30}
31
diff --git a/noncore/games/kcheckers/field.h b/noncore/games/kcheckers/field.h
new file mode 100644
index 0000000..d929e49
--- a/dev/null
+++ b/noncore/games/kcheckers/field.h
@@ -0,0 +1,27 @@
1
2#ifndef FIELD_H
3#define FIELD_H
4
5#include <qwidget.h>
6#include <qpixmap.h>
7
8#define SIZE 28
9
10class Field:public QWidget
11{
12 Q_OBJECT
13 public:
14 Field(QWidget*,int);
15 void draw(QImage*);
16 signals:
17 void click(int);
18 protected:
19 void paintEvent(QPaintEvent*);
20 void mousePressEvent(QMouseEvent*);
21 private:
22 int number;
23 QPixmap *pixmap;
24
25};
26
27#endif
diff --git a/noncore/games/kcheckers/kcheckers.cpp b/noncore/games/kcheckers/kcheckers.cpp
new file mode 100644
index 0000000..3df744e
--- a/dev/null
+++ b/noncore/games/kcheckers/kcheckers.cpp
@@ -0,0 +1,382 @@
1
2#include <qimage.h>
3#include <qframe.h>
4#include <qlayout.h>
5#include <qmenubar.h>
6#include <qwhatsthis.h>
7#include <qmessagebox.h>
8#include <qapplication.h>
9
10#include "kcheckers.h"
11#include "echeckers.h"
12#include "rcheckers.h"
13
14#include "pics/exit.xpm"
15#include "pics/logo.xpm"
16#include "pics/wood1.xpm"
17#include "pics/wood2.xpm"
18#include "pics/wood3.xpm"
19#include "pics/marble1.xpm"
20#include "pics/marble2.xpm"
21#include "pics/marble3.xpm"
22#include "pics/biglogo.xpm"
23#include "pics/man_black.xpm"
24#include "pics/man_white.xpm"
25#include "pics/king_black.xpm"
26#include "pics/king_white.xpm"
27#include "pics/contexthelp.xpm"
28
29
30const int KCheckers::t[]={6,7,8,9,11,12,13,14,17,18,19,20,22,23,
31 24,25,28,29,30,31,33,34,35,36,39,40,41,42,44,45,46,47};
32
33KCheckers::KCheckers():QMainWindow(0,0,WStyle_DialogBorder)
34{
35 setCaption("KCheckers");
36 setIcon(QPixmap(biglogo));
37 showMaximized();
38
39 QPopupMenu* gameMenu=new QPopupMenu;
40 gameMenu->insertItem(QPixmap(logo),tr("New"),this,SLOT(newGame()));
41 gameMenu->insertSeparator();
42 gameMenu->insertItem(QPixmap(exit),tr("Quit"),qApp,SLOT(quit()));
43
44 skillMenu=new QPopupMenu;
45
46 skillMenu->insertItem(tr("Beginner"),this,SLOT(setSkillBeginner()),0,BEGINNER);
47 skillMenu->insertItem(tr("Novice"), this,SLOT(setSkillNovice()), 0,NOVICE);
48 skillMenu->insertItem(tr("Average"), this,SLOT(setSkillAverage()), 0,AVERAGE);
49 skillMenu->insertItem(tr("Good"), this,SLOT(setSkillGood()), 0,GOOD);
50 skillMenu->insertItem(tr("Expert"), this,SLOT(setSkillExpert()), 0,EXPERT);
51 skillMenu->insertItem(tr("Master"), this,SLOT(setSkillMaster()), 0,MASTER);
52
53 optionsMenu=new QPopupMenu;
54
55 optionsMenu->insertItem(tr("English Rules"),this,SLOT(setRulesEnglish()),0,ENGLISH);
56 optionsMenu->insertItem(tr("Russian Rules"),this,SLOT(setRulesRussian()),0,RUSSIAN);
57 optionsMenu->insertSeparator();
58 optionsMenu->insertItem(tr("Marble Board"),this,SLOT(setPatternMarble()),0,MARBLE);
59 optionsMenu->insertItem(tr("Wooden Board"),this,SLOT(setPatternWood()), 0,WOOD);
60
61 QPopupMenu* helpMenu=new QPopupMenu;
62
63 helpMenu->insertItem(QPixmap(contexthelp),tr("What's This"),this,SLOT(whatsThis()));
64 helpMenu->insertSeparator();
65 helpMenu->insertItem(QPixmap(logo),tr("About KCheckers"),this,SLOT(about()));
66 helpMenu->insertItem(tr("About &Qt"),this,SLOT(aboutQt()));
67
68 menuBar()->insertItem(tr("Game"), gameMenu);
69 menuBar()->insertItem(tr("Skill"), skillMenu);
70 menuBar()->insertItem(tr("Options"),optionsMenu);
71 menuBar()->insertItem(tr("Help"), helpMenu);
72
73 skill=NOVICE;
74 skillMenu->setItemChecked(skill,true);
75
76 rules=ENGLISH;
77 optionsMenu->setItemChecked(rules,true);
78
79 pattern=WOOD;
80 optionsMenu->setItemChecked(pattern,true);
81
82 imageMan1=new QImage(man_black);
83 imageMan2=new QImage(man_white);
84 imageKing1=new QImage(king_black);
85 imageKing2=new QImage(king_white);
86
87 imageWood1=new QImage(wood1);
88 imageWood2=new QImage(wood2);
89 imageWood3=new QImage(wood3);
90 imageMarble1=new QImage(marble1);
91 imageMarble2=new QImage(marble2);
92 imageMarble3=new QImage(marble3);
93
94 imagePat1=imageWood1;
95 imagePat2=imageWood2;
96 imageFrame=imageWood3;
97
98 QWidget* centralWidget=new QWidget(this);
99 setCentralWidget(centralWidget);
100
101 QFrame* frame=new QFrame(centralWidget);
102 frame->setFrameStyle(QFrame::Box|QFrame::Plain);
103 frame->setFixedSize(SIZE*8+2,SIZE*8+2);
104
105 QVBoxLayout* vlayout=new QVBoxLayout(centralWidget);
106 vlayout->addWidget(frame);
107
108 statusLabel = new QLabel(centralWidget);
109 vlayout->addWidget(statusLabel);
110
111 for(int i=0;i<64;i++) field[i]=new Field(frame,i);
112
113 QGridLayout* grid=new QGridLayout(frame,8,8,1,0);
114
115 for(int i=0;i<4;i++)
116 {
117 for(int k=0;k<4;k++)
118 {
119 grid->addWidget(field[i*8+k+32],i*2, k*2 );
120 grid->addWidget(field[i*8+k ],i*2, k*2+1);
121 grid->addWidget(field[i*8+k+4 ],i*2+1,k*2 );
122 grid->addWidget(field[i*8+k+36],i*2+1,k*2+1);
123 }
124 }
125
126 for(int i=0;i<32;i++)
127 connect(field[i],SIGNAL(click(int)),this,SLOT(click(int)));
128
129 userFirst=false;
130
131 game=NULL;
132 newGame();
133}
134
135
136void KCheckers::setSkill(int set)
137{
138 skillMenu->setItemChecked(skill,false);
139
140 skill=set;
141 skillMenu->setItemChecked(skill,true);
142
143 game->setLevel(skill);
144}
145
146
147void KCheckers::setRules(int set)
148{
149 optionsMenu->setItemChecked(rules,false);
150
151 rules=set;
152 optionsMenu->setItemChecked(rules,true);
153
154 colorChange();
155 newGame();
156}
157
158
159void KCheckers::setPattern(int set)
160{
161 optionsMenu->setItemChecked(pattern,false);
162
163 pattern=set;
164 optionsMenu->setItemChecked(pattern,true);
165
166 switch(pattern)
167 {
168 case MARBLE:
169 imagePat1=imageMarble1;
170 imagePat2=imageMarble2;
171 imageFrame=imageMarble3;
172 break;
173 case WOOD:
174 imagePat1=imageWood1;
175 imagePat2=imageWood2;
176 imageFrame=imageWood3;
177 }
178
179 drawBoard();
180
181 if(selected) field[from]->draw(imageFrame);
182}
183
184
185void KCheckers::about()
186{
187 QMessageBox::about(this, "About",
188 "KCheckers, a board game. Ver 0.2\n"
189 "(C) 2002, A. Peredri <andi@ukr.net>\n\n"
190 "http://kcheckers.tuxfamily.org\n\n"
191 "Opie version by S.Prud'homme\n"
192 "<prudhomme@laposte.net>\n\n"
193 "http://opie.handhelds.org\n\n"
194 "This program is distributed under the\n"
195 "terms of the GNU General Public\n"
196 "License.");
197}
198
199
200void KCheckers::aboutQt()
201{
202 QMessageBox::aboutQt(this);
203}
204
205
206void KCheckers::newGame()
207{
208 if(game)
209 {
210 delete game;
211 QWhatsThis::remove(this);
212 }
213
214 switch(rules)
215 {
216 case ENGLISH:
217 game=new ECheckers(skill);
218 QWhatsThis::add(this,
219 "<b>Rules of English Checkers</b>"
220 "<ul>"
221 "<li>In the beginning of game you have<br>12 checkers (men)."
222 "<li>Men move forward only."
223 "<li>Men capture by jumping forward only."
224 "<li>A man which reaches the far side of<br>the board becomes a king."
225 "<li>Kings move forward or backward to<br>one square."
226 "<li>Kings capture by jumping forward or<br>backward."
227 "<li>Whenever a player is able to make<br> a capture he must do so."
228 "</ul>");
229 break;
230 case RUSSIAN:
231 game=new RCheckers(skill);
232 QWhatsThis::add(this,
233 "<b>Rules of Russian Checkers</b>"
234 "<ul>"
235 "<li>In the beginning of game you have<br> 12 checkers (men)."
236 "<li>Men move forward only."
237 "<li>Men capture by jumping forward or<br>backward."
238 "<li>A man which reaches the far side of<br> the board becomes a king."
239 "<li>Kings move forward or backward to<br>any number of squares."
240 "<li>Kings capture by jumping forward or<br>backward."
241 "<li>Whenever a player is able to make<br> a capture he must do so."
242 "</ul>");
243 }
244
245 selected=false;
246 gameOver=false;
247
248 colorChange();
249 drawBoard();
250
251 if(!userFirst) compGo();
252
253 statusLabel->setText(tr("Go!"));
254}
255
256
257void KCheckers::colorChange()
258{
259 userFirst=!userFirst;
260
261 QImage* image;
262 image=imageMan1;
263 imageMan1=imageMan2;
264 imageMan2=image;
265 image=imageKing1;
266 imageKing1=imageKing2;
267 imageKing2=image;
268}
269
270
271void KCheckers::drawBoard()
272{
273 // Drawing of start position
274 for(int i=0;i<32;i++)
275 {
276 field[i]->draw(imagePat2);
277 if(game->getBoard(t[i])==MAN1) field[i]->draw(imageMan1);
278 else if(game->getBoard(t[i])==MAN2) field[i]->draw(imageMan2);
279 else if(game->getBoard(t[i])==KING1) field[i]->draw(imageKing1);
280 else if(game->getBoard(t[i])==KING2) field[i]->draw(imageKing2);
281 }
282
283 for(int i=32;i<64;i++) field[i]->draw(imagePat1);
284}
285
286
287void KCheckers::click(int fieldNumber)
288{
289 if(gameOver) return;
290 switch(game->getBoard(t[fieldNumber]))
291 {
292 case MAN1:
293 case KING1:
294 // User selected
295 if(!selected)
296 {
297 from=fieldNumber;
298 selected=true;
299 field[fieldNumber]->draw(imageFrame);
300 return;
301 }
302 // User reselected
303 else
304 {
305 field[from]->draw(imagePat2);
306 if(game->getBoard(t[from])==MAN1) field[from]->draw(imageMan1);
307 else field[from]->draw(imageKing1);
308 from=fieldNumber;
309 field[fieldNumber]->draw(imageFrame);
310 return;
311 }
312 case FREE:
313 if(!selected) return;
314
315 if(!userGo(fieldNumber)) return;
316 selected=false;
317
318 if(!(game->checkMove2() || game->checkCapture2()))
319 {
320 gameOver=true;
321 statusLabel->setText(tr("Congratulation! You have won!"));
322 return;
323 }
324
325 statusLabel->setText(tr("Please wait..."));
326 qApp->processEvents();
327
328 compGo();
329 if(!(game->checkMove1() || game->checkCapture1()))
330 {
331 gameOver=true;
332 statusLabel->setText(tr("You have lost. Game over."));
333 return;
334 }
335 statusLabel->setText(tr("Go!"));
336 }
337}
338
339
340void KCheckers::compGo()
341{
342 int save[32];
343 for(int i=0;i<32;i++) save[i]=game->getBoard(t[i]);
344
345 game->go2();
346
347 for(int i=0;i<32;i++)
348 {
349 if(game->getBoard(t[i])==save[i]) continue;
350 field[i]->draw(imagePat2);
351 if(game->getBoard(t[i])==MAN1) field[i]->draw(imageMan1);
352 else if(game->getBoard(t[i])==MAN2) field[i]->draw(imageMan2);
353 else if(game->getBoard(t[i])==KING1) field[i]->draw(imageKing1);
354 else if(game->getBoard(t[i])==KING2) field[i]->draw(imageKing2);
355 }
356}
357
358
359bool KCheckers::userGo(int to)
360{
361 int save[32];
362 for(int i=0;i<32;i++) save[i]=game->getBoard(t[i]);
363
364 if(!game->go1(t[from],t[to]))
365 {
366 statusLabel->setText(tr("Incorrect course."));
367 return false;
368 }
369
370 for(int i=0;i<32;i++)
371 {
372 if(game->getBoard(t[i])==save[i]) continue;
373 field[i]->draw(imagePat2);
374 if(game->getBoard(t[i])==MAN1) field[i]->draw(imageMan1);
375 else if(game->getBoard(t[i])==MAN2) field[i]->draw(imageMan2);
376 else if(game->getBoard(t[i])==KING1) field[i]->draw(imageKing1);
377 else if(game->getBoard(t[i])==KING2) field[i]->draw(imageKing2);
378 }
379 return true;
380}
381
382
diff --git a/noncore/games/kcheckers/kcheckers.h b/noncore/games/kcheckers/kcheckers.h
new file mode 100644
index 0000000..e86524f
--- a/dev/null
+++ b/noncore/games/kcheckers/kcheckers.h
@@ -0,0 +1,97 @@
1
2#ifndef KCHECKERS_H
3#define KCHECKERS_H
4
5#include <qmainwindow.h>
6#include <qlabel.h>
7
8#include "field.h"
9#include "checkers.h"
10
11#define WOOD 1
12#define MARBLE 2
13
14#define ENGLISH 11
15#define RUSSIAN 12
16
17#define BEGINNER 2
18#define NOVICE 4
19#define AVERAGE 5
20#define GOOD 6
21#define EXPERT 7
22#define MASTER 8
23
24
25class KCheckers:public QMainWindow
26{
27 Q_OBJECT
28 public:
29 KCheckers();
30
31 private slots:
32 void about();
33 void aboutQt();
34 void newGame();
35 void click(int); // Processes the mouse clics on fields
36
37 void setSkillBeginner() {setSkill(BEGINNER);};
38 void setSkillNovice() {setSkill(NOVICE);};
39 void setSkillAverage() {setSkill(AVERAGE);};
40 void setSkillGood() {setSkill(GOOD);};
41 void setSkillExpert() {setSkill(EXPERT);};
42 void setSkillMaster() {setSkill(MASTER);};
43
44 void setPatternWood() {setPattern(WOOD);};
45 void setPatternMarble() {setPattern(MARBLE);};
46
47 void setRulesEnglish() {setRules(ENGLISH);};
48 void setRulesRussian() {setRules(RUSSIAN);};
49
50 private:
51 void compGo();
52 bool userGo(int);
53
54 void drawBoard();
55 void colorChange();
56
57 void setSkill(int);
58 void setRules(int);
59 void setPattern(int);
60
61 int from; // Selected by user
62 int skill;
63 int rules;
64 int pattern;
65 bool gameOver;
66 bool selected;
67 bool userFirst;
68
69 Field* field[64]; // Fields of board
70
71 QImage* imagePat1; // Patterns
72 QImage* imagePat2;
73 QImage* imageFrame; // Frame of selected field
74
75 QImage* imageWood1;
76 QImage* imageWood2;
77 QImage* imageWood3;
78 QImage* imageMarble1;
79 QImage* imageMarble2;
80 QImage* imageMarble3;
81
82 QImage* imageMan1;
83 QImage* imageMan2;
84 QImage* imageKing1;
85 QImage* imageKing2;
86
87 Checkers* game;
88 QPopupMenu* skillMenu;
89 QPopupMenu* optionsMenu;
90 QLabel* statusLabel;
91
92 static const int t[32]; // Translate table
93
94};
95
96#endif
97
diff --git a/noncore/games/kcheckers/kcheckers.pro b/noncore/games/kcheckers/kcheckers.pro
new file mode 100644
index 0000000..6ed8c1c
--- a/dev/null
+++ b/noncore/games/kcheckers/kcheckers.pro
@@ -0,0 +1,19 @@
1 TEMPLATE= app
2 CONFIG = qt warn_on release
3 HEADERS = checkers.h \
4 echeckers.h \
5 field.h \
6 kcheckers.h \
7 rcheckers.h
8 SOURCES = checkers.cpp \
9 echeckers.cpp \
10 field.cpp \
11 kcheckers.cpp \
12 main.cpp \
13 rcheckers.cpp
14 INTERFACES=
15 INCLUDEPATH+= . \
16 $(OPIEDIR)/include
17 LIBS += -lqpe
18 DESTDIR = $(OPIEDIR)/bin
19 TARGET = kcheckers
diff --git a/noncore/games/kcheckers/main.cpp b/noncore/games/kcheckers/main.cpp
new file mode 100644
index 0000000..ac86271
--- a/dev/null
+++ b/noncore/games/kcheckers/main.cpp
@@ -0,0 +1,18 @@
1
2#include <qpe/qpeapplication.h>
3#include <qfont.h>
4
5#include "kcheckers.h"
6
7
8int main(int argc, char *argv[])
9{
10 QPEApplication app(argc,argv);
11
12 KCheckers kcheckers;
13 app.setMainWidget(&kcheckers);
14 kcheckers.show();
15
16 return app.exec();
17}
18
diff --git a/noncore/games/kcheckers/pics/biglogo.xpm b/noncore/games/kcheckers/pics/biglogo.xpm
new file mode 100644
index 0000000..6570d88
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/biglogo.xpm
@@ -0,0 +1,41 @@
1/* XPM */
2static const char *biglogo[]={
3"32 32 6 1",
4". c None",
5"# c #000000",
6"a c #303030",
7"d c #d7d7d7",
8"c c #eaeaea",
9"b c #ffffff",
10"................................",
11"................................",
12"................................",
13"................................",
14"....########################....",
15"....#aaaaaaaaaaaaaaaaaaaaaa#....",
16"....#abbbbbbbbbb##########a#....",
17"....#abbbbbbbcbc##########a#....",
18"....#abbbbbbbbbb##########a#....",
19"....#abbbbbcbcbc##########a#....",
20"....#abbbbbbbbbb##########a#....",
21"....#abbbcbcbcbc##########a#....",
22"....#abbbbbbbbbc##########a#....",
23"....#abcbcbcbbcc##########a#....",
24"....#abbbbbbbccc##########a#....",
25"....#abcbcbccccc##########a#....",
26"....#a##########cccccccccca#....",
27"....#a##########cccccccccca#....",
28"....#a##########ccccccccdca#....",
29"....#a##########cccccccccca#....",
30"....#a##########ccccccdcdca#....",
31"....#a##########cccccccccca#....",
32"....#a##########ccccdcdcdca#....",
33"....#a##########cccccccccda#....",
34"....#a##########ccdcdcdcdca#....",
35"....#a##########cccccccdcda#....",
36"....#aaaaaaaaaaaaaaaaaaaaaa#....",
37"....########################....",
38"................................",
39"................................",
40"................................",
41"................................"};
diff --git a/noncore/games/kcheckers/pics/contexthelp.xpm b/noncore/games/kcheckers/pics/contexthelp.xpm
new file mode 100644
index 0000000..9447207
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/contexthelp.xpm
@@ -0,0 +1,20 @@
1/* XPM */
2static const char *contexthelp[]={
3"14 14 3 1",
4". c None",
5"a c #000000",
6"# c #ffffff",
7"##............",
8"#a#...........",
9"#aa#.....aaaa.",
10"#aaa#...aa..aa",
11"#aaaa#......aa",
12"#aaaaa#.....aa",
13"#aaaaaa#...aa.",
14"#aaaaaaa#.aa..",
15"#aaaa###..aa..",
16"#a##a#........",
17"##..#a#...aa..",
18"....#a#.......",
19".....#........",
20".............."};
diff --git a/noncore/games/kcheckers/pics/exit.xpm b/noncore/games/kcheckers/pics/exit.xpm
new file mode 100644
index 0000000..6fe404e
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/exit.xpm
@@ -0,0 +1,21 @@
1/* XPM */
2static const char *exit[]={
3"14 14 4 1",
4". c None",
5"# c #000000",
6"a c #303030",
7"b c #757575",
8"..............",
9"......##......",
10"......##......",
11"...#..##..#...",
12"..a##.##.##a..",
13".b##..##..##b.",
14".a#b..##..b#a.",
15".##...##...##.",
16".##...##...##.",
17".a#b..##..b#a.",
18".b##......##b.",
19"..a##b..b##a..",
20"...a######a...",
21"....ba##ab...."};
diff --git a/noncore/games/kcheckers/pics/king_black.xpm b/noncore/games/kcheckers/pics/king_black.xpm
new file mode 100644
index 0000000..382ee71
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/king_black.xpm
@@ -0,0 +1,39 @@
1/* XPM */
2static const char *king_black[]={
3"28 28 8 1",
4". c None",
5"# c #000000",
6"f c #303030",
7"d c #585858",
8"b c #808080",
9"a c #a0a0a0",
10"c c #dcdcdc",
11"e c #ffffff",
12"..........########..........",
13"........##aaabbbbb##........",
14"......##caddddddddbb##......",
15".....#ccc###########bb#.....",
16"....#eed##############b#....",
17"...#ee#################b#...",
18"..#ee###################b#..",
19"..#e##########e#########b#..",
20".#ce##########e##########b#.",
21".#c##########ded#########b#.",
22"#aa####ca####aeb####ea####b#",
23"#aa####bea###cea###aeb####b#",
24"#ad####dce###ecc###ecd####b#",
25"#ad#####cea##ecc##aea#####b#",
26"#ad#####acea#ecc#aecb#####b#",
27"#ad######cee#ecc#eec######b#",
28"#ad######cceeecceeca######b#",
29"#bd######acccccccccb######b#",
30".#b#######ccccccccc######b#.",
31".#b#######cccccccca######b#.",
32"..#b######aaaaaaaab#####b#..",
33"..#b#######fffffffff####b#..",
34"...#b##################b#...",
35"....#b################b#....",
36".....#bb############bb#.....",
37"......##bb########bb##......",
38"........##bbbbbbbb##........",
39"..........########.........."};
diff --git a/noncore/games/kcheckers/pics/king_white.xpm b/noncore/games/kcheckers/pics/king_white.xpm
new file mode 100644
index 0000000..30932e8
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/king_white.xpm
@@ -0,0 +1,39 @@
1/* XPM */
2static const char *king_white[]={
3"28 28 8 1",
4". c None",
5"# c #000000",
6"d c #303030",
7"e c #585858",
8"f c #808080",
9"c c #a0a0a0",
10"b c #dcdcdc",
11"a c #ffffff",
12"..........########..........",
13"........##aaaaaaaa##........",
14"......##aaabbbbbbbcc##......",
15".....#aaabbbbbbbbbbbcc#.....",
16"....#aabbbbbbbbbbbbbbbc#....",
17"...#aabbbbbbbbbbbbbbbbbc#...",
18"..#aabbbbbbbbbbbbbbbbbbbc#..",
19"..#abbbbbbbbbadbbbbbbbbbc#..",
20".#abbbbbbbbbbadbbbbbbbbbbc#.",
21".#abbbbbbbbbbadbbbbbbbbbbc#.",
22"#aabbbb#abbbbadbbbbba#bbbbc#",
23"#abbbbb#dabbac#cbbbae#bbbbc#",
24"#abbbbbaddbbafdfbbaf#ebbbbc#",
25"#abbbbbbedcbaedebba##cbbbbc#",
26"#abbbbbbcddaadddbafdebbbbbc#",
27"#abbbbbbbdddadddacddcbbbbbc#",
28"#abbbbbbbeddfdddfddebbbbbbc#",
29"#abbbbbbbcdddddddddcbbbbbbc#",
30".#cbbbbbbbddddddddebbbbbbc#.",
31".#cbbbbbbbedddddddcbbbbbbc#.",
32"..#cbbbbbbcfffffffbbbbbbc#..",
33"..#cbbbbbbbbbbbbbbbbbbbbc#..",
34"...#cbbbbbbbbbbbbbbbbbbc#...",
35"....#cbbbbbbbbbbbbbbbbc#....",
36".....#ccbbbbbbbbbbbbcc#.....",
37"......##ccbbbbbbbbcc##......",
38"........##cccccccc##........",
39"..........########.........."};
diff --git a/noncore/games/kcheckers/pics/logo.xpm b/noncore/games/kcheckers/pics/logo.xpm
new file mode 100644
index 0000000..a47d3de
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/logo.xpm
@@ -0,0 +1,23 @@
1/* XPM */
2static const char *logo[]={
3"14 14 6 1",
4". c None",
5"# c #000000",
6"d c #dcdcdc",
7"c c #e1e1e1",
8"b c #efefef",
9"a c #ffffff",
10"..............",
11".############.",
12".#aaaab######.",
13".#aaaaa######.",
14".#aabab######.",
15".#aaabb######.",
16".#babbb######.",
17".######bcbbc#.",
18".######bbbbd#.",
19".######bbcdd#.",
20".######bcddd#.",
21".######cdddd#.",
22".############.",
23".............."};
diff --git a/noncore/games/kcheckers/pics/man_black.xpm b/noncore/games/kcheckers/pics/man_black.xpm
new file mode 100644
index 0000000..e40a265
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/man_black.xpm
@@ -0,0 +1,39 @@
1/* XPM */
2static const char *man_black[]={
3"28 28 8 1",
4". c None",
5"# c #000000",
6"c c #585858",
7"a c #808080",
8"f c #a0a0a0",
9"e c #bdbdbd",
10"b c #dcdcdc",
11"d c #ffffff",
12"..........########..........",
13"........##aaaaaaaa##........",
14"......##ba########aa##......",
15".....#bbc###########aa#.....",
16"....#ddc##############a#....",
17"...#dd#######cccc######a#...",
18"..#dd######aacccccc#####a#..",
19"..#d#####ddeaac##ccc####a#..",
20".#bd####dde#######ccc####a#.",
21".#b####dde#########cc##cc##.",
22"#aa####de#####ccc##ccc#ccc##",
23"#a####ade#####ccc###cc#ccc##",
24"#a####ae########cc#####ccc##",
25"#a####ca#########ac####ccc##",
26"#a###ccc#########ed####acc##",
27"#a###cc####c#####dd###aacc##",
28"#a###ccc###cc###dd####eeaa##",
29"#a####cc####caedde###bbdbc##",
30".#a###ccc#####dd#####bdde##.",
31".#a####ccccc########bddd###.",
32"..#a####cccc#######bdddb##..",
33"..#a######cc#####bbdddb###..",
34"...#a########aebbdddbb###...",
35"....#a#####caaabddbbe###....",
36".....#aa#cccccfbbde####.....",
37"......##a#cccccb######......",
38"........############........",
39"..........########.........."};
diff --git a/noncore/games/kcheckers/pics/man_white.xpm b/noncore/games/kcheckers/pics/man_white.xpm
new file mode 100644
index 0000000..b0968db
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/man_white.xpm
@@ -0,0 +1,41 @@
1/* XPM */
2static const char *man_white[]={
3"28 28 10 1",
4". c None",
5"# c #000000",
6"g c #808080",
7"d c #a0a0a0",
8"f c #b3b3b3",
9"a c #d7d7d7",
10"e c #dcdcdc",
11"h c #e1e1e1",
12"c c #f6f6f6",
13"b c #ffffff",
14"..........########..........",
15"........##aaaaaaaa##........",
16"......##abbcbbbbbbdd##......",
17".....#abbbeeeeeeebbedd#.....",
18"....#abbbeafffffffebeed#....",
19"...#abbeadfggdgggdfebbfd#...",
20"..#abbeafggeeeeeeggfeeefd#..",
21"..#abeafgabbbbbbbeegfebed#..",
22".#abeafgebbeeeeebbbegfebfd#.",
23".#abefgebbedddddeebbhgdbed#.",
24"#abbafgebeddggggdhebegdebfd#",
25"#abefgebbedgggffffebbagdbed#",
26"#abefgebedggffafffeebegdbed#",
27"#abefgebedggfaaaafeebegdbed#",
28"#abefgebedgfaaeeafeebegdbed#",
29"#acefgebedgfaeebbbeebegdbed#",
30"#abeffebedgffeabbbebbegfchd#",
31"#acbhfgebeddfaabbbebhfdhhfd#",
32".#dbhfggebedddfeeebbhgfbhd#.",
33".#debefgeebbeeeeebbhgfbbhd#.",
34"..#deeefgeebbbbbbbhgfbbhd#..",
35"..#debbefggehhhhhfgfhbhhd#..",
36"...#deebeffggggggdfebhhd#...",
37"....#deebeeehddddbbbchd#....",
38".....#ddeeebbbbbbeehdd#.....",
39"......##ddeeeeeeeedd##......",
40"........##dddddddd##........",
41"..........########.........."};
diff --git a/noncore/games/kcheckers/pics/marble1.xpm b/noncore/games/kcheckers/pics/marble1.xpm
new file mode 100644
index 0000000..124cbd2
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/marble1.xpm
@@ -0,0 +1,240 @@
1/* XPM */
2static const char *marble1[]={
3"28 28 209 2",
4"#Y c #cbcee3",
5".s c #cccfe4",
6".X c #cdcfe5",
7"ba c #cdd0e2",
8"ad c #cdd0e5",
9"a7 c #ced0e3",
10"al c #ced0e5",
11"ae c #ced0e6",
12"aW c #ced1e3",
13".J c #ced1e6",
14"#c c #cfd1e4",
15"aA c #cfd1e7",
16"bd c #cfd2e4",
17"b. c #cfd2e5",
18".W c #cfd2e7",
19"#I c #cfd2e8",
20"a5 c #d0d2e5",
21"be c #d0d2e7",
22".8 c #d0d2e8",
23"aM c #d0d3e4",
24".4 c #d0d3e5",
25"#b c #d0d3e6",
26".r c #d0d3e8",
27"bl c #d0d3e9",
28".f c #d1d3e6",
29"bm c #d1d3e9",
30".E c #d1d4e6",
31".A c #d1d4e7",
32"at c #d1d4e8",
33".t c #d1d4e9",
34"#E c #d1d4ea",
35"#d c #d2d4e7",
36".Y c #d2d4ea",
37"#a c #d2d5e7",
38".5 c #d2d5e8",
39"bk c #d2d5e9",
40"#B c #d2d5ea",
41"#p c #d3d5e8",
42"## c #d3d5eb",
43".3 c #d3d6e8",
44"aZ c #d3d6e9",
45"aG c #d3d6ea",
46"#X c #d3d6eb",
47".7 c #d3d6ec",
48"a# c #d3d8e4",
49".2 c #d4d5e9",
50"#y c #d4d6e9",
51"#5 c #d4d6eb",
52".L c #d4d6ec",
53"#e c #d4d7e9",
54".Q c #d4d7ea",
55"#Q c #d4d7eb",
56".O c #d4d7ec",
57"#D c #d4d7ed",
58".R c #d5d7ea",
59"#O c #d5d7eb",
60"aH c #d5d7ec",
61"#l c #d5d7ed",
62"aV c #d5d8e9",
63".d c #d5d8ea",
64".e c #d5d8eb",
65".q c #d5d8ed",
66".K c #d5d8ee",
67"aT c #d5d9e8",
68"aF c #d6d8ea",
69".S c #d6d8eb",
70"aQ c #d6d8ed",
71".N c #d6d8ee",
72".l c #d6d9eb",
73".i c #d6d9ec",
74"#N c #d6d9ed",
75"#s c #d6d9ee",
76".0 c #d6d9ef",
77"aa c #d6dae7",
78"az c #d7d9eb",
79"#q c #d7d9ec",
80"#F c #d7d9ef",
81".a c #d7daec",
82".c c #d7daed",
83"#R c #d7daee",
84".6 c #d7daef",
85".w c #d7daf0",
86"aw c #d7dbe8",
87"#v c #d8daed",
88"bn c #d8daee",
89"a6 c #d8daef",
90"#j c #d8daf0",
91"ah c #d8dbeb",
92".B c #d8dbed",
93".b c #d8dbee",
94"#k c #d8dbf0",
95".y c #d8dbf1",
96"aj c #d8dce9",
97"ay c #d8dcea",
98"#9 c #d8dcec",
99"#S c #d9dbee",
100"bo c #d9dbef",
101"#n c #d9dbf1",
102"#4 c #d9dceb",
103"#g c #d9dcee",
104".# c #d9dcef",
105"an c #d9dcf0",
106".v c #d9dcf1",
107"#6 c #d9dcf2",
108"#3 c #d9deeb",
109".F c #dadcef",
110"a1 c #dadcf0",
111"as c #dadcf2",
112"#x c #daddef",
113".g c #daddf0",
114"a2 c #daddf1",
115"ac c #daddf2",
116"#u c #daddf3",
117"ap c #dadeeb",
118"aE c #dadeec",
119"aP c #dadfec",
120"ag c #dbddef",
121".o c #dbddf0",
122"bj c #dbddf1",
123"af c #dbddf3",
124"#V c #dbdef0",
125"#w c #dbdef1",
126"a0 c #dbdef2",
127"#. c #dbdef3",
128".u c #dbdef4",
129"aU c #dbdfee",
130"au c #dcdef1",
131"a9 c #dcdef2",
132"#r c #dcdef3",
133"#m c #dcdef4",
134"#8 c #dcdff1",
135".C c #dcdff2",
136"#L c #dcdff3",
137".V c #dcdff4",
138".M c #dcdff5",
139"#Z c #dddff2",
140".9 c #dddff5",
141"b# c #dddff6",
142"#o c #dde0f2",
143".h c #dde0f3",
144"#P c #dde0f4",
145"#t c #dde0f5",
146"#H c #dde0f6",
147"#T c #dee0f3",
148"ao c #dee1f1",
149"#f c #dee1f4",
150"bc c #dee1f6",
151".z c #dee1f7",
152"ai c #dee2ef",
153"#U c #dfe1f3",
154"#W c #dfe1f5",
155"a3 c #dfe1f7",
156"av c #dfe2f3",
157".P c #dfe2f5",
158"#7 c #dfe2f7",
159".x c #dfe2f8",
160"aC c #dfe3f0",
161"aL c #dfe3f1",
162"bg c #e0e2f5",
163"bh c #e0e2f8",
164"#1 c #e0e3f4",
165"#0 c #e0e3f5",
166".j c #e0e3f6",
167"#M c #e0e3f7",
168"#J c #e0e3f8",
169"bf c #e0e3f9",
170"aK c #e0e5f2",
171"a8 c #e1e3f9",
172"aI c #e1e4f5",
173".m c #e1e4f6",
174".H c #e1e4f7",
175"bb c #e1e4fa",
176"aB c #e2e5f5",
177"aS c #e2e5f6",
178".D c #e2e5f7",
179"#h c #e2e5f8",
180".1 c #e2e5f9",
181"#C c #e2e5fa",
182"a4 c #e2e5fb",
183"Qt c #e3e5f9",
184".p c #e3e6f9",
185"aY c #e3e6fa",
186"bi c #e3e6fc",
187"aX c #e4e6f9",
188"#K c #e4e6fa",
189"ab c #e4e7f9",
190"#i c #e4e7fa",
191".U c #e4e7fb",
192"aO c #e4e8f5",
193"aR c #e5e7fb",
194"#z c #e5e8fa",
195"aN c #e5e8fb",
196"#A c #e5e8fc",
197".Z c #e5e8fe",
198"aD c #e5e9f6",
199"ak c #e5e9f7",
200".I c #e6e9fa",
201"#G c #e6e9fc",
202".G c #e6e9fd",
203"aJ c #e6eaf8",
204".k c #e7eafc",
205".T c #e7eafd",
206"am c #e7eafe",
207"ar c #e7ebf8",
208"aq c #e7ebf9",
209"ax c #e7ecf9",
210".n c #eaedfe",
211"#2 c #edf2fc",
212"a. c #f0f4fd",
213"Qt.#.a.b.c.b.d.b.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.r.t.u.v.w.x.y.t.z",
214".j.c.e.b.c.i.i.b.l.A.B.C.b.j.D.E.F.G.H.I.q.J.J.K.L.y.M.M.M.N.O.z",
215".P.i.Q.B.i.R.c.B.l.S.g.C.b.g.H.C.h.T.U.V.W.t.W.r.X.Y.z.Z.z.L.0.u",
216".1.c.2.3.4.5.b.a.l.a.a.o.g.#.d.l.b.p.H.O.X.6.7.8.t.K.9#.##.O.6.O",
217".p.b#a#b#c#d.#.c.d#e.A.c#f.C#g.H#h#i.h#j.t.v#k.y.s#l#m#n.O.K.q.8",
218"#o.l#p.3.d.a.a#q.c.b.R.R.C.d.Q.h#i.C#h#r#s.v.w.0.K#t.x#u.0.0.Y.t",
219".p.h.S.3#v#w.a.i#x.g#y#d.S#w#z.p.j#g.I#A.K.r#B.W#u#C#D#D#E.v.t#F",
220".j.h.3#c#e#y.b.B#a.E.a.a#wQt.j.c#w#g.j#G.K.s.t.J.M#H#I.r.W#l#B.u",
221"#f#f#e#b.c.E.4.E.l.a#e#xQt#f#q#b.b.c.##A#J.w.9.z#K.w#u.w#u.0#u#H",
222"#L#M#N#O#P#Q#N#R.5.5.Q#w.h.e.c.i.B#S#w#T#U.a#V#W.h.s#l#D.M#m.z.0",
223"#n#u.O#X#k#Y#B#s.L#t#h#h.l.##Z.F.#.C#0#1#2#3#4.D.e#5.O#6.u.6#E.s",
224"#u#k.K#D#l#X#s#B###7.p.H#S.h.P#w.#.F#8#9a.a#aaab.dac.x#H#u.Nadae",
225".v.y#s#B.r#D.N.qaf#L.##g.e.c#w.g.b.bagahaiajak.m.H#7.u.0.q.y#B.L",
226"#F#m.Nal.J.r#B.Vaman#y.b.b.d.S.i.i#g#8aoapaqar#V.h#..w.Y.r.q.q.t",
227"#F.M#s.sad.tas.V.vat.d.gau.B.i.l.e.b.havawaxayaz.3.6.7ad#Yae#X.L",
228".L.u.N#YaA.v#u.y.Oat.5.3.3.3.Q.i.F#T.HaBaCaDaEaF#eaG.8ad.s.s#B#k",
229".W#u#l#YaH#C#s#s.yan#x.l.d#v.#.h.H#h.jaIaJaKaLaM#v.W.W#B.W.J.O.y",
230".W#j.w.Y#s#H#X.O.w.6.l.Q.d.b.jaN#i.jagaIaOaPaLaM.S.r.t.L#B.Y.0as",
231".Y.O.u.u.7.J.L#B#BaQ#S#f.p.p#GaR.j.h#faSayaTaUaV.4aQ.K##.O.O.was",
232"aW.A.C.c.i.Q.i.Q.c#b.laX#f.b#V.Pau.e.DaY.aaZ.g#L#Q.v.uas#k.ca0a1",
233"#T#V.h#a.d.C#p#a.g.B.P.j.#.c.h.h.b#g.pa2#B.qa3a4##.N#k#k#s.b.#.i",
234".P.#.F.E.R#pa5.c#i.P.j#w.g.#.h.R.E#8#o.6.0#kas.u.w#j#k#ka6.b.l#y",
235".j#V.ga7.4#wau#v.g.l#w.h.#.a#S.f.3#f.iat.7.O.ya8#Haf#n#nac#g.B.3",
236".ga9#h#v.b.H.j.E.d.#.P#fb.a5#q.S.haN.c#s.w.r#Bb#.u.w.O#l.6.g#w.R",
237".#.P.H#Z.b.Q.F#p.d.H#T.h#aba.d#w.P#f#S.J.t.O.K.ubbas.0.ubc.o.c.l",
238"Qt.H.H#f.o#g.c.c.g#Z.S.e.dbd#a.#.h#v.c#X.0.q#X.6#H#k.v#u#s#S.g#V",
239"Qt.C.o.g.b.C.e.F.C.B#cbd.l#a#a.c.#.Q.l#5.6.6.K#6.u.y.M.ybe.5.a#g",
240".C.i#w#w.dau.e.c.b.Q#c#daZ.5.c.e.e#g.i#X#j.w.0af#Hbf#m.q#X#a#e.i"};
diff --git a/noncore/games/kcheckers/pics/marble2.xpm b/noncore/games/kcheckers/pics/marble2.xpm
new file mode 100644
index 0000000..f31ee0b
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/marble2.xpm
@@ -0,0 +1,595 @@
1/* XPM */
2static const char *marble2[]={
3"32 32 560 2",
4"dC c #6079b1",
5"et c #6079b4",
6"fU c #607ab1",
7"fT c #607ab2",
8"f5 c #607bb1",
9"eu c #6179b4",
10"f2 c #617ab0",
11"dR c #617ab1",
12"df c #617ab2",
13"cY c #617ab3",
14"dT c #617ab4",
15"ef c #617bb3",
16"cS c #617bb4",
17"f6 c #617caf",
18"cU c #617cb0",
19"de c #627ab4",
20"eb c #627ab5",
21"gj c #627ab8",
22"fo c #627bb1",
23"dg c #627bb2",
24"dl c #627bb3",
25"dW c #627bb4",
26"dQ c #627caf",
27"cT c #627cb3",
28"f4 c #627cb5",
29"dD c #637ab5",
30"fB c #637bb4",
31"gi c #637bb5",
32"en c #637cb1",
33"ea c #637cb3",
34"dX c #637cb4",
35"cX c #637cb5",
36"dS c #637cb6",
37"dc c #637cb7",
38"dE c #647bb4",
39"cC c #647cb6",
40"fR c #647db3",
41"dB c #647db4",
42"eS c #647db5",
43"fC c #647db6",
44"dU c #647db7",
45"d9 c #647eb0",
46"fc c #647eb4",
47"ee c #647eb6",
48"ec c #6480b3",
49"dd c #657db9",
50"f1 c #657eb4",
51"eR c #657eb5",
52"d8 c #657eb6",
53"fQ c #657eb7",
54"fS c #657eb8",
55"eT c #657fb2",
56"cz c #657fb5",
57"cR c #657fb9",
58"#Y c #667fb6",
59"cD c #667fb7",
60"ey c #6680b4",
61"d7 c #6681b7",
62"fA c #677fb9",
63"e9 c #6780b4",
64"eI c #6780b6",
65"aI c #6780b7",
66"dM c #6780b8",
67"dV c #6781b9",
68"ed c #6782b7",
69"bK c #687eb7",
70"ba c #6881b6",
71".C c #6881b7",
72"cB c #6881b8",
73"em c #6881b9",
74"fP c #6881bc",
75"a4 c #6882b5",
76"aQ c #6884b6",
77"aP c #6884b8",
78"gO c #6981b7",
79"bt c #6981b9",
80"fh c #6981bb",
81"dN c #6982b6",
82"cq c #6982b7",
83".D c #6982b8",
84"ch c #6982b9",
85"fd c #6982ba",
86"cF c #6982bb",
87"dP c #6983b3",
88"dA c #6983b4",
89"cr c #6983b5",
90"at c #6983b6",
91"af c #6983b7",
92"cy c #6983b8",
93"fu c #6983b9",
94"d1 c #6983bc",
95"aO c #6984b9",
96"bJ c #6a7fb9",
97"cL c #6a82b8",
98"gP c #6a82b9",
99"cZ c #6a82bc",
100"bb c #6a83b5",
101"b# c #6a83b8",
102".W c #6a83b9",
103"cE c #6a83ba",
104"ag c #6a83bb",
105"aw c #6a83bc",
106"db c #6a83bd",
107".K c #6a84b6",
108"bF c #6a84b8",
109"dL c #6a84b9",
110"dI c #6a84ba",
111"eY c #6a84bb",
112"gA c #6a85b4",
113"dH c #6a85b5",
114"da c #6a85b6",
115"f# c #6a86bb",
116"dh c #6b81b7",
117"bs c #6b81bb",
118"gh c #6b84b7",
119"#B c #6b84b8",
120"#Z c #6b84b9",
121".# c #6b84ba",
122"aj c #6b84bb",
123"aF c #6b84bc",
124"bo c #6b85b7",
125"ax c #6b85b8",
126"ao c #6b85b9",
127"#j c #6b85ba",
128"d2 c #6b87b8",
129"bu c #6c83b6",
130"dy c #6c83ba",
131"eU c #6c85b8",
132"a0 c #6c85ba",
133".c c #6c85bb",
134"f8 c #6c85bc",
135"#V c #6c85bd",
136"cP c #6c85be",
137"ai c #6c86b7",
138"cp c #6c86b8",
139".5 c #6c86b9",
140"ac c #6c86ba",
141"ev c #6c86bc",
142"d0 c #6c86c0",
143"bP c #6c87bd",
144"br c #6d84b9",
145"gG c #6d85b8",
146"fi c #6d85c0",
147"bR c #6d86ba",
148"ap c #6d86bb",
149"#i c #6d86bc",
150"co c #6d86bd",
151"aE c #6d86be",
152"cb c #6d87b7",
153"gs c #6d87b8",
154".E c #6d87ba",
155"ew c #6d87bb",
156"d6 c #6d88bf",
157"gF c #6e86ba",
158"gL c #6e87bb",
159"bj c #6e87bc",
160".a c #6e87bd",
161"e4 c #6e87be",
162"aK c #6e87bf",
163"#F c #6e87c1",
164".t c #6e88ba",
165"dK c #6e88bb",
166"dm c #6e88bc",
167"e5 c #6e88be",
168"do c #6e89b8",
169"aN c #6e89be",
170"dp c #6f86b8",
171"#E c #6f87c0",
172"a6 c #6f88bd",
173".b c #6f88be",
174"cx c #6f88bf",
175"eo c #6f89b9",
176".g c #6f89ba",
177"a1 c #6f89bb",
178"#G c #6f89bc",
179"cg c #6f89bd",
180"eN c #6f8ab9",
181"bO c #6f8bc2",
182"cn c #7087bd",
183"gH c #7088b9",
184"ci c #7089bd",
185"#X c #7089be",
186"#k c #7089bf",
187"eL c #708aba",
188"au c #708abb",
189".H c #708abc",
190".e c #708abd",
191"as c #708abe",
192"b5 c #708abf",
193"fb c #708bba",
194"b4 c #708bbb",
195"b. c #718abd",
196"bC c #718abe",
197"#l c #718abf",
198".y c #718ac0",
199"aH c #718ac2",
200"f7 c #718ac3",
201"a7 c #718bbb",
202"#C c #718bbc",
203".f c #718bbd",
204".h c #718bbe",
205"#f c #718cbc",
206"fE c #7289ba",
207"fK c #728bc0",
208".X c #728bc1",
209"aG c #728bc3",
210"cu c #728cbd",
211"c. c #728cbe",
212"#0 c #728cbf",
213"dY c #728cc0",
214"an c #728cc1",
215"dO c #728db9",
216"ct c #728dbc",
217"aL c #728dbd",
218"gI c #728eb9",
219"#e c #728ec0",
220"f. c #7290c4",
221"gk c #7389bd",
222"bI c #7389be",
223"gz c #7389bf",
224"gQ c #738abb",
225"fF c #738bbe",
226"cO c #738bc2",
227"dz c #738cbf",
228"ab c #738cc0",
229"cw c #738cc2",
230"eg c #738cc3",
231".T c #738dbd",
232".G c #738dbe",
233"el c #738dbf",
234"bn c #738dc0",
235"aC c #738dc1",
236"bD c #738ebc",
237".L c #738ebd",
238"aM c #738ec3",
239"gJ c #738fbb",
240"fl c #738fbd",
241".S c #738fc1",
242"gy c #748bbe",
243"fM c #748cbf",
244"bU c #748dc1",
245".z c #748dc3",
246"a9 c #748ebf",
247"cv c #748ec0",
248".6 c #748ec1",
249"aD c #748ec3",
250".M c #748fbd",
251".8 c #748fbe",
252"fp c #748fbf",
253"d5 c #7490c3",
254"d# c #758bc3",
255"eZ c #758dbe",
256"#p c #758ec4",
257"aZ c #758fbf",
258".k c #758fc0",
259".F c #758fc1",
260".4 c #758fc2",
261"bV c #758fc4",
262"#5 c #7590c0",
263"aS c #768dbe",
264"fL c #768ec5",
265"Qt c #768fc5",
266"ez c #7690c0",
267"fj c #7690c1",
268"cf c #7690c2",
269"aY c #7690c3",
270"fV c #7690c5",
271"#D c #7691be",
272"#q c #7691c0",
273"bE c #7691c1",
274"cm c #778ec2",
275"bQ c #7790c1",
276"gM c #7790c4",
277".d c #7790c6",
278"fJ c #7791c0",
279"#6 c #7791c1",
280"#1 c #7791c2",
281".s c #7791c3",
282".i c #7791c4",
283"bZ c #7791c5",
284"a# c #7792be",
285"#S c #7792bf",
286"bk c #7792c2",
287"fk c #7793c2",
288"aU c #7793c3",
289"di c #788ec0",
290"f0 c #7891c7",
291"cA c #7892c3",
292".J c #7892c4",
293"#W c #7892c5",
294"#U c #7892c6",
295"#H c #7893bf",
296"ak c #7893c0",
297"cc c #7893c1",
298"#o c #7893c2",
299"ex c #7893c3",
300"dZ c #7894c4",
301"bL c #798fc2",
302"dG c #7991c4",
303"#8 c #7992c6",
304".A c #7992c8",
305"gB c #7993c0",
306"#y c #7993c3",
307"ae c #7993c4",
308"#O c #7993c5",
309"eh c #7993c6",
310"#N c #7994c2",
311"#m c #7994c3",
312"#T c #7994c4",
313"gt c #7994c5",
314"eW c #7995c3",
315"aT c #7995c7",
316"b9 c #7a90c7",
317".U c #7a92c1",
318"dq c #7a93c1",
319"eE c #7a93c6",
320"cN c #7a93c7",
321"a5 c #7a93c9",
322"f3 c #7a93cb",
323"fm c #7a94c0",
324"dJ c #7a94c3",
325"bl c #7a94c4",
326"dt c #7a94c5",
327".r c #7a94c6",
328"#7 c #7a94c7",
329"bW c #7a94c9",
330"#t c #7a95c0",
331"eA c #7a95c3",
332"#n c #7a95c4",
333"d3 c #7a95c5",
334"cG c #7a95c7",
335"bq c #7b92c2",
336"fa c #7b93ca",
337"bp c #7b94bf",
338".B c #7b94ca",
339".j c #7b95c6",
340".I c #7b95c7",
341".7 c #7b95c8",
342"fG c #7b95ca",
343"ei c #7b96c4",
344"fz c #7b96c5",
345".1 c #7b96c6",
346"eX c #7b96c7",
347".u c #7b97c9",
348"dF c #7c93c9",
349"dx c #7c95c0",
350"cQ c #7c96c6",
351".l c #7c96c7",
352"#R c #7c96c8",
353"eH c #7c96c9",
354"bX c #7c97c4",
355"#r c #7c97c6",
356".2 c #7c97c7",
357"dj c #7d94c0",
358"#A c #7d94c1",
359".R c #7d94c5",
360"ds c #7d95c7",
361".v c #7d97c7",
362"c6 c #7d97c8",
363".Y c #7d97c9",
364"c1 c #7d98c4",
365"b3 c #7d98c5",
366"#J c #7d98c6",
367".0 c #7d98c8",
368"d4 c #7d99c7",
369"e8 c #7e95c4",
370"eD c #7e96c6",
371"fs c #7e97c4",
372"cM c #7e97cb",
373"fv c #7e98c6",
374"aB c #7e98c8",
375".Z c #7e98c9",
376"#Q c #7e98ca",
377"aA c #7e98cb",
378"a. c #7e99c5",
379"az c #7e99c6",
380".9 c #7e99c7",
381"by c #7f96c1",
382"gR c #7f96c5",
383"c5 c #7f96c8",
384"bx c #7f97c4",
385"#g c #7f97c6",
386".Q c #7f97c8",
387"aa c #7f99c9",
388"dn c #7f99ca",
389"aJ c #7f99cb",
390"a3 c #7f99cc",
391"eO c #7f9ac5",
392"fI c #7f9ac6",
393"c# c #7f9ac8",
394"b0 c #7f9ac9",
395"gl c #8097c6",
396"gE c #8098cc",
397"a2 c #809acb",
398".p c #809bc7",
399"ad c #809bc9",
400"gu c #809bca",
401"e1 c #809bcb",
402"fr c #8199c3",
403"gx c #8199ca",
404"bm c #819bcb",
405"gK c #819bcc",
406"cI c #819cc4",
407".O c #819cc7",
408"aq c #819cc8",
409".3 c #819ccb",
410"e0 c #819ccc",
411"eB c #8298c0",
412"eM c #8298c6",
413"b8 c #8298cb",
414"fD c #8299c8",
415"cl c #8299ca",
416"c0 c #829ccc",
417"eG c #829cce",
418"aX c #829dc9",
419"a8 c #829dcb",
420"gg c #829dcd",
421"f9 c #8399c6",
422"c8 c #839ac9",
423"c2 c #839acc",
424"cK c #839cd2",
425"ft c #839dcc",
426"#K c #839dcd",
427"du c #839dce",
428".o c #839ecc",
429"#M c #839ecd",
430"ca c #839ece",
431"es c #849aca",
432".w c #849ccb",
433"bY c #849ece",
434"#P c #849ecf",
435"av c #849fcb",
436"#I c #849fcd",
437"eK c #849fce",
438"cV c #84a0c9",
439"ay c #84a0ca",
440"fO c #859cc3",
441".m c #859fd0",
442".N c #85a0cc",
443"b2 c #85a0cd",
444"eV c #85a0ce",
445"eQ c #85a1c9",
446"ej c #85a1cc",
447"#w c #869dc7",
448"gr c #869dc9",
449"fn c #869fca",
450"dr c #869fcd",
451"#s c #86a1cd",
452"cj c #86a1ce",
453".n c #86a1d0",
454"bc c #879ece",
455"e7 c #879fca",
456"ck c #879fcd",
457"gw c #879fce",
458"gN c #87a0d3",
459"gf c #87a1d1",
460"c7 c #87a1d2",
461"b1 c #87a2cc",
462"#9 c #87a2ce",
463"cs c #87a2d0",
464"eP c #87a2d1",
465"ge c #889eca",
466".q c #88a3ce",
467"#. c #88a3cf",
468"eJ c #88a3d0",
469"bS c #88a3d3",
470"e2 c #88a4c8",
471"al c #88a4cb",
472"#u c #89a0ca",
473"dv c #89a2d0",
474"cH c #89a4cc",
475"ar c #89a4d0",
476"#L c #89a4d2",
477"#b c #8aa1ce",
478"aR c #8aa3d4",
479"aV c #8aa4d1",
480"ce c #8aa4d5",
481"bT c #8aa5d2",
482"#4 c #8aa6c8",
483"ek c #8aa6d0",
484"fY c #8ba0cc",
485"#a c #8ba1cf",
486".P c #8ba2d3",
487".x c #8ba3cf",
488"aW c #8ba4cf",
489"b6 c #8ba6d1",
490"bB c #8ba6d2",
491"cd c #8ba6d3",
492"am c #8ba7cb",
493"gd c #8ca1cd",
494"#h c #8ca3cf",
495"gD c #8ca7ce",
496"#2 c #8ca7d3",
497"gv c #8ca7d6",
498"gc c #8da4cd",
499"cJ c #8da9d2",
500"fZ c #8ea3d2",
501"e# c #8ea8d3",
502"## c #8ea9d4",
503"bi c #8ea9d5",
504"gb c #8fa5cd",
505"fN c #8fa6d3",
506"cW c #8fa9d6",
507"bN c #90a6c9",
508"#v c #90a7d1",
509"#d c #90a7d4",
510"be c #90a8d2",
511"#z c #90a8d7",
512"dw c #90a9d1",
513"e3 c #90abd9",
514"e. c #91add5",
515"b7 c #92aad2",
516"fH c #92acd7",
517"ah c #92addc",
518"fX c #93a9d1",
519"bH c #93aad8",
520"gS c #93abd4",
521"fg c #93abd5",
522"bf c #94abd2",
523".V c #94acd8",
524"gm c #94add4",
525"c9 c #94aecf",
526"gC c #94aed9",
527"ep c #94afdd",
528"c3 c #95add6",
529"bd c #96adda",
530"fe c #96aed2",
531"e6 c #97aed7",
532"#c c #97aedb",
533"gq c #97afd9",
534"d. c #97b0d5",
535"fy c #97b2de",
536"fw c #98b1d9",
537"eF c #98b4d9",
538"ga c #99b1d1",
539"c4 c #99b1da",
540"bA c #9aafd3",
541"bz c #9ab0d7",
542"#3 c #9ab6dc",
543"g. c #9bb1db",
544"#x c #9bb2dc",
545"fq c #9cb3db",
546"gT c #9cb4d8",
547"gn c #9cb5d8",
548"dk c #9cb5dd",
549"bh c #9db2d4",
550"bw c #9db3da",
551"bv c #9db3de",
552"gp c #9db5dd",
553"bg c #9eb3d7",
554"go c #9eb6dd",
555"eq c #a0b6da",
556"fx c #a0b8dc",
557"ff c #a0b8de",
558"er c #a1b6df",
559"fW c #a1b8db",
560"bG c #a1bae2",
561"eC c #a2b9e4",
562"bM c #a3b9e3",
563"g# c #a4bcdf",
564"Qt.#.a.b.a.#.cQt.d.e.f.g.e.h.h.i.j.k.l.m.n.o.p.q.r.s.t.r.u.v.w.x",
565".y.z.A.B.y.#.C.#.D.E.F.G.H.s.f.I.J.K.K.t.L.M.N.O.P.Q.Q.R.S.T.U.V",
566".W.b.X.X.a.W.W.#.c.h.Y.Z.0.1.2.3.4.5.6.7.8.9#.###a#b#c#d#e#f#g#h",
567"#i.c#i#i#j.##k#l#k.E.F.l#m#n#m#o.z.c#pQt#q#r#s#t#u#v#w#x#e#y#z#A",
568".b#B#C.G#D#E#F.E#G.4.4.e#H#I#J#K#L#M.o#N.F#O.Y.t#P#Q.l#R#S#T#U#V",
569".r#W#G.f.v#X#Y#Z.e.6#0.h#1#2#3#4#5.T.T#6.h.e#7#8#9a.a##9aa.Kabac",
570"adaeafag.rahaiaj.E.6#W#0.Jakalamanaoap#Z.C.D.D#ka#aqararasatau#6",
571"av#6.cawaxayazaj.haA.r#WaB#OaCaDaEaFajaGaH#V#VaI.HaJ.s.faKapaL.o",
572"aMaNaOaPaQ.taRaSaTaUaVaWaXaYasaZ.#a0a1a2a3.h.5a4a5#p.b.caKa6a7a8",
573"a9b.b#ajbabbbcbdbebfbgbhbiabbjbkacaxblbmaY#G#0bn.b.##i.Wafaxbo#P",
574"bpbqbrbsbtbubvbwbxbybzbAbBbCas#T.s.1#mbD.h.6a3.e.D.y.b.abE.HbFa6",
575"bGbHbIbJbKbLbMbNbObPb.bQ#SbRas.k#CbS#LbT.r.s.ibU.ybVbW.dbXbYbZaH",
576"b0bX.Nb1b2b3#nai#i#i#i.X.d.c#i#ib4b5#0b6b7#hb8b9c.a9#rc#ca.ZaB#6",
577"aucbcccdcecfcg.b.a.a.a.a.y.X.b.Daichcicjckclcmcn.yaEco.Wcp.Ka1.Y",
578".Ccqcrb4csctcucv.a#i#i.W.acw.c.Wa4aKcx#ncwcy.WczcAcgcBcCcDcDcEcB",
579"cFag#XcGcHcIcJ#.cKQt.cb#cLcMcNcOaccPagcQcRcScTcUcVcW.Y.yawcXcXcY",
580"cZ.#c0c1c2c3c4c5c6c7.gauc8c9d.d#dadbdc.bdddedfdgdhdidjdkaEdldldf",
581"codmdndodpdqdrdsdtc7.jdudvdwdxdydzagcDdAdBdldCcYdDdEdFdGdldfdldl",
582".taYaYaxdHdIb5a9.l#1.Ga9bXdJdKcEdLdMdNdOdPdQdRdSdTdUdVdWdXdldCdC",
583"cQcAdY.zdZd0d1d2a7#1d3aad4d5d6d7dCd8d9e.e#a7eaebecedeeefeadRcEeg",
584"aAeh.4.icAc..5.yeib2ejek.jelao.WemeneoepeqeresbrcoeteubFdHaueh.a",
585"bn.E.6a3#1.Jeh#kevew.h.Y#Texc.apageyezeAeBeCeDeEcv#Za7eFeGb.ba#Y",
586"#GdKeHaYcu#OaxeIch.aci.reJeKaB.f#VeyeLbDeMckeNbEeOePeLeQeh.ceReS",
587"cveEeH.H#1.feT.DeU.g#oa8eVeWeX.JeYbF#1#oeZbQe0e1e2e3e4e5#ichemcD",
588"e6e7e8.0.Je9.Daj.a.4.Jdtf.f#evfa#G.4dK.h#0.6dmew.abmfbfcdXfdcDdM",
589"fefffga#cheSfhfi#i#0.sfjfkflfmfn#o#1aCev#Yfofofo#YaLfpdfdlememem",
590"fqfrfsftaCa0fuaw#i.h.rdn.Yfvfwfxfyfz.DfAdXdfdXdXfB.K#WfCdleSdMag",
591"fDfEfFfGfHfIfJ.kfK.f.fcffLfMfNfOeOezchfPfQfCcXdWeufRbVfScXfTfUea",
592"fVewc..lfWfXfYfZb2eAfp.faua9.j#1.zf0.aeI.W.#f1f2dCdBf3d8f4fTf5f6",
593"f7agf8a0f9g.g#gagbgcgdge.ldt.ldt.b.c#i.dgfbYfz#fdHdPgg#ygheRgigj",
594".#bFax.Kgkglgmgngogpgqgrfjcudn.j.y.#.C.WcAcpgsgtgu#m#mgvgwgxgygz",
595"gAgBgCgDgEgFgGgHgIgJadfz.kc6gK#1gLcy.DcEcEfdajgMgNb.gOgPgQgRgSgT"};
diff --git a/noncore/games/kcheckers/pics/marble3.xpm b/noncore/games/kcheckers/pics/marble3.xpm
new file mode 100644
index 0000000..36c9b17
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/marble3.xpm
@@ -0,0 +1,33 @@
1/* XPM */
2static const char *marble3[]={
3"28 28 2 1",
4"# c None",
5". c #0000ff",
6"............................",
7"............................",
8"..########################..",
9"..########################..",
10"..########################..",
11"..########################..",
12"..########################..",
13"..########################..",
14"..########################..",
15"..########################..",
16"..########################..",
17"..########################..",
18"..########################..",
19"..########################..",
20"..########################..",
21"..########################..",
22"..########################..",
23"..########################..",
24"..########################..",
25"..########################..",
26"..########################..",
27"..########################..",
28"..########################..",
29"..########################..",
30"..########################..",
31"..########################..",
32"............................",
33"............................"};
diff --git a/noncore/games/kcheckers/pics/wood1.xpm b/noncore/games/kcheckers/pics/wood1.xpm
new file mode 100644
index 0000000..866f8d9
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/wood1.xpm
@@ -0,0 +1,117 @@
1/* XPM */
2static const char *wood1[]={
3"32 32 82 2",
4"#c c #9c825c",
5".H c #9c8664",
6"#p c #a48a64",
7"#f c #a48a6c",
8".I c #a48e64",
9".G c #a48e6c",
10".X c #a4926c",
11"#g c #ac8a6c",
12".u c #ac8e6c",
13"#o c #ac8e74",
14".b c #ac926c",
15".c c #ac9274",
16".d c #ac966c",
17"Qt c #ac9674",
18".j c #ac9a74",
19"#b c #ac9a7c",
20".w c #ac9e74",
21".V c #b49274",
22".A c #b49674",
23".W c #b4967c",
24".S c #b49a6c",
25".s c #b49a74",
26".t c #b49a7c",
27".U c #b49e74",
28".i c #b49e7c",
29".2 c #b49e84",
30".f c #b4a27c",
31".q c #b4a284",
32".k c #b4a67c",
33"#n c #b4a684",
34".P c #bc9a74",
35"#d c #bc9a7c",
36".R c #bc9e74",
37".# c #bc9e7c",
38".1 c #bc9e84",
39".g c #bca27c",
40".v c #bca284",
41".F c #bca67c",
42".a c #bca684",
43"#. c #bcaa7c",
44".h c #bcaa84",
45".p c #bcaa8c",
46"#a c #bcae84",
47".n c #bcae8c",
48".8 c #bcb28c",
49"#j c #c49e84",
50".K c #c4a27c",
51".O c #c4a284",
52".N c #c4a67c",
53".D c #c4a684",
54"#e c #c4a68c",
55"#i c #c4aa7c",
56".e c #c4aa84",
57".z c #c4aa8c",
58".T c #c4ae84",
59".r c #c4ae8c",
60".l c #c4b28c",
61".o c #c4b294",
62".C c #c4b68c",
63".7 c #c4b694",
64"#l c #c4ba94",
65".L c #ccaa8c",
66".Q c #ccae84",
67".E c #ccae8c",
68".Z c #ccae94",
69".6 c #ccb284",
70".B c #ccb28c",
71".J c #ccb294",
72".M c #ccb68c",
73".x c #ccb694",
74".0 c #ccb69c",
75".m c #ccba94",
76"#m c #ccba9c",
77".5 c #ccbe94",
78".9 c #ccc29c",
79".Y c #d4b694",
80".y c #d4ba94",
81"#h c #d4ba9c",
82"#k c #d4be94",
83".4 c #d4be9c",
84".3 c #d4c29c",
85"## c #dcc69c",
86"Qt.#.a.#Qt.b.c.d.a.e.a.f.g.h.i.b.j.f.h.h.a.k.l.m.a.a.n.o.p.i.q.r",
87".#.i.s.t.g.g.t.uQt.sQt.d.t.e.e.v.h.f.w.a.x.y.r.f.f.i.a.r.z.g.a.o",
88".g.v.g.A.A.g.z.B.r.B.r.e.e.l.B.r.l.B.o.C.l.l.n.e.a.v.a.e.a.i.s.g",
89".i.g.D.i.s.v.B.y.a.E.B.r.a.v.#.s.s.a.B.F.G.H.I.i.v.g.g.g.a.g.i.f",
90".#.i.s.g.z.B.z.#.G.A.i.#.#.g.g.i.l.B.l.r.e.F.v.F.f.i.i.e.r.B.J.x",
91".D.D.i.A.s.#.g.i.K.v.D.v.K.a.L.J.e.e.e.r.M.J.e.g.E.e.e.e.e.e.a.N",
92".r.r.D.A.GQt.a.E.E.D.D.#.#.#.g.O.e.l.x.x.B.l.B.x.B.B.E.e.g.#.s.s",
93".e.D.v.g.e.E.e.g.t.P.t.#.#.K.v.D.D.v.sQt.A.t.i.g.g.N.e.N.D.e.Q.B",
94".b.b.A.v.r.B.z.g.g.R.s.S.b.b.b.b.d.b.c.s.a.T.E.z.UQt.u.G.G.V.s.P",
95".D.a.g.a.e.z.e.g.r.e.D.a.F.a.e.e.e.e.a.e.r.E.l.e.a.e.r.B.B.Q.O.#",
96".v.#.s.s.#.g.a.D.G.G.u.b.W.g.r.E.o.l.r.e.e.a.F.v.XQt.s.#.z.E.E.E",
97".D.g.v.#.a.D.r.E.Y.J.J.Z.J.J.0.Y.Y.x.Y.B.r.e.e.e.m.B.h.g.i.i.#.#",
98".J.M.J.r.e.a.g.g.t.1.i.1.g.1.#.2.a.e.r.T.e.a.z.r.T.z.r.B.B.B.E.e",
99".B.J.B.B.D.#.W.s.c.A.t.i.g.v.v.g.s.U.f.v.g.a.e.r.3.4.5.x.l.v.j.b",
100".e.z.B.r.D.a.e.r.B.M.B.B.r.D.g.#.r.r.E.B.J.x.x.y.m.m.l.l.B.x.Y.x",
101"Qt.A.s.s.s.U.a.E.a.N.e.e.Q.T.6.B.x.y.x.m.y.y.y.y.m.x.l.M.x.M.x.x",
102".f.h.7.7.l.8.M.9.M#..g.F.F.g.g.K.t.g.z.r.a.iQt.c.F.F.a.s.b.b.s.g",
103".l.l.M.m.m.4.4.4##.y.B.a.#.P.D.B.r.r.e.a.a.v.e.r.t.g.e.e.e.h.e#a",
104".i.g.v.F.v.F.g.fQtQtQtQt.c.c.V.t.a.g#b.u.H#c.H.H.a.g#bQtQt.s.g.a",
105".z.E.B.E.K.i#d.g#e.a.O.z.E.z.#.c.s.#.a.a.e.z.a.iQt.A.i.a.a.i.G.H",
106".#.#.#.s.V.u#f#g.t.t.t.i.1.1.1.i.c.j.v.a.r.B.e.v.r.g.A.i.a.z.E.J",
107".E.a#d.g.z.r.K.s#f#d.L.z.g.i.a.r.B.r.e.i.g.z.p.g.c.c.t.E#h.J.z.a",
108".D.a.g.D.r.E.z.a.A.e.B.D.s.b.X.b.f.i.c.GQt.a.r.a.vQt.c.t.i.i.#.v",
109".b.i.e.a.U.A.f#i#j.R.d.b.s.e.T.T.a#e.g.t.#.e.gQt#e.i.2.z.z.v.t.i",
110".r.gQt.i.z.B.r.a.g.i.s.j.i.g.o.4.r.r.r.r.a.q.v.a.e.a.F.h.n.h.n.C",
111".J.r.a.g.v.i.s.c.f.tQt.u#f.G.t.e.e.i.b#f.H.H.GQt.a.T.l.x#k.5.m#l",
112".GQt.i.v.f.v.e.r.D.a.g.i.s.t.e#m.z.t.G.G.j.v.e.l.i.g.i.i#n.l.l.h",
113".i.D.z.r.D.a.z.B#h.x.l.z.a.f.a.r.x.r.f.v.e.z.h#e.T.r.T.F.r.m.x.h",
114".GQt.s.f.v.e.r.x.r.z.e.r.B.Z.r.B.r.a.e.r.r.z.a.a.g.p.T.h.r.Y.eQt",
115".r.D.a.v.v.iQt.u.G.H.H.c.g.a.a.v.g.f.a.z.l.B.x#h.m.x.r.D.T.B.J.e",
116".a.e.z.x.y.4.x.r.B.z.a.z.r.r.e.a.r.z.a.a.a.v.a.T.l.e.iQtQt.s.#.#",
117".a.a.r.x.y.x.D.i#o#p.GQt.i.v.D.r.r.z.h.z.r.r.r.J.r.r.B.x.B.#.A.b"};
diff --git a/noncore/games/kcheckers/pics/wood2.xpm b/noncore/games/kcheckers/pics/wood2.xpm
new file mode 100644
index 0000000..c2ff364
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/wood2.xpm
@@ -0,0 +1,114 @@
1/* XPM */
2static const char *wood2[]={
3"32 32 79 2",
4"#k c #484c4d",
5"#l c #484d47",
6"#m c #494a46",
7"#d c #4c4841",
8"#j c #4c4c48",
9".1 c #4e554d",
10".9 c #4f483f",
11"#e c #4f4c44",
12".0 c #4f4f48",
13".Z c #4f524d",
14".2 c #4f564e",
15".X c #515450",
16".W c #51564e",
17".V c #52574f",
18"#. c #544e45",
19".U c #545047",
20".Y c #54524a",
21".8 c #575046",
22".T c #575248",
23".7 c #57554c",
24".t c #57564d",
25".B c #575751",
26".u c #58574f",
27".a c #585950",
28".A c #585d52",
29".v c #5c584f",
30".G c #5d564a",
31".# c #5d5a54",
32".Q c #5e5649",
33".z c #5e5a4f",
34".y c #5e5d51",
35"Qt c #5e5e55",
36".C c #5e5e57",
37".E c #5f5a4f",
38".x c #5f5e51",
39".w c #5f5f54",
40".b c #5f6056",
41".3 c #615749",
42".H c #615d4e",
43".F c #615d54",
44".n c #615f52",
45".c c #615f56",
46".S c #625a4d",
47".o c #645f57",
48".s c #646056",
49".D c #646256",
50".d c #646258",
51".R c #655e4f",
52".m c #655f50",
53".e c #65675d",
54".q c #666657",
55".4 c #675d4e",
56".l c #675f54",
57".p c #676156",
58".k c #676456",
59".r c #67645a",
60".P c #696054",
61".j c #696456",
62".5 c #69665c",
63"#i c #696759",
64".I c #6a6657",
65".f c #6a675e",
66"#h c #6c6a5d",
67".L c #6d6152",
68".O c #6f6758",
69".i c #6f6759",
70".h c #6f695d",
71".g c #6f6c5e",
72"#f c #6f6f62",
73".N c #706250",
74".M c #706757",
75".J c #746c5c",
76"## c #766756",
77".K c #776f5f",
78"#a c #796c57",
79".6 c #7d6f5c",
80"#g c #7d7462",
81"#b c #85745e",
82"#c c #8d7d67",
83"QtQtQt.#.a.a.a.#Qt.b.c.c.d.d.d.e.f.f.g.h.i.i.i.j.k.l.m.n.o.o.p.p",
84".b.b.b.b.c.c.c.c.d.d.d.d.d.d.c.d.q.r.s.s.s.s.s.k.s.s.n.d.d.r.r.r",
85".t.u.v.v.#.#.#.#.#.w.x.y.y.z.y.z.z.v.u.a.a.A.y.y.y.yQt.c.c.bQtQt",
86".o.o.cQt.#.c.c.c.o.q.d.d.s.s.y.z.z.v.u.B.a.a.aQtQtQt.CQt.y.A.a.A",
87".o.o.o.o.o.z.z.x.x.s.s.s.s.D.n.x.x.E.a.a.a.u.u.t.t.u.u.u.v.v.z.a",
88".F.F.n.s.s.p.p.s.s.G.z.E.E.E.H.m.l.j.j.I.h.g.g.g.h.h.i.h.J.J.J.K",
89".j.j.p.p.p.h.h.h.h.h.h.h.h.g.h.h.h.i.L.L.M.M.M.L.L.L.L.L.N.L.L.L",
90".i.i.I.I.j.i.i.h.h.i.i.i.h.h.i.O.O.I.P.L.L.P.P.I.M.M.M.M.M.M.M.M",
91".E.E.Q.Q.Q.E.E.H.R.H.H.H.R.R.S.H.H.H.H.H.H.H.S.H.H.H.R.R.H.H.H.H",
92".H.H.R.R.m.R.m.p.j.I.I.I.O.O.I.k.l.m.m.m.l.l.l.R.H.E.E.z.x.x.F.n",
93".O.I.j.P.l.R.R.R.R.m.m.R.R.H.x.F.F.F.j.j.j.j.j.i.i.i.i.f.r.c.z.z",
94".t.t.t.t.t.T.T.U.U.t.t.t.V.W.W.V.V.B.B.B.B.B.B.X.X.X.X.Y.U.U.U.U",
95".c.c.w.y.u.a.u.u.t.Y.Y.Y.Z.0.Z.Z.Z.Z.1.1.1.1.1.2.2.2.2.t.u.v.z.x",
96".Q.Q.3.H.R.S.S.R.m.P.P.P.l.p.l.l.l.p.s.s.s.s.s.q.q.q.q.o.o.o.c.c",
97".4.4.4.4.4.L.L.M.M.J.J.J.J.J.O.M.M.h.O.O.O.O.O.I.I.I.I.5.5.r.o.o",
98".M.M.J.K.K.K.K.6.6.6.6.6.K.J.K.K.K.K.K.K.J.J.h.M.O.j.P.F.F.F.F.F",
99".G.G.7.T.8.9.9.9.9.9.9.9.9.9.9.9.9.9#..8.T.7.7.E.F.F.F.r.r.r.r.r",
100".Q.G.G.8.8.G.8.8.8.Q.Q.3.3.Q.R.l.p.j.5.f.f.f.f.f.5.5.5.o.o.o.o.o",
101".L.L.N#########a.6.6.6.6#a#a.L.4.4.4.3.Q.Q.8.8.H.S.S.3.s.o.o.o.o",
102"#####a.6#a#a#a#a#a#b.6#b#c#b#b.6#a.N.m.m.R.H.x.x.v.7.T#..U.U.U.U",
103"#a.6#b#b#b#b#b#b#b#b#b#b#b#a.N.4.4.S.R.H.E.E.v.z.v.a.B.z.z.v.v.v",
104".4.4.N.N.N###a#a.6.N.N.N.4.3.3.3.3.4.3.Q.Q.T.T.8#.#d.9.9.9#e#e#e",
105".j.L.O.M#a#a#a#a#a#b#b.6.6#b.6.6#a##.M.L.L.L.l.l.p.5.5.f.f#f#f#f",
106".8.8.8.Q.3.4.4.N#a.6#a#a.N.N###a.6#b#b#b#g#g#g.M.P.H.E.E.v.t.T.T",
107".M.M.M############.N.N.N.N.N.N.N.N.N.N.L.4.4.S.Q.Q.Q.Q.F.x.x.x.x",
108".4.4.4.4.4.N.N.N##.N.N.N.N.N.N.L.L.L.4.4.4.4.l.l.p.p.p.r.d.o.n.n",
109".j.j.j.O.M#########a##.M.L.L.O.5.O.j.P.l.R.H.E.F.x.v.v.z.v.t.T.T",
110".f.f.5.p.l.R.4.4.4.3.3.Q.Q.Q.S.S.E.E.S.3.E.E.x.n.o.r.r#f#f.g.g.f",
111".C.C.d.5.f.5.5.h.g.K.K.g.g.h#h#h#h#i.p.s.n.x.#.a.a.B.B.7.T.T.7.7",
112".T.T.T.U.U#e#e.9.9#j#k#k#l#m.0.0.0.0.Z.Y.Y.W.W.B.B.B.B.y.z.z.z.z",
113".P.P.l.l.R.R.R.R.S.c.c.o.c.c.x.n.c.s.r.5.r.r.p.p.p.p.p.r.r.r.r.r",
114"###a#a.6.6#g#g.6.6.g.g#h.5.r.r.q.r.d.s.c.w.w.x.w.w.w.w.x.F.F.F.F"};
diff --git a/noncore/games/kcheckers/pics/wood3.xpm b/noncore/games/kcheckers/pics/wood3.xpm
new file mode 100644
index 0000000..5f4f7e2
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/wood3.xpm
@@ -0,0 +1,33 @@
1/* XPM */
2static const char *wood3[]={
3"28 28 2 1",
4"# c None",
5". c #ff8c00",
6"............................",
7"............................",
8"..########################..",
9"..########################..",
10"..########################..",
11"..########################..",
12"..########################..",
13"..########################..",
14"..########################..",
15"..########################..",
16"..########################..",
17"..########################..",
18"..########################..",
19"..########################..",
20"..########################..",
21"..########################..",
22"..########################..",
23"..########################..",
24"..########################..",
25"..########################..",
26"..########################..",
27"..########################..",
28"..########################..",
29"..########################..",
30"..########################..",
31"..########################..",
32"............................",
33"............................"};
diff --git a/noncore/games/kcheckers/rcheckers.cpp b/noncore/games/kcheckers/rcheckers.cpp
new file mode 100644
index 0000000..a1c7afa
--- a/dev/null
+++ b/noncore/games/kcheckers/rcheckers.cpp
@@ -0,0 +1,476 @@
1//
2// Russian Checkers
3
4
5#include "rcheckers.h"
6
7
8///////////////////////////////////////////////////
9//
10// User Functions
11//
12///////////////////////////////////////////////////
13
14
15bool RCheckers::go1(int from,int field)
16{
17 to=field;
18
19 if(checkCapture1())
20 {
21 bool capture=false;
22 switch(board[from])
23 {
24 case MAN1:
25 if(manCapture1(from,UL,capture)) return true;
26 if(manCapture1(from,UR,capture)) return true;
27 if(manCapture1(from,DL,capture)) return true;
28 if(manCapture1(from,DR,capture)) return true;
29 return false;
30 case KING1:
31 if(kingCapture1(from,UL,capture)) return true;
32 if(kingCapture1(from,UR,capture)) return true;
33 if(kingCapture1(from,DL,capture)) return true;
34 if(kingCapture1(from,DR,capture)) return true;
35 return false;
36 }
37 }
38 else
39 {
40 switch(board[from])
41 {
42 case MAN1:
43 if((to==(from-6))||(to==(from-5)))
44 {
45 board[from]=FREE;
46 if(to<10) board[to]=KING1;
47 else board[to]=MAN1;
48 return true;
49 }
50 return false;
51 case KING1:
52 for(int i=from-6;;i-=6)
53 {
54 if(i==to)
55 {
56 board[from]=FREE;
57 board[to]=KING1;
58 return true;
59 }
60 else if(board[i]==FREE) continue;
61 else break;
62 }
63 for(int i=from-5;;i-=5)
64 {
65 if(i==to)
66 {
67 board[from]=FREE;
68 board[to]=KING1;
69 return true;
70 }
71 else if(board[i]==FREE) continue;
72 else break;
73 }
74 for(int i=from+5;;i+=5)
75 {
76 if(i==to)
77 {
78 board[from]=FREE;
79 board[to]=KING1;
80 return true;
81 }
82 else if(board[i]==FREE) continue;
83 else break;
84 }
85 for(int i=from+6;;i+=6)
86 {
87 if(i==to)
88 {
89 board[from]=FREE;
90 board[to]=KING1;
91 return true;
92 }
93 else if(board[i]==FREE) continue;
94 else break;
95 }
96 return false;
97 }
98 }
99 return false;
100}
101
102
103bool RCheckers::checkCapture1()
104{
105 for(int i=6;i<48;i++)
106 {
107 switch(board[i])
108 {
109 case MAN1:
110 if(board[i-6]==MAN2 || board[i-6]==KING2)
111 if(board[i-12]==FREE) return true;
112 if(board[i-5]==MAN2 || board[i-5]==KING2)
113 if(board[i-10]==FREE) return true;
114 if(board[i+5]==MAN2 || board[i+5]==KING2)
115 if(board[i+10]==FREE) return true;
116 if(board[i+6]==MAN2 || board[i+6]==KING2)
117 if(board[i+12]==FREE) return true;
118 break;
119 case KING1:
120 int k;
121 for(k=i-6;board[k]==FREE;k-=6);
122 if(board[k]==MAN2 || board[k]==KING2)
123 if(board[k-6]==FREE) return true;
124
125 for(k=i-5;board[k]==FREE;k-=5);
126 if(board[k]==MAN2 || board[k]==KING2)
127 if(board[k-5]==FREE) return true;
128
129 for(k=i+5;board[k]==FREE;k+=5);
130 if(board[k]==MAN2 || board[k]==KING2)
131 if(board[k+5]==FREE) return true;
132
133 for(k=i+6;board[k]==FREE;k+=6);
134 if(board[k]==MAN2 || board[k]==KING2)
135 if(board[k+6]==FREE) return true;
136 }
137 }
138 return false;
139}
140
141
142// Return TRUE if a course of the user true
143// Return FALSE if a course of the user incorrect
144
145bool RCheckers::manCapture1(int from,int direction,bool &capture)
146{
147 int i=from+direction;
148 if(board[i]==MAN2 || board[i]==KING2)
149 {
150 int k=i+direction;
151 if(board[k]==FREE)
152 {
153 bool next=false;
154 int save=board[i];
155 board[from]=FREE;
156 board[i]=NONE;
157
158 if(k<10)
159 {
160 board[k]=KING1;
161 if(kingCapture1(k,direction+11,next)) {board[i]=FREE;return true;}
162 }
163 else
164 {
165 board[k]=MAN1;
166 if(direction==UL || direction==DR)
167 {
168 if(manCapture1(k,UR,next)) {board[i]=FREE;return true;}
169 if(manCapture1(k,DL,next)) {board[i]=FREE;return true;}
170 }
171 else
172 {
173 if(manCapture1(k,UL,next)) {board[i]=FREE;return true;}
174 if(manCapture1(k,DR,next)) {board[i]=FREE;return true;}
175 }
176 if(manCapture1(k,direction,next)) {board[i]=FREE;return true;}
177 }
178
179 if((!next) && k==to) {board[i]=FREE;return true;}
180
181 board[k]=FREE;
182 board[i]=save;
183 board[from]=MAN1;
184 capture=true;
185 }
186 }
187 return false;
188}
189
190
191bool RCheckers::kingCapture1(int from,int direction,bool &capture)
192{
193 int i;
194 for(i=from+direction;board[i]==FREE;i+=direction);
195
196 if(board[i]==MAN2 || board[i]==KING2)
197 {
198 int k=i+direction;
199 if(board[k]==FREE)
200 {
201 bool next=false;
202 int save=board[i];
203 board[from]=FREE;
204 board[i]=NONE;
205
206 for(;board[k]==FREE;k+=direction)
207 {
208 board[k]=KING1;
209 if(direction==UL || direction==DR)
210 {
211 if(kingCapture1(k,UR,next)) {board[i]=FREE;return true;}
212 if(kingCapture1(k,DL,next)) {board[i]=FREE;return true;}
213 }
214 else
215 {
216 if(kingCapture1(k,UL,next)) {board[i]=FREE;return true;}
217 if(kingCapture1(k,DR,next)) {board[i]=FREE;return true;}
218 }
219 board[k]=FREE;
220 }
221
222 board[k-=direction]=KING1;
223 if(kingCapture1(k,direction,next)) {board[i]=FREE;return true;}
224 board[k]=FREE;
225
226 if(!next)
227 for(;k!=i;k-=direction)
228 if(k==to) {board[i]=FREE;board[k]=KING1;return true;}
229
230 board[i]=save;
231 board[from]=KING1;
232 capture=true;
233 }
234 }
235 return false;
236}
237
238
239////////////////////////////////////////////////////
240//
241// Computer Functions
242//
243////////////////////////////////////////////////////
244
245
246void RCheckers::kingMove2(int from,int &resMax)
247{
248 board[from]=FREE;
249 for(int i=from-6;board[i]==FREE;i-=6)
250 {
251 board[i]=KING2;
252 turn(resMax);
253 board[i]=FREE;
254 }
255 for(int i=from-5;board[i]==FREE;i-=5)
256 {
257 board[i]=KING2;
258 turn(resMax);
259 board[i]=FREE;
260 }
261 for(int i=from+5;board[i]==FREE;i+=5)
262 {
263 board[i]=KING2;
264 turn(resMax);
265 board[i]=FREE;
266 }
267 for(int i=from+6;board[i]==FREE;i+=6)
268 {
269 board[i]=KING2;
270 turn(resMax);
271 board[i]=FREE;
272 }
273 board[from]=KING2;
274}
275
276
277bool RCheckers::checkCapture2()
278{
279 for(int i=6;i<48;i++)
280 {
281 switch(board[i])
282 {
283 case MAN2:
284 if(board[i-6]==MAN1 || board[i-6]==KING1)
285 if(board[i-12]==FREE) return true;
286 if(board[i-5]==MAN1 || board[i-5]==KING1)
287 if(board[i-10]==FREE) return true;
288 if(board[i+5]==MAN1 || board[i+5]==KING1)
289 if(board[i+10]==FREE) return true;
290 if(board[i+6]==MAN1 || board[i+6]==KING1)
291 if(board[i+12]==FREE) return true;
292 break;
293 case KING2:
294 int k;
295 for(k=i-6;board[k]==FREE;k-=6);
296 if(board[k]==MAN1 || board[k]==KING1)
297 if(board[k-6]==FREE) return true;
298
299 for(k=i-5;board[k]==FREE;k-=5);
300 if(board[k]==MAN1 || board[k]==KING1)
301 if(board[k-5]==FREE) return true;
302
303 for(k=i+5;board[k]==FREE;k+=5);
304 if(board[k]==MAN1 || board[k]==KING1)
305 if(board[k+5]==FREE) return true;
306
307 for(k=i+6;board[k]==FREE;k+=6);
308 if(board[k]==MAN1 || board[k]==KING1)
309 if(board[k+6]==FREE) return true;
310 }
311 }
312 return false;
313}
314
315
316// Return TRUE if it is possible to capture
317// Return FALSE if it is impossible to capture
318
319bool RCheckers::manCapture2(int from,int &resMax)
320{
321 bool capture=false;
322
323 int i=from-6;
324 if(board[i]==MAN1 || board[i]==KING1)
325 {
326 int k=from-12;
327 if(board[k]==FREE)
328 {
329 int save=board[i];
330 board[from]=FREE;
331 board[i]=NONE;
332 board[k]=MAN2;
333 resMax--;
334 if(!manCapture2(k,resMax)) turn(resMax,true);
335 resMax++;
336 board[k]=FREE;
337 board[i]=save;
338 board[from]=MAN2;
339 capture=true;
340 }
341 }
342
343 i=from-5;
344 if(board[i]==MAN1 || board[i]==KING1)
345 {
346 int k=from-10;
347 if(board[k]==FREE)
348 {
349 int save=board[i];
350 board[from]=FREE;
351 board[i]=NONE;
352 board[k]=MAN2;
353 resMax--;
354 if(!manCapture2(k,resMax)) turn(resMax,true);
355 resMax++;
356 board[k]=FREE;
357 board[i]=save;
358 board[from]=MAN2;
359 capture=true;
360 }
361 }
362
363 i=from+5;
364 if(board[i]==MAN1 || board[i]==KING1)
365 {
366 int k=from+10;
367 if(board[k]==FREE)
368 {
369 int save=board[i];
370 board[from]=FREE;
371 board[i]=NONE;
372 resMax--;
373 if(from>32)
374 {
375 board[k]=KING2;
376 if(!kingCapture2(k,UL,resMax)) turn(resMax,true);
377 }
378 else
379 {
380 board[k]=MAN2;
381 if(!manCapture2(k,resMax)) turn(resMax,true);
382 }
383 resMax++;
384 board[k]=FREE;
385 board[i]=save;
386 board[from]=MAN2;
387 capture=true;
388 }
389 }
390
391 i=from+6;
392 if(board[i]==MAN1 || board[i]==KING1)
393 {
394 int k=from+12;
395 if(board[k]==FREE)
396 {
397 int save=board[i];
398 board[from]=FREE;
399 board[i]=NONE;
400 resMax--;
401 if(from>32)
402 {
403 board[k]=KING2;
404 if(!kingCapture2(k,UR,resMax)) turn(resMax,true);
405 }
406 else
407 {
408 board[k]=MAN2;
409 if(!manCapture2(k,resMax)) turn(resMax,true);
410 }
411 resMax++;
412 board[k]=FREE;
413 board[i]=save;
414 board[from]=MAN2;
415 capture=true;
416 }
417 }
418
419 if(capture) return true;
420 return false;
421}
422
423
424bool RCheckers::kingCapture2(int from,int direction,int &resMax)
425{
426 int i;
427 for(i=from+direction;board[i]==FREE;i+=direction);
428
429 if(board[i]==MAN1 || board[i]==KING1)
430 {
431 int k=i+direction;
432 if(board[k]==FREE)
433 {
434 bool capture=false;
435 int save=board[i];
436 board[from]=FREE;
437 board[i]=NONE;
438 resMax--;
439
440 for(;board[k]==FREE;k+=direction)
441 {
442 board[k]=KING2;
443 if(direction==UL || direction==DR)
444 {
445 if(kingCapture2(k,UR,resMax)) capture=true;
446 if(kingCapture2(k,DL,resMax)) capture=true;
447 }
448 else
449 {
450 if(kingCapture2(k,UL,resMax)) capture=true;
451 if(kingCapture2(k,DR,resMax)) capture=true;
452 }
453 board[k]=FREE;
454 }
455
456 board[k-=direction]=KING2;
457 if(kingCapture2(k,direction,resMax)) capture=true;
458 board[k]=FREE;
459
460 if(!capture)
461 for(;k!=i;k-=direction)
462 {
463 board[k]=KING2;
464 turn(resMax,true);
465 board[k]=FREE;
466 }
467
468 resMax++;
469 board[i]=save;
470 board[from]=KING2;
471 return true;
472 }
473 }
474 return false;
475}
476
diff --git a/noncore/games/kcheckers/rcheckers.h b/noncore/games/kcheckers/rcheckers.h
new file mode 100644
index 0000000..d44bfd1
--- a/dev/null
+++ b/noncore/games/kcheckers/rcheckers.h
@@ -0,0 +1,28 @@
1
2#ifndef RCHECKERS_H
3#define RCHECKERS_H
4
5#include <checkers.h>
6
7
8class RCheckers:public Checkers
9{
10 public:
11 RCheckers(int skill):Checkers(skill){};
12 bool go1(int,int);
13
14 bool checkCapture1();
15 bool checkCapture2();
16
17 private:
18 void kingMove2(int,int &);
19
20 bool manCapture1(int,int,bool &);
21 bool kingCapture1(int,int,bool &);
22
23 bool manCapture2(int,int &);
24 bool kingCapture2(int,int,int &);
25
26};
27
28#endif
diff --git a/pics/KCheckers.xpm b/pics/KCheckers.xpm
new file mode 100644
index 0000000..6570d88
--- a/dev/null
+++ b/pics/KCheckers.xpm
@@ -0,0 +1,41 @@
1/* XPM */
2static const char *biglogo[]={
3"32 32 6 1",
4". c None",
5"# c #000000",
6"a c #303030",
7"d c #d7d7d7",
8"c c #eaeaea",
9"b c #ffffff",
10"................................",
11"................................",
12"................................",
13"................................",
14"....########################....",
15"....#aaaaaaaaaaaaaaaaaaaaaa#....",
16"....#abbbbbbbbbb##########a#....",
17"....#abbbbbbbcbc##########a#....",
18"....#abbbbbbbbbb##########a#....",
19"....#abbbbbcbcbc##########a#....",
20"....#abbbbbbbbbb##########a#....",
21"....#abbbcbcbcbc##########a#....",
22"....#abbbbbbbbbc##########a#....",
23"....#abcbcbcbbcc##########a#....",
24"....#abbbbbbbccc##########a#....",
25"....#abcbcbccccc##########a#....",
26"....#a##########cccccccccca#....",
27"....#a##########cccccccccca#....",
28"....#a##########ccccccccdca#....",
29"....#a##########cccccccccca#....",
30"....#a##########ccccccdcdca#....",
31"....#a##########cccccccccca#....",
32"....#a##########ccccdcdcdca#....",
33"....#a##########cccccccccda#....",
34"....#a##########ccdcdcdcdca#....",
35"....#a##########cccccccdcda#....",
36"....#aaaaaaaaaaaaaaaaaaaaaa#....",
37"....########################....",
38"................................",
39"................................",
40"................................",
41"................................"};