summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/kcheckers/checkers.h4
-rw-r--r--noncore/games/kcheckers/echeckers.h2
-rw-r--r--noncore/games/kcheckers/field.cpp57
-rw-r--r--noncore/games/kcheckers/field.h19
-rw-r--r--noncore/games/kcheckers/kcheckers.cpp440
-rw-r--r--noncore/games/kcheckers/kcheckers.h54
-rw-r--r--noncore/games/kcheckers/kcheckers.pro3
-rw-r--r--noncore/games/kcheckers/main.cpp2
-rw-r--r--noncore/games/kcheckers/opie-kcheckers.control2
-rw-r--r--noncore/games/kcheckers/pics/biglogo.xpm55
-rw-r--r--noncore/games/kcheckers/pics/contexthelp.xpm34
-rw-r--r--noncore/games/kcheckers/pics/exit.xpm34
-rw-r--r--noncore/games/kcheckers/pics/green1.xpm62
-rw-r--r--noncore/games/kcheckers/pics/green2.xpm107
-rw-r--r--noncore/games/kcheckers/pics/green3.xpm33
-rw-r--r--noncore/games/kcheckers/pics/help.xpm74
-rw-r--r--noncore/games/kcheckers/pics/king_black.xpm2
-rw-r--r--noncore/games/kcheckers/pics/king_white.xpm2
-rw-r--r--noncore/games/kcheckers/pics/logo.xpm34
-rw-r--r--noncore/games/kcheckers/pics/man_black.xpm2
-rw-r--r--noncore/games/kcheckers/pics/man_white.xpm2
-rw-r--r--noncore/games/kcheckers/pics/marble1.xpm10
-rw-r--r--noncore/games/kcheckers/pics/marble2.xpm2
-rw-r--r--noncore/games/kcheckers/pics/marble3.xpm2
-rw-r--r--noncore/games/kcheckers/pics/undo.xpm24
-rw-r--r--noncore/games/kcheckers/pics/wood1.xpm2
-rw-r--r--noncore/games/kcheckers/pics/wood2.xpm227
-rw-r--r--noncore/games/kcheckers/pics/wood3.xpm4
-rw-r--r--noncore/games/kcheckers/rcheckers.h2
-rw-r--r--pics/kcheckers/KCheckers.xpm55
30 files changed, 980 insertions, 372 deletions
diff --git a/noncore/games/kcheckers/checkers.h b/noncore/games/kcheckers/checkers.h
index bd2be08..2592fb1 100644
--- a/noncore/games/kcheckers/checkers.h
+++ b/noncore/games/kcheckers/checkers.h
@@ -26,23 +26,23 @@ class Checkers
26 bool checkMove2(); 26 bool checkMove2();
27 27
28 virtual bool checkCapture1()=0; 28 virtual bool checkCapture1()=0;
29 virtual bool checkCapture2()=0; 29 virtual bool checkCapture2()=0;
30 30
31 void setLevel(int i) {levelmax=i;}; 31 void setLevel(int i) {levelmax=i;};
32 int getBoard(int i) {return board[i];}; 32
33 int board[54];
33 34
34 protected: 35 protected:
35 int level; // Current level 36 int level; // Current level
36 int levelmax; // Maximum level 37 int levelmax; // Maximum level
37 38
38 int turn(); 39 int turn();
39 void turn(int &,bool capture=false); 40 void turn(int &,bool capture=false);
40 41
41 int to; 42 int to;
42 int board[54];
43 int bestboard[54]; 43 int bestboard[54];
44 int bestcounter; 44 int bestcounter;
45 45
46 virtual void kingMove2(int,int &)=0; 46 virtual void kingMove2(int,int &)=0;
47 47
48 virtual bool manCapture2(int,int &)=0; 48 virtual bool manCapture2(int,int &)=0;
diff --git a/noncore/games/kcheckers/echeckers.h b/noncore/games/kcheckers/echeckers.h
index 5ca3ecc..c3f7075 100644
--- a/noncore/games/kcheckers/echeckers.h
+++ b/noncore/games/kcheckers/echeckers.h
@@ -1,11 +1,11 @@
1 1
2#ifndef ECHECKERS_H 2#ifndef ECHECKERS_H
3#define ECHECKERS_H 3#define ECHECKERS_H
4 4
5#include <checkers.h> 5#include "checkers.h"
6 6
7 7
8class ECheckers:public Checkers 8class ECheckers:public Checkers
9{ 9{
10 public: 10 public:
11 ECheckers(int skill):Checkers(skill){}; 11 ECheckers(int skill):Checkers(skill){};
diff --git a/noncore/games/kcheckers/field.cpp b/noncore/games/kcheckers/field.cpp
index 0755008..aacfc1c 100644
--- a/noncore/games/kcheckers/field.cpp
+++ b/noncore/games/kcheckers/field.cpp
@@ -1,31 +1,82 @@
1 1
2#include <qpainter.h> 2#include <qpainter.h>
3 3
4#include "field.h" 4#include "field.h"
5 5
6Field::Field(QWidget *parent,int i):QWidget(parent) 6
7Field::Field(QWidget* parent,int i):QWidget(parent)
7{ 8{
8 pixmap=new QPixmap(SIZE,SIZE); 9 pixmap=new QPixmap(SIZE,SIZE);
10 CHECK_PTR(pixmap);
9 number=i; 11 number=i;
12
13 pattern=NULL;
14 picture=NULL;
15 frame=NULL;
10} 16}
11 17
18
12void Field::paintEvent(QPaintEvent*) 19void Field::paintEvent(QPaintEvent*)
13{ 20{
14 bitBlt(this,0,0,pixmap); 21 bitBlt(this,0,0,pixmap);
15} 22}
16 23
24
17void Field::mousePressEvent(QMouseEvent* mouseevent) 25void Field::mousePressEvent(QMouseEvent* mouseevent)
18{ 26{
19 if(mouseevent->button()!=Qt::LeftButton) return; 27 if(mouseevent->button()!=Qt::LeftButton) return;
20 emit click(number); 28 emit click(number);
21} 29}
22 30
23void Field::draw(QImage *image) 31
32void Field::draw()
24{ 33{
25 QPainter paint; 34 QPainter paint;
26 paint.begin(pixmap); 35 paint.begin(pixmap);
27 paint.drawImage(0,0,*image); 36
37 if(pattern) paint.drawImage(0,0,*pattern);
38
39 if(label.length())
40 {
41 paint.setPen(white);
42 paint.setFont(QFont(font().family(),10));
43 paint.drawText(2,11,label);
44 }
45
46 if(picture) paint.drawImage(0,0,*picture);
47
48 if(frame) paint.drawImage(0,0,*frame);
49
28 paint.end(); 50 paint.end();
29 update(); 51 update();
30} 52}
31 53
54
55void Field::setFrame(QImage* image)
56{
57 frame=image;
58 draw();
59}
60
61
62void Field::setPicture(QImage* image)
63{
64 picture=image;
65 draw();
66}
67
68
69void Field::setPattern(QImage* image)
70{
71 pattern=image;
72 draw();
73}
74
75
76void Field::setLabel(const QString & string)
77{
78 label=string;
79 draw();
80}
81
82
diff --git a/noncore/games/kcheckers/field.h b/noncore/games/kcheckers/field.h
index d929e49..297d94e 100644
--- a/noncore/games/kcheckers/field.h
+++ b/noncore/games/kcheckers/field.h
@@ -9,19 +9,36 @@
9 9
10class Field:public QWidget 10class Field:public QWidget
11{ 11{
12 Q_OBJECT 12 Q_OBJECT
13 public: 13 public:
14 Field(QWidget*,int); 14 Field(QWidget*,int);
15 void draw(QImage*); 15
16 void setFrame(QImage*);
17 void setPicture(QImage*);
18 void setPattern(QImage*);
19 void setLabel(const QString &);
20
16 signals: 21 signals:
17 void click(int); 22 void click(int);
23
18 protected: 24 protected:
19 void paintEvent(QPaintEvent*); 25 void paintEvent(QPaintEvent*);
20 void mousePressEvent(QMouseEvent*); 26 void mousePressEvent(QMouseEvent*);
27
21 private: 28 private:
29 void draw();
30
22 int number; 31 int number;
32
33 // pixmap = pattern + label + picture + frame;
34
35 QImage* frame;
36 QImage* picture;
37 QImage* pattern;
38 QString label;
39
23 QPixmap *pixmap; 40 QPixmap *pixmap;
24 41
25}; 42};
26 43
27#endif 44#endif
diff --git a/noncore/games/kcheckers/kcheckers.cpp b/noncore/games/kcheckers/kcheckers.cpp
index 3df744e..c2eba0d 100644
--- a/noncore/games/kcheckers/kcheckers.cpp
+++ b/noncore/games/kcheckers/kcheckers.cpp
@@ -1,119 +1,183 @@
1 1
2#include <qimage.h> 2#include <qimage.h>
3#include <qframe.h> 3#include <qframe.h>
4#include <qlayout.h> 4#include <qlayout.h>
5#include <qmenubar.h> 5#include <qmenubar.h>
6#include <qtoolbar.h>
7#include <qpe/config.h>
6#include <qwhatsthis.h> 8#include <qwhatsthis.h>
9#include <qtoolbutton.h>
7#include <qmessagebox.h> 10#include <qmessagebox.h>
8#include <qapplication.h> 11#include <qapplication.h>
9 12
10#include "kcheckers.h" 13#include "kcheckers.h"
11#include "echeckers.h" 14#include "echeckers.h"
12#include "rcheckers.h" 15#include "rcheckers.h"
13 16
14#include "pics/exit.xpm"
15#include "pics/logo.xpm" 17#include "pics/logo.xpm"
18#include "pics/undo.xpm"
19#include "pics/exit.xpm"
20#include "pics/help.xpm"
16#include "pics/wood1.xpm" 21#include "pics/wood1.xpm"
17#include "pics/wood2.xpm" 22#include "pics/wood2.xpm"
18#include "pics/wood3.xpm" 23#include "pics/wood3.xpm"
24#include "pics/green1.xpm"
25#include "pics/green2.xpm"
26#include "pics/green3.xpm"
19#include "pics/marble1.xpm" 27#include "pics/marble1.xpm"
20#include "pics/marble2.xpm" 28#include "pics/marble2.xpm"
21#include "pics/marble3.xpm" 29#include "pics/marble3.xpm"
22#include "pics/biglogo.xpm" 30#include "pics/biglogo.xpm"
23#include "pics/man_black.xpm" 31#include "pics/man_black.xpm"
24#include "pics/man_white.xpm" 32#include "pics/man_white.xpm"
25#include "pics/king_black.xpm" 33#include "pics/king_black.xpm"
26#include "pics/king_white.xpm" 34#include "pics/king_white.xpm"
27#include "pics/contexthelp.xpm" 35#include "pics/contexthelp.xpm"
28 36
29 37
38QString KCheckers::enNumeration="1 2 3 4 5 6 7 8 9 1011121314151617181920212223242526272829303132";
39QString KCheckers::ruNumeration="B8D8F8H8A7C7E7G7B6D6F6H6A5C5E5G5B4D4F4H4A3C3E3G3B2D2F2H2A1C1E1G1";
40
30const int KCheckers::t[]={6,7,8,9,11,12,13,14,17,18,19,20,22,23, 41const 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}; 42 24,25,28,29,30,31,33,34,35,36,39,40,41,42,44,45,46,47};
32 43
44
33KCheckers::KCheckers():QMainWindow(0,0,WStyle_DialogBorder) 45KCheckers::KCheckers():QMainWindow(0,0,WStyle_DialogBorder)
34{ 46{
35 setCaption("KCheckers"); 47 setCaption("KCheckers");
36 setIcon(QPixmap(biglogo)); 48 setIcon(QPixmap(biglogo_xpm));
37 showMaximized(); 49
50 setToolBarsMovable(false);
51
52 // Make a menubar
53
54 gameMenu=new QPopupMenu;
55 CHECK_PTR(gameMenu);
38 56
39 QPopupMenu* gameMenu=new QPopupMenu; 57 gameMenu->insertItem(QPixmap(logo_xpm),tr("&New"),this,SLOT(newGame()),CTRL+Key_N);
40 gameMenu->insertItem(QPixmap(logo),tr("New"),this,SLOT(newGame()));
41 gameMenu->insertSeparator(); 58 gameMenu->insertSeparator();
42 gameMenu->insertItem(QPixmap(exit),tr("Quit"),qApp,SLOT(quit())); 59 undoID=gameMenu->insertItem(QPixmap(undo_xpm),tr("&Undo Move"),this,SLOT(undoMove()),CTRL+Key_Z);
60 gameMenu->insertSeparator();
61 gameMenu->insertItem(QPixmap(exit_xpm),tr("&Quit"),qApp,SLOT(closeAllWindows()),CTRL+Key_Q);
43 62
44 skillMenu=new QPopupMenu; 63 skillMenu=new QPopupMenu;
64 CHECK_PTR(skillMenu);
45 65
46 skillMenu->insertItem(tr("Beginner"),this,SLOT(setSkillBeginner()),0,BEGINNER); 66 skillMenu->insertItem(tr("&Beginner"),this,SLOT(setSkillBeginner()),CTRL+Key_1,BEGINNER);
47 skillMenu->insertItem(tr("Novice"), this,SLOT(setSkillNovice()), 0,NOVICE); 67 skillMenu->insertItem(tr("&Novice"), this,SLOT(setSkillNovice()), CTRL+Key_2,NOVICE);
48 skillMenu->insertItem(tr("Average"), this,SLOT(setSkillAverage()), 0,AVERAGE); 68 skillMenu->insertItem(tr("&Average"), this,SLOT(setSkillAverage()), CTRL+Key_3,AVERAGE);
49 skillMenu->insertItem(tr("Good"), this,SLOT(setSkillGood()), 0,GOOD); 69 skillMenu->insertItem(tr("&Good"), this,SLOT(setSkillGood()), CTRL+Key_4,GOOD);
50 skillMenu->insertItem(tr("Expert"), this,SLOT(setSkillExpert()), 0,EXPERT); 70 skillMenu->insertItem(tr("&Expert"), this,SLOT(setSkillExpert()), CTRL+Key_5,EXPERT);
51 skillMenu->insertItem(tr("Master"), this,SLOT(setSkillMaster()), 0,MASTER); 71 skillMenu->insertItem(tr("&Master"), this,SLOT(setSkillMaster()), CTRL+Key_6,MASTER);
52 72
53 optionsMenu=new QPopupMenu; 73 optionsMenu=new QPopupMenu;
74 CHECK_PTR(optionsMenu);
54 75
55 optionsMenu->insertItem(tr("English Rules"),this,SLOT(setRulesEnglish()),0,ENGLISH); 76 numID=optionsMenu->insertItem(tr("&Show Numeration"),this,SLOT(showNumeration()));
56 optionsMenu->insertItem(tr("Russian Rules"),this,SLOT(setRulesRussian()),0,RUSSIAN); 77 optionsMenu->insertSeparator();
78 optionsMenu->insertItem(tr("&English Rules"),this,SLOT(setRulesEnglish()),0,ENGLISH);
79 optionsMenu->insertItem(tr("&Russian Rules"),this,SLOT(setRulesRussian()),0,RUSSIAN);
57 optionsMenu->insertSeparator(); 80 optionsMenu->insertSeparator();
58 optionsMenu->insertItem(tr("Marble Board"),this,SLOT(setPatternMarble()),0,MARBLE); 81 optionsMenu->insertItem(tr("&Green Board"), this,SLOT(setPatternGreen()), 0,GREEN);
59 optionsMenu->insertItem(tr("Wooden Board"),this,SLOT(setPatternWood()), 0,WOOD); 82 optionsMenu->insertItem(tr("&Marble Board"),this,SLOT(setPatternMarble()),0,MARBLE);
83 optionsMenu->insertItem(tr("&Wooden Board"),this,SLOT(setPatternWooden()),0,WOODEN);
60 84
61 QPopupMenu* helpMenu=new QPopupMenu; 85 QPopupMenu* helpMenu=new QPopupMenu;
86 CHECK_PTR(helpMenu);
62 87
63 helpMenu->insertItem(QPixmap(contexthelp),tr("What's This"),this,SLOT(whatsThis())); 88 helpMenu->insertItem(QPixmap(contexthelp_xpm),tr("What's This"),this,SLOT(whatsThis()),SHIFT+Key_F1);
89 helpMenu->insertItem(QPixmap(help_xpm),tr("&Rules of Play"),this,SLOT(help()),Key_F1);
64 helpMenu->insertSeparator(); 90 helpMenu->insertSeparator();
65 helpMenu->insertItem(QPixmap(logo),tr("About KCheckers"),this,SLOT(about())); 91 helpMenu->insertItem(QPixmap(logo_xpm),tr("&About KCheckers"),this,SLOT(about()));
66 helpMenu->insertItem(tr("About &Qt"),this,SLOT(aboutQt())); 92 helpMenu->insertItem(tr("About &Qt"),this,SLOT(aboutQt()));
67 93
68 menuBar()->insertItem(tr("Game"), gameMenu); 94 QToolBar* menuToolBar=new QToolBar(this);
69 menuBar()->insertItem(tr("Skill"), skillMenu); 95 CHECK_PTR(menuToolBar);
70 menuBar()->insertItem(tr("Options"),optionsMenu); 96 QMenuBar* menuBar=new QMenuBar(menuToolBar);
71 menuBar()->insertItem(tr("Help"), helpMenu); 97 CHECK_PTR(menuBar);
72 98
73 skill=NOVICE; 99 menuBar->insertItem(tr("&Game"), gameMenu);
74 skillMenu->setItemChecked(skill,true); 100 menuBar->insertItem(tr("&Skill"), skillMenu);
101 menuBar->insertItem(tr("&Options"),optionsMenu);
102 menuBar->insertItem(tr("&Help"), helpMenu);
75 103
76 rules=ENGLISH; 104 // Restore a settings
105
106 readConfig();
107
108 skillMenu->setItemChecked(skill,true);
77 optionsMenu->setItemChecked(rules,true); 109 optionsMenu->setItemChecked(rules,true);
110 optionsMenu->setItemChecked(numID,false);
78 111
79 pattern=WOOD; 112 // Make a toolbar
80 optionsMenu->setItemChecked(pattern,true); 113
114 QToolBar* emptyToolBar=new QToolBar(this);
115 emptyToolBar->setHorizontalStretchable(true);
116
117 QToolBar* toolBar=new QToolBar(this);
118 CHECK_PTR(toolBar);
119
120 QSize buttonSize(24,24);
121
122 QToolButton* gameButton=new QToolButton(QPixmap(logo_xpm),tr(" New Game ") ,"",this,SLOT(newGame()),toolBar);
123 CHECK_PTR(gameButton);
124 gameButton->setMinimumSize(buttonSize);
125
126 undoButton=new QToolButton(QPixmap(undo_xpm),tr(" Undo Move "),"",this,SLOT(undoMove()),toolBar);
127 CHECK_PTR(undoButton);
128 undoButton->setMinimumSize(buttonSize);
81 129
82 imageMan1=new QImage(man_black); 130 QToolButton* helpButton=new QToolButton(QPixmap(help_xpm),tr(" Rules of Play "),"",this,SLOT(help()),toolBar);
83 imageMan2=new QImage(man_white); 131 CHECK_PTR(helpButton);
84 imageKing1=new QImage(king_black); 132 helpButton->setMinimumSize(buttonSize);
85 imageKing2=new QImage(king_white);
86 133
87 imageWood1=new QImage(wood1); 134 // Make a checkers board
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 135
94 imagePat1=imageWood1; 136 imageMan1=new QImage(man_black_xpm); CHECK_PTR(imageMan1);
95 imagePat2=imageWood2; 137 imageMan2=new QImage(man_white_xpm); CHECK_PTR(imageMan2);
96 imageFrame=imageWood3; 138 imageKing1=new QImage(king_black_xpm); CHECK_PTR(imageKing1);
139 imageKing2=new QImage(king_white_xpm); CHECK_PTR(imageKing2);
140
141 imageWood1=new QImage(wood1_xpm); CHECK_PTR(imageWood1);
142 imageWood2=new QImage(wood2_xpm); CHECK_PTR(imageWood2);
143 imageWood3=new QImage(wood3_xpm); CHECK_PTR(imageWood3);
144 imageGreen1=new QImage(green1_xpm); CHECK_PTR(imageGreen1);
145 imageGreen2=new QImage(green2_xpm); CHECK_PTR(imageGreen2);
146 imageGreen3=new QImage(green3_xpm); CHECK_PTR(imageGreen3);
147 imageMarble1=new QImage(marble1_xpm); CHECK_PTR(imageMarble1);
148 imageMarble2=new QImage(marble2_xpm); CHECK_PTR(imageMarble2);
149 imageMarble3=new QImage(marble3_xpm); CHECK_PTR(imageMarble3);
97 150
98 QWidget* centralWidget=new QWidget(this); 151 QWidget* centralWidget=new QWidget(this);
99 setCentralWidget(centralWidget); 152 setCentralWidget(centralWidget);
100 153
101 QFrame* frame=new QFrame(centralWidget); 154 QFrame* frame=new QFrame(centralWidget);
155 CHECK_PTR(frame);
102 frame->setFrameStyle(QFrame::Box|QFrame::Plain); 156 frame->setFrameStyle(QFrame::Box|QFrame::Plain);
103 frame->setFixedSize(SIZE*8+2,SIZE*8+2); 157 frame->setFixedSize(SIZE*8+2,SIZE*8+2);
104 158
159 statusLabel = new QLabel(centralWidget);
160 statusLabel->setAlignment(Qt::AlignHCenter);
161
105 QVBoxLayout* vlayout=new QVBoxLayout(centralWidget); 162 QVBoxLayout* vlayout=new QVBoxLayout(centralWidget);
106 vlayout->addWidget(frame);
107 163
108 statusLabel = new QLabel(centralWidget); 164 vlayout->addStretch();
165 vlayout->addWidget(frame);
166 vlayout->addStretch();
109 vlayout->addWidget(statusLabel); 167 vlayout->addWidget(statusLabel);
168 vlayout->addStretch();
110 169
111 for(int i=0;i<64;i++) field[i]=new Field(frame,i); 170 for(int i=0;i<64;i++)
171 {
172 field[i]=new Field(frame,i);
173 CHECK_PTR(field[i]);
174 }
112 175
113 QGridLayout* grid=new QGridLayout(frame,8,8,1,0); 176 QGridLayout* grid=new QGridLayout(frame,8,8,1,0);
177 CHECK_PTR(grid);
114 178
115 for(int i=0;i<4;i++) 179 for(int i=0;i<4;i++)
116 { 180 {
117 for(int k=0;k<4;k++) 181 for(int k=0;k<4;k++)
118 { 182 {
119 grid->addWidget(field[i*8+k+32],i*2, k*2 ); 183 grid->addWidget(field[i*8+k+32],i*2, k*2 );
@@ -123,19 +187,77 @@ KCheckers::KCheckers():QMainWindow(0,0,WStyle_DialogBorder)
123 } 187 }
124 } 188 }
125 189
126 for(int i=0;i<32;i++) 190 for(int i=0;i<32;i++)
127 connect(field[i],SIGNAL(click(int)),this,SLOT(click(int))); 191 connect(field[i],SIGNAL(click(int)),this,SLOT(click(int)));
128 192
193 selected=false;
194
195 setPattern(pattern);
196
197 QWhatsThis::add(frame,"A checkers board");
198
129 userFirst=false; 199 userFirst=false;
130 200
131 game=NULL; 201 game=NULL;
132 newGame(); 202 newGame();
133} 203}
134 204
135 205
206void KCheckers::readConfig()
207{
208 Config config("KCheckers");
209 config.setGroup("KCheckers");
210 QString entry;
211
212 entry=config.readEntry("skill","novice");
213 if(entry=="beginner") skill=BEGINNER;
214 else if(entry=="average") skill=AVERAGE;
215 else if(entry=="good") skill=GOOD;
216 else if(entry=="expert") skill=EXPERT;
217 else if(entry=="master") skill=MASTER;
218 else skill=NOVICE;
219
220 entry=config.readEntry("rules","english");
221 if(entry=="russian") rules=RUSSIAN;
222 else rules=ENGLISH;
223
224 entry=config.readEntry("theme","wooden");
225 if(entry=="green") pattern=GREEN;
226 else if(entry=="marble") pattern=MARBLE;
227 else pattern=WOODEN;
228}
229
230
231void KCheckers::closeEvent(QCloseEvent* event)
232{
233 Config config("KCheckers");
234 config.setGroup("KCheckers");
235 QString entry;
236
237 if(skill==BEGINNER) entry="beginner";
238 if(skill==NOVICE) entry="novice";
239 if(skill==AVERAGE) entry="average";
240 if(skill==GOOD) entry="good";
241 if(skill==EXPERT) entry="expert";
242 if(skill==MASTER) entry="master";
243 config.writeEntry("skill",entry);
244
245 if(rules==ENGLISH) entry="english";
246 if(rules==RUSSIAN) entry="russian";
247 config.writeEntry("rules",entry);
248
249 if(pattern==GREEN) entry="green";
250 if(pattern==MARBLE) entry="marble";
251 if(pattern==WOODEN) entry="wooden";
252 config.writeEntry("theme",entry);
253
254 event->accept();
255}
256
257
136void KCheckers::setSkill(int set) 258void KCheckers::setSkill(int set)
137{ 259{
138 skillMenu->setItemChecked(skill,false); 260 skillMenu->setItemChecked(skill,false);
139 261
140 skill=set; 262 skill=set;
141 skillMenu->setItemChecked(skill,true); 263 skillMenu->setItemChecked(skill,true);
@@ -162,101 +284,196 @@ void KCheckers::setPattern(int set)
162 284
163 pattern=set; 285 pattern=set;
164 optionsMenu->setItemChecked(pattern,true); 286 optionsMenu->setItemChecked(pattern,true);
165 287
166 switch(pattern) 288 switch(pattern)
167 { 289 {
290 case GREEN:
291 imagePat1=imageGreen1;
292 imagePat2=imageGreen2;
293 imageFrame=imageGreen3;
294 break;
168 case MARBLE: 295 case MARBLE:
169 imagePat1=imageMarble1; 296 imagePat1=imageMarble1;
170 imagePat2=imageMarble2; 297 imagePat2=imageMarble2;
171 imageFrame=imageMarble3; 298 imageFrame=imageMarble3;
172 break; 299 break;
173 case WOOD: 300 case WOODEN:
174 imagePat1=imageWood1; 301 imagePat1=imageWood1;
175 imagePat2=imageWood2; 302 imagePat2=imageWood2;
176 imageFrame=imageWood3; 303 imageFrame=imageWood3;
177 } 304 }
178 305
179 drawBoard(); 306 for(int i=0; i<32;i++) field[i]->setPattern(imagePat2);
307 for(int i=32;i<64;i++) field[i]->setPattern(imagePat1);
308
309 if(selected) field[from]->setFrame(imageFrame);
310}
311
180 312
181 if(selected) field[from]->draw(imageFrame); 313void KCheckers::showNumeration()
314{
315 if(optionsMenu->isItemChecked(numID))
316 {
317 optionsMenu->setItemChecked(numID,false);
318 for(int i=0;i<32;i++) field[i]->setLabel("");
319 }
320 else
321 {
322 optionsMenu->setItemChecked(numID,true);
323 drawNumeration();
324 }
325}
326
327
328void KCheckers::drawNumeration()
329{
330 if(rules==ENGLISH)
331 {
332 if(userFirst)
333 for(int i=0;i<32;i++)
334 field[i]->setLabel(enNumeration.mid(i*2,2));
335 else
336 for(int i=0;i<32;i++)
337 field[i]->setLabel(enNumeration.mid(62-i*2,2));
338 }
339 else
340 {
341 if(userFirst)
342 for(int i=0;i<32;i++)
343 field[i]->setLabel(ruNumeration.mid(i*2,2));
344 else
345 for(int i=0;i<32;i++)
346 field[i]->setLabel(ruNumeration.mid(62-i*2,2));
347 }
348}
349
350
351void KCheckers::drawBoard(int i)
352{
353 switch(game->board[t[i]])
354 {
355 case MAN1:
356 field[i]->setPicture(imageMan1);
357 break;
358 case MAN2:
359 field[i]->setPicture(imageMan2);
360 break;
361 case KING1:
362 field[i]->setPicture(imageKing1);
363 break;
364 case KING2:
365 field[i]->setPicture(imageKing2);
366 break;
367 default:
368 field[i]->setPicture(NULL);
369 }
370}
371
372
373void KCheckers::help()
374{
375 QMessageBox::information(this,"Rules of Play",
376 "In the beginning of game you have\n"
377 "12 checkers (men).\n"
378 "The men move forward only.\n"
379 "The men can capture:\n"
380 "- by jumping forward only (english\n"
381 " rules);\n"
382 "- by jumping forward or backward\n"
383 " (russian rules).\n"
384 "A man which reaches the far side of\n"
385 "the board becomes a king.\n"
386 "The kings move forward or\n"
387 "backward:\n"
388 "- to one square only (english rules);\n"
389 "- to any number of squares (russian\n"
390 " rules).\n"
391 "The kings capture by jumping\n"
392 "forward or backward.\n"
393 "Whenever a player is able to make a\n"
394 "capture he must do so.",
395 QMessageBox::Ok|QMessageBox::Default);
182} 396}
183 397
184 398
185void KCheckers::about() 399void KCheckers::about()
186{ 400{
187 QMessageBox::about(this, "About", 401 QMessageBox::about(this,"About KCheckers",
188 "KCheckers, a board game. Ver 0.2\n" 402 "KCheckers, a board game. Ver 0.3\n"
189 "(C) 2002, A. Peredri <andi@ukr.net>\n\n" 403 "(C) 2002, A. Peredri <andi@ukr.net>\n\n"
190 "http://kcheckers.tuxfamily.org\n\n" 404 "http://kcheckers.tuxfamily.org\n\n"
191 "Opie version by S.Prud'homme\n" 405 "Contributors:\n"
192 "<prudhomme@laposte.net>\n\n" 406 "S. Rosen <srosen@erols.com>\n\n"
193 "http://opie.handhelds.org\n\n" 407 "Qtopia version: S.Prud'homme\n"
194 "This program is distributed under the\n" 408 "<prudhomme@laposte.net>\n\n"
195 "terms of the GNU General Public\n" 409 "This program is distributed under the\n"
196 "License."); 410 "terms of the GNU General Public\n"
411 "License.");
197} 412}
198 413
199 414
200void KCheckers::aboutQt() 415void KCheckers::aboutQt()
201{ 416{
202 QMessageBox::aboutQt(this); 417 QMessageBox::aboutQt(this);
203} 418}
204 419
205 420
206void KCheckers::newGame() 421void KCheckers::newGame()
207{ 422{
208 if(game) 423 if(game) delete game;
209 {
210 delete game;
211 QWhatsThis::remove(this);
212 }
213 424
214 switch(rules) 425 switch(rules)
215 { 426 {
216 case ENGLISH: 427 case ENGLISH:
217 game=new ECheckers(skill); 428 game=new ECheckers(skill);
218 QWhatsThis::add(this, 429 CHECK_PTR(game);
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; 430 break;
431
230 case RUSSIAN: 432 case RUSSIAN:
231 game=new RCheckers(skill); 433 game=new RCheckers(skill);
232 QWhatsThis::add(this, 434 CHECK_PTR(game);
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 } 435 }
244 436
245 selected=false; 437 unselect();
246 gameOver=false; 438 gameOver=false;
247 439
440 gameMenu->setItemEnabled(undoID,false);
441 undoButton->setEnabled(false);
442
248 colorChange(); 443 colorChange();
249 drawBoard(); 444
445 for(int i=0;i<32;i++) drawBoard(i);
446 if(optionsMenu->isItemChecked(numID)) drawNumeration();
250 447
251 if(!userFirst) compGo(); 448 if(!userFirst) compGo();
252 449
253 statusLabel->setText(tr("Go!")); 450 statusLabel->setText(tr("Go!"));
254} 451}
255 452
256 453
454// Undo the last computer and user moves
455
456void KCheckers::undoMove()
457{
458 for(int i=0;i<32;i++)
459 {
460 game->board[t[i]]=undoBoard[i];
461 drawBoard(i);
462 }
463
464 unselect();
465 gameOver=false;
466
467 gameMenu->setItemEnabled(undoID,false);
468 undoButton->setEnabled(false);
469
470 statusLabel->setText(tr("Go!"));
471}
472
473
257void KCheckers::colorChange() 474void KCheckers::colorChange()
258{ 475{
259 userFirst=!userFirst; 476 userFirst=!userFirst;
260 477
261 QImage* image; 478 QImage* image;
262 image=imageMan1; 479 image=imageMan1;
@@ -265,58 +482,48 @@ void KCheckers::colorChange()
265 image=imageKing1; 482 image=imageKing1;
266 imageKing1=imageKing2; 483 imageKing1=imageKing2;
267 imageKing2=image; 484 imageKing2=image;
268} 485}
269 486
270 487
271void KCheckers::drawBoard() 488void KCheckers::unselect()
272{ 489{
273 // Drawing of start position 490 if(selected) field[from]->setFrame(NULL);
274 for(int i=0;i<32;i++) 491 selected=false;
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} 492}
285 493
286 494
287void KCheckers::click(int fieldNumber) 495void KCheckers::click(int fieldNumber)
288{ 496{
289 if(gameOver) return; 497 if(gameOver) return;
290 switch(game->getBoard(t[fieldNumber])) 498 switch(game->board[t[fieldNumber]])
291 { 499 {
292 case MAN1: 500 case MAN1:
293 case KING1: 501 case KING1:
294 // User selected 502 // User selected
295 if(!selected) 503 if(!selected)
296 { 504 {
297 from=fieldNumber; 505 from=fieldNumber;
298 selected=true; 506 selected=true;
299 field[fieldNumber]->draw(imageFrame); 507 field[fieldNumber]->setFrame(imageFrame);
300 return; 508 return;
301 } 509 }
302 // User reselected 510 // User reselected
303 else 511 else
304 { 512 {
305 field[from]->draw(imagePat2); 513 field[from]->setFrame(NULL);
306 if(game->getBoard(t[from])==MAN1) field[from]->draw(imageMan1);
307 else field[from]->draw(imageKing1);
308 from=fieldNumber; 514 from=fieldNumber;
309 field[fieldNumber]->draw(imageFrame); 515 field[fieldNumber]->setFrame(imageFrame);
310 return; 516 return;
311 } 517 }
312 case FREE: 518 case FREE:
313 if(!selected) return; 519 if(!selected) return;
314 520
315 if(!userGo(fieldNumber)) return; 521 if(!userGo(fieldNumber)) return;
316 selected=false; 522
523 unselect();
317 524
318 if(!(game->checkMove2() || game->checkCapture2())) 525 if(!(game->checkMove2() || game->checkCapture2()))
319 { 526 {
320 gameOver=true; 527 gameOver=true;
321 statusLabel->setText(tr("Congratulation! You have won!")); 528 statusLabel->setText(tr("Congratulation! You have won!"));
322 return; 529 return;
@@ -337,46 +544,43 @@ void KCheckers::click(int fieldNumber)
337} 544}
338 545
339 546
340void KCheckers::compGo() 547void KCheckers::compGo()
341{ 548{
342 int save[32]; 549 int save[32];
343 for(int i=0;i<32;i++) save[i]=game->getBoard(t[i]); 550 for(int i=0;i<32;i++) save[i]=game->board[t[i]];
344 551
345 game->go2(); 552 game->go2();
346 553
347 for(int i=0;i<32;i++) 554 for(int i=0;i<32;i++)
348 { 555 {
349 if(game->getBoard(t[i])==save[i]) continue; 556 if(game->board[t[i]]==save[i]) continue;
350 field[i]->draw(imagePat2); 557 drawBoard(i);
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 } 558 }
356} 559}
357 560
358 561
359bool KCheckers::userGo(int to) 562bool KCheckers::userGo(int to)
360{ 563{
361 int save[32]; 564 int save[32];
362 for(int i=0;i<32;i++) save[i]=game->getBoard(t[i]); 565 for(int i=0;i<32;i++) save[i]=game->board[t[i]];
363 566
364 if(!game->go1(t[from],t[to])) 567 if(!game->go1(t[from],t[to]))
365 { 568 {
366 statusLabel->setText(tr("Incorrect course.")); 569 statusLabel->setText(tr("Incorrect course."));
367 return false; 570 return false;
368 } 571 }
369 572
573 for(int i=0;i<32;i++) undoBoard[i]=save[i];
574 gameMenu->setItemEnabled(undoID,true);
575 undoButton->setEnabled(true);
576
370 for(int i=0;i<32;i++) 577 for(int i=0;i<32;i++)
371 { 578 {
372 if(game->getBoard(t[i])==save[i]) continue; 579 if(game->board[t[i]]==save[i]) continue;
373 field[i]->draw(imagePat2); 580 drawBoard(i);
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 } 581 }
582
379 return true; 583 return true;
380} 584}
381 585
382 586
diff --git a/noncore/games/kcheckers/kcheckers.h b/noncore/games/kcheckers/kcheckers.h
index e86524f..ccf5bae 100644
--- a/noncore/games/kcheckers/kcheckers.h
+++ b/noncore/games/kcheckers/kcheckers.h
@@ -5,66 +5,86 @@
5#include <qmainwindow.h> 5#include <qmainwindow.h>
6#include <qlabel.h> 6#include <qlabel.h>
7 7
8#include "field.h" 8#include "field.h"
9#include "checkers.h" 9#include "checkers.h"
10 10
11#define WOOD 1 11#define WOODEN 1
12#define MARBLE 2 12#define GREEN 2
13#define MARBLE 3
13 14
14#define ENGLISH 11 15#define ENGLISH 11
15#define RUSSIAN 12 16#define RUSSIAN 12
16 17
17#define BEGINNER 2 18#define BEGINNER 2
18#define NOVICE 4 19#define NOVICE 4
19#define AVERAGE 5 20#define AVERAGE 6
20#define GOOD 6 21#define GOOD 7
21#define EXPERT 7 22#define EXPERT 8
22#define MASTER 8 23#define MASTER 9
24
25class QToolButton;
23 26
24 27
25class KCheckers:public QMainWindow 28class KCheckers:public QMainWindow
26{ 29{
27 Q_OBJECT 30 Q_OBJECT
28 public: 31 public:
29 KCheckers(); 32 KCheckers();
30 33
34 protected:
35 void closeEvent(QCloseEvent*);
36
31 private slots: 37 private slots:
38
39 void help();
32 void about(); 40 void about();
33 void aboutQt(); 41 void aboutQt();
34 void newGame(); 42 void newGame();
35 void click(int); // Processes the mouse clics on fields 43 void undoMove();
44 void click(int);
45 void showNumeration();
36 46
37 void setSkillBeginner() {setSkill(BEGINNER);}; 47 void setSkillBeginner() {setSkill(BEGINNER);};
38 void setSkillNovice() {setSkill(NOVICE);}; 48 void setSkillNovice() {setSkill(NOVICE);};
39 void setSkillAverage() {setSkill(AVERAGE);}; 49 void setSkillAverage() {setSkill(AVERAGE);};
40 void setSkillGood() {setSkill(GOOD);}; 50 void setSkillGood() {setSkill(GOOD);};
41 void setSkillExpert() {setSkill(EXPERT);}; 51 void setSkillExpert() {setSkill(EXPERT);};
42 void setSkillMaster() {setSkill(MASTER);}; 52 void setSkillMaster() {setSkill(MASTER);};
43 53
44 void setPatternWood() {setPattern(WOOD);}; 54 void setPatternWooden() {setPattern(WOODEN);};
55 void setPatternGreen() {setPattern(GREEN);};
45 void setPatternMarble() {setPattern(MARBLE);}; 56 void setPatternMarble() {setPattern(MARBLE);};
46 57
47 void setRulesEnglish() {setRules(ENGLISH);}; 58 void setRulesEnglish() {setRules(ENGLISH);};
48 void setRulesRussian() {setRules(RUSSIAN);}; 59 void setRulesRussian() {setRules(RUSSIAN);};
49 60
50 private: 61 private:
62
51 void compGo(); 63 void compGo();
52 bool userGo(int); 64 bool userGo(int);
53 65
54 void drawBoard(); 66 void drawBoard(int);
67 void drawNumeration();
55 void colorChange(); 68 void colorChange();
69 void unselect();
70 void readConfig();
56 71
57 void setSkill(int); 72 void setSkill(int);
58 void setRules(int); 73 void setRules(int);
59 void setPattern(int); 74 void setPattern(int);
60 75
61 int from; // Selected by user 76 int from; // Selected by user
62 int skill; 77 int skill;
63 int rules; 78 int rules;
64 int pattern; 79 int pattern;
80
81 int numID; // Show Numeration
82 int undoID; // Undo Move
83 int undoBoard[32];
84
65 bool gameOver; 85 bool gameOver;
66 bool selected; 86 bool selected;
67 bool userFirst; 87 bool userFirst;
68 88
69 Field* field[64]; // Fields of board 89 Field* field[64]; // Fields of board
70 90
@@ -72,25 +92,33 @@ class KCheckers:public QMainWindow
72 QImage* imagePat2; 92 QImage* imagePat2;
73 QImage* imageFrame; // Frame of selected field 93 QImage* imageFrame; // Frame of selected field
74 94
75 QImage* imageWood1; 95 QImage* imageWood1;
76 QImage* imageWood2; 96 QImage* imageWood2;
77 QImage* imageWood3; 97 QImage* imageWood3;
98 QImage* imageGreen1;
99 QImage* imageGreen2;
100 QImage* imageGreen3;
78 QImage* imageMarble1; 101 QImage* imageMarble1;
79 QImage* imageMarble2; 102 QImage* imageMarble2;
80 QImage* imageMarble3; 103 QImage* imageMarble3;
81 104
82 QImage* imageMan1; 105 QImage* imageMan1;
83 QImage* imageMan2; 106 QImage* imageMan2;
84 QImage* imageKing1; 107 QImage* imageKing1;
85 QImage* imageKing2; 108 QImage* imageKing2;
86 109
87 Checkers* game; 110 Checkers* game;
88 QPopupMenu* skillMenu; 111 QPopupMenu* gameMenu;
89 QPopupMenu* optionsMenu; 112 QPopupMenu* skillMenu;
90 QLabel* statusLabel; 113 QPopupMenu* optionsMenu;
114 QToolButton* undoButton;
115 QLabel* statusLabel;
116
117 static QString enNumeration;
118 static QString ruNumeration;
91 119
92 static const int t[32]; // Translate table 120 static const int t[32]; // Translate table
93 121
94}; 122};
95 123
96#endif 124#endif
diff --git a/noncore/games/kcheckers/kcheckers.pro b/noncore/games/kcheckers/kcheckers.pro
index bdbb46e..5892d3c 100644
--- a/noncore/games/kcheckers/kcheckers.pro
+++ b/noncore/games/kcheckers/kcheckers.pro
@@ -9,14 +9,13 @@ SOURCES = checkers.cpp \
9 echeckers.cpp \ 9 echeckers.cpp \
10 field.cpp \ 10 field.cpp \
11 kcheckers.cpp \ 11 kcheckers.cpp \
12 main.cpp \ 12 main.cpp \
13 rcheckers.cpp 13 rcheckers.cpp
14 INTERFACES= 14 INTERFACES=
15 INCLUDEPATH+= . \ 15 INCLUDEPATH+= $(OPIEDIR)/include
16 $(OPIEDIR)/include
17 LIBS += -lqpe 16 LIBS += -lqpe
18 DESTDIR = $(OPIEDIR)/bin 17 DESTDIR = $(OPIEDIR)/bin
19 TARGET = kcheckers 18 TARGET = kcheckers
20 19
21TRANSLATIONS = ../../i18n/pt_BR/kcheckers.ts 20TRANSLATIONS = ../../i18n/pt_BR/kcheckers.ts
22TRANSLATIONS += ../../i18n/de/kcheckers.ts 21TRANSLATIONS += ../../i18n/de/kcheckers.ts
diff --git a/noncore/games/kcheckers/main.cpp b/noncore/games/kcheckers/main.cpp
index ac86271..b8dd620 100644
--- a/noncore/games/kcheckers/main.cpp
+++ b/noncore/games/kcheckers/main.cpp
@@ -8,11 +8,11 @@
8int main(int argc, char *argv[]) 8int main(int argc, char *argv[])
9{ 9{
10 QPEApplication app(argc,argv); 10 QPEApplication app(argc,argv);
11 11
12 KCheckers kcheckers; 12 KCheckers kcheckers;
13 app.setMainWidget(&kcheckers); 13 app.setMainWidget(&kcheckers);
14 kcheckers.show(); 14 kcheckers.showMaximized();
15 15
16 return app.exec(); 16 return app.exec();
17} 17}
18 18
diff --git a/noncore/games/kcheckers/opie-kcheckers.control b/noncore/games/kcheckers/opie-kcheckers.control
index 30ee336..a1b0503 100644
--- a/noncore/games/kcheckers/opie-kcheckers.control
+++ b/noncore/games/kcheckers/opie-kcheckers.control
@@ -1,10 +1,10 @@
1Files: bin/kcheckers apps/Games/kcheckers.desktop pics/kcheckers 1Files: bin/kcheckers apps/Games/kcheckers.desktop pics/kcheckers
2Package: opie-kcheckers 2Package: opie-kcheckers
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: leseb <prudhomme@laposte.net> 5Maintainer: leseb <prudhomme@laposte.net>
6Architecture: arm 6Architecture: arm
7Version: 0.2-$SUB_VERSION 7Version: 0.3-$SUB_VERSION
8Depends: opie-base ($QPE_VERSION) 8Depends: opie-base ($QPE_VERSION)
9Description: The game of Checkers 9Description: The game of Checkers
10 A game for the Opie environment. 10 A game for the Opie environment.
diff --git a/noncore/games/kcheckers/pics/biglogo.xpm b/noncore/games/kcheckers/pics/biglogo.xpm
index 6570d88..1ca8ab1 100644
--- a/noncore/games/kcheckers/pics/biglogo.xpm
+++ b/noncore/games/kcheckers/pics/biglogo.xpm
@@ -1,41 +1,40 @@
1/* XPM */ 1/* XPM */
2static const char *biglogo[]={ 2static const char *biglogo_xpm[]={
3"32 32 6 1", 3"32 32 5 1",
4". c None", 4". c None",
5"# c #000000", 5"# c #000000",
6"a c #303030", 6"c c #d7d7d7",
7"d c #d7d7d7", 7"b c #eaeaea",
8"c c #eaeaea", 8"a c #ffffff",
9"b c #ffffff",
10"................................", 9"................................",
11"................................", 10"................................",
12"................................", 11"................................",
13"................................", 12"................................",
14"....########################....", 13"....########################....",
15"....#aaaaaaaaaaaaaaaaaaaaaa#....", 14"....########################....",
16"....#abbbbbbbbbb##########a#....", 15"....##aaaaaaaaaa############....",
17"....#abbbbbbbcbc##########a#....", 16"....##aaaaaaabab############....",
18"....#abbbbbbbbbb##########a#....", 17"....##aaaaaaaaaa############....",
19"....#abbbbbcbcbc##########a#....", 18"....##aaaaababab############....",
20"....#abbbbbbbbbb##########a#....", 19"....##aaaaaaaaaa############....",
21"....#abbbcbcbcbc##########a#....", 20"....##aaabababab############....",
22"....#abbbbbbbbbc##########a#....", 21"....##aaaaaaaaab############....",
23"....#abcbcbcbbcc##########a#....", 22"....##abababaabb############....",
24"....#abbbbbbbccc##########a#....", 23"....##aaaaaaabbb############....",
25"....#abcbcbccccc##########a#....", 24"....##abababbbbb############....",
26"....#a##########cccccccccca#....", 25"....############bbbbbbbbbb##....",
27"....#a##########cccccccccca#....", 26"....############bbbbbbbbbb##....",
28"....#a##########ccccccccdca#....", 27"....############bbbbbbbbcb##....",
29"....#a##########cccccccccca#....", 28"....############bbbbbbbbbb##....",
30"....#a##########ccccccdcdca#....", 29"....############bbbbbbcbcb##....",
31"....#a##########cccccccccca#....", 30"....############bbbbbbbbbb##....",
32"....#a##########ccccdcdcdca#....", 31"....############bbbbcbcbcb##....",
33"....#a##########cccccccccda#....", 32"....############bbbbbbbbbc##....",
34"....#a##########ccdcdcdcdca#....", 33"....############bbcbcbcbcb##....",
35"....#a##########cccccccdcda#....", 34"....############bbbbbbbcbc##....",
36"....#aaaaaaaaaaaaaaaaaaaaaa#....", 35"....########################....",
37"....########################....", 36"....########################....",
38"................................", 37"................................",
39"................................", 38"................................",
40"................................", 39"................................",
41"................................"}; 40"................................"};
diff --git a/noncore/games/kcheckers/pics/contexthelp.xpm b/noncore/games/kcheckers/pics/contexthelp.xpm
index 9447207..bc455e2 100644
--- a/noncore/games/kcheckers/pics/contexthelp.xpm
+++ b/noncore/games/kcheckers/pics/contexthelp.xpm
@@ -1,20 +1,22 @@
1/* XPM */ 1/* XPM */
2static const char *contexthelp[]={ 2static const char *contexthelp_xpm[]={
3"14 14 3 1", 3"16 16 3 1",
4". c None", 4". c None",
5"a c #000000", 5"a c #000000",
6"# c #ffffff", 6"# c #ffffff",
7"##............", 7"................",
8"#a#...........", 8".##.............",
9"#aa#.....aaaa.", 9".#a#............",
10"#aaa#...aa..aa", 10".#aa#.....aaaa..",
11"#aaaa#......aa", 11".#aaa#...aa..aa.",
12"#aaaaa#.....aa", 12".#aaaa#......aa.",
13"#aaaaaa#...aa.", 13".#aaaaa#.....aa.",
14"#aaaaaaa#.aa..", 14".#aaaaaa#...aa..",
15"#aaaa###..aa..", 15".#aaaaaaa#.aa...",
16"#a##a#........", 16".#aaaa###..aa...",
17"##..#a#...aa..", 17".#a##a#.........",
18"....#a#.......", 18".##..#a#...aa...",
19".....#........", 19".....#a#........",
20".............."}; 20"......#.........",
21"................",
22"................"};
diff --git a/noncore/games/kcheckers/pics/exit.xpm b/noncore/games/kcheckers/pics/exit.xpm
index 6fe404e..e4a31dc 100644
--- a/noncore/games/kcheckers/pics/exit.xpm
+++ b/noncore/games/kcheckers/pics/exit.xpm
@@ -1,21 +1,23 @@
1/* XPM */ 1/* XPM */
2static const char *exit[]={ 2static const char *exit_xpm[]={
3"14 14 4 1", 3"16 16 4 1",
4". c None", 4". c None",
5"# c #000000", 5"# c #000000",
6"a c #303030", 6"a c #303030",
7"b c #757575", 7"b c #757575",
8"..............", 8"................",
9"......##......", 9".......##.......",
10"......##......", 10".......##.......",
11"...#..##..#...", 11"....#..##..#....",
12"..a##.##.##a..", 12"...a##.##.##a...",
13".b##..##..##b.", 13"..b##..##..##b..",
14".a#b..##..b#a.", 14"..a#b..##..b#a..",
15".##...##...##.", 15"..##...##...##..",
16".##...##...##.", 16"..##...##...##..",
17".a#b..##..b#a.", 17"..a#b..##..b#a..",
18".b##......##b.", 18"..b##......##b..",
19"..a##b..b##a..", 19"...a##b..b##a...",
20"...a######a...", 20"....a######a....",
21"....ba##ab...."}; 21".....ba##ab.....",
22"................",
23"................"};
diff --git a/noncore/games/kcheckers/pics/green1.xpm b/noncore/games/kcheckers/pics/green1.xpm
new file mode 100644
index 0000000..208bdfb
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/green1.xpm
@@ -0,0 +1,62 @@
1/* XPM */
2static const char *green1_xpm[]={
3"32 32 27 1",
4"y c #6db06d",
5"v c #70b370",
6"s c #71b471",
7"x c #73b673",
8"w c #74b774",
9"j c #76b976",
10"l c #77ba77",
11"c c #79ba79",
12"o c #7abb7a",
13"m c #7bbe7b",
14"d c #7cbf7c",
15"i c #7ebf7e",
16"a c #7fc07f",
17"e c #80c180",
18"k c #81c281",
19"b c #82c382",
20"# c #84c584",
21". c #85c685",
22"f c #86c786",
23"g c #88c788",
24"n c #88c988",
25"r c #89ca89",
26"q c #8bca8b",
27"u c #8dcc8d",
28"p c #8ecd8e",
29"t c #90cd90",
30"h c #91ce91",
31".#a.abcacdefghabijgbf.ajdkbb.fgl",
32"abadadbamefffnadaijfffkcjoeka..l",
33"keaiaoakm#ggagpabaoaakabkmdammba",
34"mmmdmjijmebgifqadbfjdaik#mddbaak",
35"aamaajaoliab.brradgmcbambabaakba",
36"baadaaaksmae.bgttpgaoakijff.fdak",
37"g.bcabaaakabk.gnpnnkomdaobb#f.bl",
38"f.#adakabaik#b.ggggf.#ammgmk..fl",
39"f#kkkijadbambae.abfgfamaebaake#l",
40"ff#.baoaoaklekkbadffaboakijojobl",
41"ggk#bbakomdadeaak.nnadeicaocmegl",
42"gngkgggf.#aakabkiabunnabavldmaij",
43"fgabaffbdwjdaik#aadggfkaklmxjxao",
44"ffkakgfbaomcbaabaa.ffbaaemiocmak",
45"gfkbf#bakkaoakkejabaawcmdmiididl",
46"rgkk..gbebkomdadbadmlwbalmmdekay",
47"nbadbb.#abf.#ammakbaojaijjijkbba",
48"qfkjaak#kak.baijijaijcjaojaooaak",
49"ng.jomaakabkfbaoaoaaowwlmcxbamij",
50"qggawljdaik#.ffijaksbaoakajbaijo",
51"ug.bcamcbambgijijfaxakoekkaakaol",
52"ufff#baoaklegaoaorfmbajaaaaajakl",
53"gng.gkkomdadbqnuprfbabaljloadiol",
54".b#fngf.#amijanpqgg.iaijbajmab#l",
55"iik#.b.fkkxaockqu.iakaaoakmebfgl",
56"gggbaiakkawbajabgfjdaik#baabnqab",
57"fijakakabkeakbaaekmcbambakafnpad",
58"baoggdaikijbaakijwaoaklewbaeijao",
59"ijfffcbamaoakaaaobkomdadjakbaohl",
60"aobgfoaklecijjdaikf.#ammbajafrij",
61"aobakomdadkaomcbambbababakijefao",
62"llakf.#ammlllaoakleakakaklaoluul"};
diff --git a/noncore/games/kcheckers/pics/green2.xpm b/noncore/games/kcheckers/pics/green2.xpm
new file mode 100644
index 0000000..4ecfdd5
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/green2.xpm
@@ -0,0 +1,107 @@
1/* XPM */
2static const char * green2_xpm[] = {
3"32 32 72 1",
4 " c None",
5 ".c #349034",
6 "+c #348D34",
7 "@c #338433",
8 "#c #306630",
9 "$c #306B30",
10 "%c #317931",
11 "&c #328632",
12 "*c #349334",
13 "=c #359635",
14 "-c #369C36",
15 ";c #36A436",
16 ">c #369F36",
17 ",c #35A735",
18 "'c #36A136",
19 ")c #36A636",
20 "!c #369A36",
21 "~c #359935",
22 "{c #359B35",
23 "]c #328032",
24 "^c #306E30",
25 "/c #359135",
26 "(c #338A33",
27 "_c #328332",
28 ":c #338233",
29 "<c #359435",
30 "[c #327D32",
31 "}c #2F632F",
32 "|c #317731",
33 "1c #327832",
34 "2c #338C33",
35 "3c #338733",
36 "4c #2E612E",
37 "5c #2C5C2C",
38 "6c #348834",
39 "7c #327B32",
40 "8c #327332",
41 "9c #35A035",
42 "0c #338F33",
43 "ac #316A31",
44 "bc #2F672F",
45 "cc #317431",
46 "dc #348B34",
47 "ec #317231",
48 "fc #328B32",
49 "gc #327532",
50 "hc #307030",
51 "ic #2E642E",
52 "jc #348634",
53 "kc #316F31",
54 "lc #337C33",
55 "mc #2C5F2C",
56 "nc #2B5B2B",
57 "oc #254D25",
58 "pc #2F692F",
59 "qc #359E35",
60 "rc #358C35",
61 "sc #36A936",
62 "tc #38A338",
63 "uc #295429",
64 "vc #2D602D",
65 "wc #2E5F2E",
66 "xc #337F33",
67 "yc #337933",
68 "zc #306730",
69 "Ac #2F652F",
70 "Bc #285528",
71 "Cc #337233",
72 "Dc #326E32",
73 "Ec #2F6A2F",
74 "Fc #348334",
75 "Gc #358A35",
76".+@#$%&*=--;>,'),'>''>!.~->{*]^/",
77"(_:__(+.~!>'>';'>>!>>-=+{{!<+[}|",
78"1$&++23]*-->'>'>>-----~.!-~.]456",
79"11+==.78/{>>>>>>9--{!~==!=0@abc>",
80"b1/==dee+=>-'-!!-9!!!=*../7bb]]'",
81"b1.=*+11+=!!!!==!>>===+7&3[c1@]~",
82"11+**+1&+.*~-~!=!!==++((+=.f6&@~",
83"_(++33d&f.=<==*0./+2+0...=(]]]6*",
84"(]11|(f@+++==+@133@32+**.*0]7&=*",
85"71g7(.=<==.+=(h10g|]]@(f+0+33.==",
86"6@3*<~--!.6@+]11gh|h4i%]3+&+++*+",
87"@1@*~->!<+]j~=+@k@][e5}kc&@l[]3~",
88"6^(=!{=~~{-!!~/]11]7cmnoi$|chk@!",
89"/+/=-=+==>>>>>*1p^k|[]c7]2+*<==>",
90"==~=->{~>>'>-=d1|@(&++*.=<->>'>{",
91"!-->>!*{{---!<f&f+.+*{~==->''';=",
92"!-9-'-*=-~-q~+@(+.*=-!!<r->)'))~",
93"-==>'{<=<~-!*&k]+/*~-{;'-;>',;)*",
94"--~<9{~~-<**fl|]3(*!!-->>''s)t;f",
95"-q=~<->>=<//3iu[fd=~===>-'',,''3",
96"><=<~>''>!!<@vv%3.2.+d**<~9>''-@",
97"<6@==>''>--!+]7w3++]]%6@@(+=!{!+",
98"f(++=>''-{=!<+]@:@@x$bbx:81_**f@",
99"====!>'>-!==.*fy%h[|zv5AAia%@@|]",
100"--{<{'''-==<.+f6]_]36i5$$$hechc*",
101"{!-!<=~{*/+(+f+((ff(g}nzc8%]|c3+",
102"-!!<+++(_7[(3+/*~.(3@lBB1]@_^[@3",
103"==+d+$Ca}e_3f.~{~=.(6:z$7@3@]&(f",
104".+&heD$:|]@@+=!~~=<+3:]7@&3+&2=+",
105"+f&:_6|:7%%f+<=!==*+&:]:]j[+==-+",
106"2__+2_[7@@@&+=<=<++37^b[@j/{->-+",
107"1cc71|||cc1^g7l77c|cE5Ec77FGGrG["};
diff --git a/noncore/games/kcheckers/pics/green3.xpm b/noncore/games/kcheckers/pics/green3.xpm
new file mode 100644
index 0000000..f9aa154
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/green3.xpm
@@ -0,0 +1,33 @@
1/* XPM */
2static const char *green3_xpm[]={
3"32 32 2 1",
4"# c None",
5". c #00f100",
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/help.xpm b/noncore/games/kcheckers/pics/help.xpm
new file mode 100644
index 0000000..49d24b0
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/help.xpm
@@ -0,0 +1,74 @@
1/* XPM */
2static const char *help_xpm[]={
3"16 16 55 1",
4". c None",
5"e c #000000",
6"W c #010101",
7"j c #040404",
8"w c #383838",
9"# c #393939",
10"a c #3f3f3f",
11"k c #404040",
12"o c #494949",
13"x c #4a4a4a",
14"C c #4d4d4d",
15"p c #4e4e4e",
16"0 c #4f4f4f",
17"T c #6b6b6b",
18"Y c #6d6d6d",
19"E c #8c8c8c",
20"N c #999999",
21"Z c #a2a2a2",
22"U c #a8a8a8",
23"i c #b5b5b5",
24"d c #bababa",
25"R c #c0c0c0",
26"V c #c4c4c4",
27"X c #cacaca",
28"S c #cbcbcb",
29"O c #cecece",
30"M c #d1d1d1",
31"b c #d3d3d3",
32"Q c #d5d5d5",
33"c c #d9d9d9",
34"D c #dadada",
35"P c #dbdbdb",
36"f c #dddddd",
37"K c #dedede",
38"H c #e3e3e3",
39"l c #e5e5e5",
40"J c #e6e6e6",
41"L c #e7e7e7",
42"g c #e8e8e8",
43"q c #eaeaea",
44"I c #ebebeb",
45"h c #ececec",
46"G c #ededed",
47"y c #eeeeee",
48"F c #f0f0f0",
49"A c #f2f2f2",
50"B c #f3f3f3",
51"v c #f4f4f4",
52"u c #f5f5f5",
53"r c #f6f6f6",
54"m c #f7f7f7",
55"z c #f8f8f8",
56"t c #fafafa",
57"s c #fbfbfb",
58"n c #fcfcfc",
59"......###.......",
60".....abcdee.....",
61".....afghcije...",
62".....klmnnmciop.",
63".....oqrstuvpwpe",
64".....xyzzzABpCDe",
65"....#EBrrFyGeee.",
66"....kHFBBIJKj...",
67"....#JgyLHDMe...",
68".###NMOPccQRe...",
69"#nzSTTURVSRW....",
70"#icnzXYTZUUe....",
71".eeicnmSp0Ne....",
72"...eeicpwpe.....",
73".....eeppDe.....",
74".......eee......"};
diff --git a/noncore/games/kcheckers/pics/king_black.xpm b/noncore/games/kcheckers/pics/king_black.xpm
index 382ee71..c5e6703 100644
--- a/noncore/games/kcheckers/pics/king_black.xpm
+++ b/noncore/games/kcheckers/pics/king_black.xpm
@@ -1,8 +1,8 @@
1/* XPM */ 1/* XPM */
2static const char *king_black[]={ 2static const char *king_black_xpm[]={
3"28 28 8 1", 3"28 28 8 1",
4". c None", 4". c None",
5"# c #000000", 5"# c #000000",
6"f c #303030", 6"f c #303030",
7"d c #585858", 7"d c #585858",
8"b c #808080", 8"b c #808080",
diff --git a/noncore/games/kcheckers/pics/king_white.xpm b/noncore/games/kcheckers/pics/king_white.xpm
index 30932e8..f1e4257 100644
--- a/noncore/games/kcheckers/pics/king_white.xpm
+++ b/noncore/games/kcheckers/pics/king_white.xpm
@@ -1,8 +1,8 @@
1/* XPM */ 1/* XPM */
2static const char *king_white[]={ 2static const char *king_white_xpm[]={
3"28 28 8 1", 3"28 28 8 1",
4". c None", 4". c None",
5"# c #000000", 5"# c #000000",
6"d c #303030", 6"d c #303030",
7"e c #585858", 7"e c #585858",
8"f c #808080", 8"f c #808080",
diff --git a/noncore/games/kcheckers/pics/logo.xpm b/noncore/games/kcheckers/pics/logo.xpm
index a47d3de..e6cc0a0 100644
--- a/noncore/games/kcheckers/pics/logo.xpm
+++ b/noncore/games/kcheckers/pics/logo.xpm
@@ -1,23 +1,25 @@
1/* XPM */ 1/* XPM */
2static const char *logo[]={ 2static const char *logo_xpm[]={
3"14 14 6 1", 3"16 16 6 1",
4". c None", 4". c None",
5"# c #000000", 5"# c #000000",
6"d c #dcdcdc", 6"d c #dcdcdc",
7"c c #e1e1e1", 7"c c #e1e1e1",
8"b c #efefef", 8"b c #efefef",
9"a c #ffffff", 9"a c #ffffff",
10"..............", 10"................",
11".############.", 11"................",
12".#aaaab######.", 12"..############..",
13".#aaaaa######.", 13"..#aaaab######..",
14".#aabab######.", 14"..#aaaaa######..",
15".#aaabb######.", 15"..#aabab######..",
16".#babbb######.", 16"..#aaabb######..",
17".######bcbbc#.", 17"..#babbb######..",
18".######bbbbd#.", 18"..######bcbbc#..",
19".######bbcdd#.", 19"..######bbbbd#..",
20".######bcddd#.", 20"..######bbcdd#..",
21".######cdddd#.", 21"..######bcddd#..",
22".############.", 22"..######cdddd#..",
23".............."}; 23"..############..",
24"................",
25"................"};
diff --git a/noncore/games/kcheckers/pics/man_black.xpm b/noncore/games/kcheckers/pics/man_black.xpm
index e40a265..c07b1d6 100644
--- a/noncore/games/kcheckers/pics/man_black.xpm
+++ b/noncore/games/kcheckers/pics/man_black.xpm
@@ -1,8 +1,8 @@
1/* XPM */ 1/* XPM */
2static const char *man_black[]={ 2static const char *man_black_xpm[]={
3"28 28 8 1", 3"28 28 8 1",
4". c None", 4". c None",
5"# c #000000", 5"# c #000000",
6"c c #585858", 6"c c #585858",
7"a c #808080", 7"a c #808080",
8"f c #a0a0a0", 8"f c #a0a0a0",
diff --git a/noncore/games/kcheckers/pics/man_white.xpm b/noncore/games/kcheckers/pics/man_white.xpm
index b0968db..59556fe 100644
--- a/noncore/games/kcheckers/pics/man_white.xpm
+++ b/noncore/games/kcheckers/pics/man_white.xpm
@@ -1,8 +1,8 @@
1/* XPM */ 1/* XPM */
2static const char *man_white[]={ 2static const char *man_white_xpm[]={
3"28 28 10 1", 3"28 28 10 1",
4". c None", 4". c None",
5"# c #000000", 5"# c #000000",
6"g c #808080", 6"g c #808080",
7"d c #a0a0a0", 7"d c #a0a0a0",
8"f c #b3b3b3", 8"f c #b3b3b3",
diff --git a/noncore/games/kcheckers/pics/marble1.xpm b/noncore/games/kcheckers/pics/marble1.xpm
index 124cbd2..087a024 100644
--- a/noncore/games/kcheckers/pics/marble1.xpm
+++ b/noncore/games/kcheckers/pics/marble1.xpm
@@ -1,9 +1,9 @@
1/* XPM */ 1/* XPM */
2static const char *marble1[]={ 2static const char *marble1_xpm[]={
3"28 28 209 2", 3"32 32 209 2",
4"#Y c #cbcee3", 4"#Y c #cbcee3",
5".s c #cccfe4", 5".s c #cccfe4",
6".X c #cdcfe5", 6".X c #cdcfe5",
7"ba c #cdd0e2", 7"ba c #cdd0e2",
8"ad c #cdd0e5", 8"ad c #cdd0e5",
9"a7 c #ced0e3", 9"a7 c #ced0e3",
@@ -234,7 +234,11 @@ static const char *marble1[]={
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", 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", 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", 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", 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", 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", 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"}; 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",
241"#w.#bg.j#v.F.i.d.d#y.f#O.5.3#P.3#ya0#q#s#u#k.O.qbhbi#.#Q#k.b.bbj",
242"#f.C#w#w.F#e.B.b.lbk#Y.W##.6bbbl.O.w.L.A.l#q#y.B.H.h.#.B.##t.Mac",
243".H.F.C#w.3.e.i.i.eaZad.W.0.y#t#m.z#k#l.c.d.E.b#i#8.a.d.##P.z.v.O",
244"#V.i.h#f#e.i.e.e.e#Qbm.t.y#k.r.yaf#F#nbn.d.i.h#h#e#v.o#wbo.q#l#l"};
diff --git a/noncore/games/kcheckers/pics/marble2.xpm b/noncore/games/kcheckers/pics/marble2.xpm
index f31ee0b..6348bb9 100644
--- a/noncore/games/kcheckers/pics/marble2.xpm
+++ b/noncore/games/kcheckers/pics/marble2.xpm
@@ -1,8 +1,8 @@
1/* XPM */ 1/* XPM */
2static const char *marble2[]={ 2static const char *marble2_xpm[]={
3"32 32 560 2", 3"32 32 560 2",
4"dC c #6079b1", 4"dC c #6079b1",
5"et c #6079b4", 5"et c #6079b4",
6"fU c #607ab1", 6"fU c #607ab1",
7"fT c #607ab2", 7"fT c #607ab2",
8"f5 c #607bb1", 8"f5 c #607bb1",
diff --git a/noncore/games/kcheckers/pics/marble3.xpm b/noncore/games/kcheckers/pics/marble3.xpm
index 36c9b17..3b70b4f 100644
--- a/noncore/games/kcheckers/pics/marble3.xpm
+++ b/noncore/games/kcheckers/pics/marble3.xpm
@@ -1,8 +1,8 @@
1/* XPM */ 1/* XPM */
2static const char *marble3[]={ 2static const char *marble3_xpm[]={
3"28 28 2 1", 3"28 28 2 1",
4"# c None", 4"# c None",
5". c #0000ff", 5". c #0000ff",
6"............................", 6"............................",
7"............................", 7"............................",
8"..########################..", 8"..########################..",
diff --git a/noncore/games/kcheckers/pics/undo.xpm b/noncore/games/kcheckers/pics/undo.xpm
new file mode 100644
index 0000000..313e1d0
--- a/dev/null
+++ b/noncore/games/kcheckers/pics/undo.xpm
@@ -0,0 +1,24 @@
1/* XPM */
2static const char *undo_xpm[]={
3"16 16 5 1",
4". c None",
5"# c #000000",
6"c c #a0a0a0",
7"b c #dcdcdc",
8"a c #ffffff",
9"................",
10"................",
11".......#........",
12"......##........",
13".....#a#........",
14"....#aa########.",
15"...#aabaaaaaab#.",
16"..#aabbbbbbbbc#.",
17"...#abbccccccc#.",
18"....#ac########.",
19".....#a#........",
20"......##........",
21".......#........",
22"................",
23"................",
24"................"};
diff --git a/noncore/games/kcheckers/pics/wood1.xpm b/noncore/games/kcheckers/pics/wood1.xpm
index 866f8d9..eb2d71d 100644
--- a/noncore/games/kcheckers/pics/wood1.xpm
+++ b/noncore/games/kcheckers/pics/wood1.xpm
@@ -1,8 +1,8 @@
1/* XPM */ 1/* XPM */
2static const char *wood1[]={ 2static const char *wood1_xpm[]={
3"32 32 82 2", 3"32 32 82 2",
4"#c c #9c825c", 4"#c c #9c825c",
5".H c #9c8664", 5".H c #9c8664",
6"#p c #a48a64", 6"#p c #a48a64",
7"#f c #a48a6c", 7"#f c #a48a6c",
8".I c #a48e64", 8".I c #a48e64",
diff --git a/noncore/games/kcheckers/pics/wood2.xpm b/noncore/games/kcheckers/pics/wood2.xpm
index c2ff364..b786bfb 100644
--- a/noncore/games/kcheckers/pics/wood2.xpm
+++ b/noncore/games/kcheckers/pics/wood2.xpm
@@ -1,114 +1,115 @@
1/* XPM */ 1/* XPM */
2static const char *wood2[]={ 2static const char * wood2_xpm[] = {
3"32 32 79 2", 3"32 32 80 1",
4"#k c #484c4d", 4 " c None",
5"#l c #484d47", 5 ".c #4B4B3F",
6"#m c #494a46", 6 "+c #49453D",
7"#d c #4c4841", 7 "@c #434438",
8"#j c #4c4c48", 8 "#c #4C4E40",
9".1 c #4e554d", 9 "$c #4F4C40",
10".9 c #4f483f", 10 "%c #535043",
11"#e c #4f4c44", 11 "&c #555849",
12".0 c #4f4f48", 12 "*c #5C584B",
13".Z c #4f524d", 13 "=c #645F4B",
14".2 c #4f564e", 14 "-c #645B49",
15".X c #515450", 15 ";c #645844",
16".W c #51564e", 16 ">c #5B5340",
17".V c #52574f", 17 ",c #585340",
18"#. c #544e45", 18 "'c #584C3D",
19".U c #545047", 19 ")c #554C38",
20".Y c #54524a", 20 "!c #4F4C3B",
21".8 c #575046", 21 "~c #534C41",
22".T c #575248", 22 "{c #584F40",
23".7 c #57554c", 23 "]c #565641",
24".t c #57564d", 24 "^c #585345",
25".B c #575751", 25 "/c #534E40",
26".u c #58574f", 26 "(c #414035",
27".a c #585950", 27 "_c #434137",
28".A c #585d52", 28 ":c #484337",
29".v c #5c584f", 29 "<c #4C4C3D",
30".G c #5d564a", 30 "[c #4C4B3A",
31".# c #5d5a54", 31 "}c #4B493A",
32".Q c #5e5649", 32 "|c #4B4537",
33".z c #5e5a4f", 33 "1c #43493B",
34".y c #5e5d51", 34 "2c #41413A",
35"Qt c #5e5e55", 35 "3c #4B4B41",
36".C c #5e5e57", 36 "4c #535040",
37".E c #5f5a4f", 37 "5c #4C4537",
38".x c #5f5e51", 38 "6c #4F493D",
39".w c #5f5f54", 39 "7c #494031",
40".b c #5f6056", 40 "8c #4F4936",
41".3 c #615749", 41 "9c #5C5641",
42".H c #615d4e", 42 "0c #6C5F48",
43".F c #615d54", 43 "ac #71644C",
44".n c #615f52", 44 "bc #614F3B",
45".c c #615f56", 45 "cc #665841",
46".S c #625a4d", 46 "dc #665038",
47".o c #645f57", 47 "ec #645843",
48".s c #646056", 48 "fc #5B4E3D",
49".D c #646256", 49 "gc #4B4030",
50".d c #646258", 50 "hc #554B37",
51".R c #655e4f", 51 "ic #504535",
52".m c #655f50", 52 "jc #413B2F",
53".e c #65675d", 53 "kc #3D382E",
54".q c #666657", 54 "lc #3B4137",
55".4 c #675d4e", 55 "mc #3A4036",
56".l c #675f54", 56 "nc #3A3D38",
57".p c #676156", 57 "oc #3D3B31",
58".k c #676456", 58 "pc #373B35",
59".r c #67645a", 59 "qc #37372F",
60".P c #696054", 60 "rc #363F35",
61".j c #696456", 61 "sc #374036",
62".5 c #69665c", 62 "tc #4F4130",
63"#i c #696759", 63 "uc #584936",
64".I c #6a6657", 64 "vc #5B5648",
65".f c #6a675e", 65 "wc #7B6448",
66"#h c #6c6a5d", 66 "xc #413F33",
67".L c #6d6152", 67 "yc #41382D",
68".O c #6f6758", 68 "zc #372F25",
69".i c #6f6759", 69 "Ac #3D362B",
70".h c #6f695d", 70 "Bc #6F5840",
71".g c #6f6c5e", 71 "Cc #745F41",
72"#f c #6f6f62", 72 "Dc #896C4B",
73".N c #706250", 73 "Ec #967B58",
74".M c #706757", 74 "Fc #332F27",
75".J c #746c5c", 75 "Gc #37332A",
76"## c #766756", 76 "Hc #646450",
77".K c #776f5f", 77 "Ic #7B6C50",
78"#a c #796c57", 78 "Jc #5F5C49",
79".6 c #7d6f5c", 79 "Kc #5B5844",
80"#g c #7d7462", 80 "Lc #33332F",
81"#b c #85745e", 81 "Mc #2F3335",
82"#c c #8d7d67", 82 "Nc #2F352E",
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", 83 "Oc #30312D",
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", 84"...+@@@+.#$$%%%&**=-;;;>,')!~~{{",
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", 85"####$$$$%%%%%%$%]^/////,//!%%^^^",
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", 86"(_::+++++<[}}|}||:_@@1}}}}.$$#..",
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", 87"~~$.+$$$~]%%//}||:_2@@@...3.}1@1",
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", 88"~~~~~||[[////4![[5@@@__((___::|@",
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", 89"66!//{{//7|5558)'>>9-===--;-000a",
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", 90">>{{{--------=---;bbcccbbbbbdbbb",
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", 91";;99>;;--;;;--;ee9fbbff9cccccccc",
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", 92"55ggg558h888hhi8888888i888hh8888",
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", 93"88hh)h){>999ee9,')))'''h855|[[6!",
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", 94"e9>f'hhhh))hh8[666>>>>>;;;;*^$||",
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", 95"(((((jjkk(((lmmll222222nnnnokkkk",
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", 96"$$<}_@__(ooopqpppprrrrrssss(_:|[",
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", 97"ggt8hiih)fff'{'''{/////]]]]~~~$$",
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", 98"uuuuubbcc00000ecc-eeeee9999vv^~~",
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", 99"cc0aaaawwwwwa0aaaaaa00-ce>f66666",
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", 100"77xjyzzzzzzzzzzzzzAyjxx5666^^^^^",
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", 101"g77yy7yyyggttgh'{>v*****vvv~~~~~",
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", 102"bbdBBBBCwwwwCCbuuutggyy8iit/~~~~",
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", 103"BBCwCCCCCDwDEDDwCd))h8[[:xjAkkkk",
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", 104"CwDDDDDDDDDDDCduuih855:|:@2||:::",
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", 105"uudddBCCwddduttttutggjjyAFzzzGGG",
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", 106">becCCCCCDDwwDwwCBcbbb''{vv**HHH",
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", 107"yyygtuudCwCCddBCwDDDIIIcf855:(jj",
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", 108"cccBBBBBBddddddddddbuuigggg6[[[[",
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", 109"uuuuudddBddddddbbbuuuu''{{{^%~!!",
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", 110">>>ecBBBBCBcbbeve>f'h856[::|:(jj",
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", 111"**v{'huuuttgggii55it55[!~^^HH==*",
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", 112"33%v*vv-=aa==-JJJK{/![+@@22xjjxx",
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", 113"jjjkkGGzzLMMNOqqqqpoomm2222}||||",
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"}; 114"ff''hhhhi$$~$$[!$/^v^^{{{{{^^^^^",
115"BCCwwIIww==Jv^^]^%/$<<[<<<<[6666"};
diff --git a/noncore/games/kcheckers/pics/wood3.xpm b/noncore/games/kcheckers/pics/wood3.xpm
index 5f4f7e2..6c919fa 100644
--- a/noncore/games/kcheckers/pics/wood3.xpm
+++ b/noncore/games/kcheckers/pics/wood3.xpm
@@ -1,11 +1,11 @@
1/* XPM */ 1/* XPM */
2static const char *wood3[]={ 2static const char *wood3_xpm[]={
3"28 28 2 1", 3"28 28 2 1",
4"# c None", 4"# c None",
5". c #ff8c00", 5". c #ff9900",
6"............................", 6"............................",
7"............................", 7"............................",
8"..########################..", 8"..########################..",
9"..########################..", 9"..########################..",
10"..########################..", 10"..########################..",
11"..########################..", 11"..########################..",
diff --git a/noncore/games/kcheckers/rcheckers.h b/noncore/games/kcheckers/rcheckers.h
index d44bfd1..01913a5 100644
--- a/noncore/games/kcheckers/rcheckers.h
+++ b/noncore/games/kcheckers/rcheckers.h
@@ -1,11 +1,11 @@
1 1
2#ifndef RCHECKERS_H 2#ifndef RCHECKERS_H
3#define RCHECKERS_H 3#define RCHECKERS_H
4 4
5#include <checkers.h> 5#include "checkers.h"
6 6
7 7
8class RCheckers:public Checkers 8class RCheckers:public Checkers
9{ 9{
10 public: 10 public:
11 RCheckers(int skill):Checkers(skill){}; 11 RCheckers(int skill):Checkers(skill){};
diff --git a/pics/kcheckers/KCheckers.xpm b/pics/kcheckers/KCheckers.xpm
index 6570d88..1ca8ab1 100644
--- a/pics/kcheckers/KCheckers.xpm
+++ b/pics/kcheckers/KCheckers.xpm
@@ -1,41 +1,40 @@
1/* XPM */ 1/* XPM */
2static const char *biglogo[]={ 2static const char *biglogo_xpm[]={
3"32 32 6 1", 3"32 32 5 1",
4". c None", 4". c None",
5"# c #000000", 5"# c #000000",
6"a c #303030", 6"c c #d7d7d7",
7"d c #d7d7d7", 7"b c #eaeaea",
8"c c #eaeaea", 8"a c #ffffff",
9"b c #ffffff",
10"................................", 9"................................",
11"................................", 10"................................",
12"................................", 11"................................",
13"................................", 12"................................",
14"....########################....", 13"....########################....",
15"....#aaaaaaaaaaaaaaaaaaaaaa#....", 14"....########################....",
16"....#abbbbbbbbbb##########a#....", 15"....##aaaaaaaaaa############....",
17"....#abbbbbbbcbc##########a#....", 16"....##aaaaaaabab############....",
18"....#abbbbbbbbbb##########a#....", 17"....##aaaaaaaaaa############....",
19"....#abbbbbcbcbc##########a#....", 18"....##aaaaababab############....",
20"....#abbbbbbbbbb##########a#....", 19"....##aaaaaaaaaa############....",
21"....#abbbcbcbcbc##########a#....", 20"....##aaabababab############....",
22"....#abbbbbbbbbc##########a#....", 21"....##aaaaaaaaab############....",
23"....#abcbcbcbbcc##########a#....", 22"....##abababaabb############....",
24"....#abbbbbbbccc##########a#....", 23"....##aaaaaaabbb############....",
25"....#abcbcbccccc##########a#....", 24"....##abababbbbb############....",
26"....#a##########cccccccccca#....", 25"....############bbbbbbbbbb##....",
27"....#a##########cccccccccca#....", 26"....############bbbbbbbbbb##....",
28"....#a##########ccccccccdca#....", 27"....############bbbbbbbbcb##....",
29"....#a##########cccccccccca#....", 28"....############bbbbbbbbbb##....",
30"....#a##########ccccccdcdca#....", 29"....############bbbbbbcbcb##....",
31"....#a##########cccccccccca#....", 30"....############bbbbbbbbbb##....",
32"....#a##########ccccdcdcdca#....", 31"....############bbbbcbcbcb##....",
33"....#a##########cccccccccda#....", 32"....############bbbbbbbbbc##....",
34"....#a##########ccdcdcdcdca#....", 33"....############bbcbcbcbcb##....",
35"....#a##########cccccccdcda#....", 34"....############bbbbbbbcbc##....",
36"....#aaaaaaaaaaaaaaaaaaaaaa#....", 35"....########################....",
37"....########################....", 36"....########################....",
38"................................", 37"................................",
39"................................", 38"................................",
40"................................", 39"................................",
41"................................"}; 40"................................"};