summaryrefslogtreecommitdiffstats
path: root/katomic
diff options
context:
space:
mode:
Diffstat (limited to 'katomic')
-rw-r--r--katomic/Makefile.am35
-rw-r--r--katomic/abilder.pngbin0 -> 18617 bytes
-rw-r--r--katomic/abilder.svgzbin0 -> 9890 bytes
-rw-r--r--katomic/atom.h35
-rw-r--r--katomic/configbox.cpp59
-rw-r--r--katomic/configbox.h35
-rw-r--r--katomic/feld.cpp644
-rw-r--r--katomic/feld.h116
-rw-r--r--katomic/gamewidget.cpp230
-rw-r--r--katomic/gamewidget.h74
-rw-r--r--katomic/hi128-app-katomic.pngbin0 -> 18820 bytes
-rw-r--r--katomic/hi16-app-katomic.pngbin0 -> 798 bytes
-rw-r--r--katomic/hi22-app-katomic.pngbin0 -> 4145 bytes
-rw-r--r--katomic/hi32-app-katomic.pngbin0 -> 2425 bytes
-rw-r--r--katomic/hi48-app-katomic.pngbin0 -> 4944 bytes
-rw-r--r--katomic/hi64-app-katomic.pngbin0 -> 6575 bytes
-rw-r--r--katomic/katomic.desktop73
-rw-r--r--katomic/katomicui.rc6
-rw-r--r--katomic/levels/level_121
-rw-r--r--katomic/levels/level_1024
-rw-r--r--katomic/levels/level_1128
-rw-r--r--katomic/levels/level_1229
-rw-r--r--katomic/levels/level_1328
-rw-r--r--katomic/levels/level_1426
-rw-r--r--katomic/levels/level_1527
-rw-r--r--katomic/levels/level_1631
-rw-r--r--katomic/levels/level_1728
-rw-r--r--katomic/levels/level_1823
-rw-r--r--katomic/levels/level_1926
-rw-r--r--katomic/levels/level_225
-rw-r--r--katomic/levels/level_2024
-rw-r--r--katomic/levels/level_2130
-rw-r--r--katomic/levels/level_2228
-rw-r--r--katomic/levels/level_2324
-rw-r--r--katomic/levels/level_2429
-rw-r--r--katomic/levels/level_2527
-rw-r--r--katomic/levels/level_2627
-rw-r--r--katomic/levels/level_2733
-rw-r--r--katomic/levels/level_2832
-rw-r--r--katomic/levels/level_2931
-rw-r--r--katomic/levels/level_326
-rw-r--r--katomic/levels/level_3040
-rw-r--r--katomic/levels/level_3129
-rw-r--r--katomic/levels/level_3231
-rw-r--r--katomic/levels/level_3327
-rw-r--r--katomic/levels/level_3433
-rw-r--r--katomic/levels/level_3531
-rw-r--r--katomic/levels/level_3623
-rw-r--r--katomic/levels/level_3741
-rw-r--r--katomic/levels/level_3830
-rw-r--r--katomic/levels/level_3939
-rw-r--r--katomic/levels/level_426
-rw-r--r--katomic/levels/level_4037
-rw-r--r--katomic/levels/level_4134
-rw-r--r--katomic/levels/level_4226
-rw-r--r--katomic/levels/level_4342
-rw-r--r--katomic/levels/level_4443
-rw-r--r--katomic/levels/level_4536
-rw-r--r--katomic/levels/level_4629
-rw-r--r--katomic/levels/level_4731
-rw-r--r--katomic/levels/level_4835
-rw-r--r--katomic/levels/level_4936
-rw-r--r--katomic/levels/level_528
-rw-r--r--katomic/levels/level_5038
-rw-r--r--katomic/levels/level_5131
-rw-r--r--katomic/levels/level_5241
-rw-r--r--katomic/levels/level_5330
-rw-r--r--katomic/levels/level_5439
-rw-r--r--katomic/levels/level_5536
-rw-r--r--katomic/levels/level_5637
-rw-r--r--katomic/levels/level_5725
-rw-r--r--katomic/levels/level_5828
-rw-r--r--katomic/levels/level_5939
-rw-r--r--katomic/levels/level_626
-rw-r--r--katomic/levels/level_6028
-rw-r--r--katomic/levels/level_6130
-rw-r--r--katomic/levels/level_6231
-rw-r--r--katomic/levels/level_6334
-rw-r--r--katomic/levels/level_6434
-rw-r--r--katomic/levels/level_6539
-rw-r--r--katomic/levels/level_6631
-rw-r--r--katomic/levels/level_6731
-rw-r--r--katomic/levels/level_6839
-rw-r--r--katomic/levels/level_6943
-rw-r--r--katomic/levels/level_727
-rw-r--r--katomic/levels/level_7030
-rw-r--r--katomic/levels/level_7137
-rw-r--r--katomic/levels/level_7238
-rw-r--r--katomic/levels/level_7332
-rw-r--r--katomic/levels/level_7434
-rw-r--r--katomic/levels/level_7530
-rw-r--r--katomic/levels/level_7637
-rw-r--r--katomic/levels/level_7738
-rw-r--r--katomic/levels/level_7841
-rw-r--r--katomic/levels/level_7957
-rw-r--r--katomic/levels/level_826
-rw-r--r--katomic/levels/level_8029
-rw-r--r--katomic/levels/level_8137
-rw-r--r--katomic/levels/level_8244
-rw-r--r--katomic/levels/level_8346
-rw-r--r--katomic/levels/level_927
-rw-r--r--katomic/main.cpp68
-rw-r--r--katomic/molek.cpp158
-rw-r--r--katomic/molek.h52
-rw-r--r--katomic/molek.pngbin0 -> 2441 bytes
-rw-r--r--katomic/settings.h36
-rw-r--r--katomic/toplevel.cpp119
-rw-r--r--katomic/toplevel.h66
108 files changed, 4480 insertions, 0 deletions
diff --git a/katomic/Makefile.am b/katomic/Makefile.am
new file mode 100644
index 00000000..4d554b33
--- /dev/null
+++ b/katomic/Makefile.am
@@ -0,0 +1,35 @@
+
+INCLUDES = -I$(top_srcdir)/libkdegames -I$(top_srcdir)/libkdegames/highscore $(all_includes)
+katomic_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+katomic_LDADD = $(LIB_KDEGAMES)
+katomic_DEPENDENCIES = $(LIB_KDEGAMES_DEP)
+METASOURCES = AUTO
+
+bin_PROGRAMS = katomic
+katomic_SOURCES = feld.cpp molek.cpp main.cpp toplevel.cpp configbox.cpp\
+ gamewidget.cpp
+
+pics_DATA = abilder.png molek.png
+picsdir = $(appdir)/pics
+
+xdg_apps_DATA = katomic.desktop
+
+EXTRA_DIST = $(pics_DATA)
+KDE_ICON = katomic
+
+appdir = $(kde_datadir)/katomic
+app_DATA = katomicui.rc
+
+messages: rc.cpp
+ : > levelnames.cpp ;\
+ for i in levels/level_*; do \
+ egrep '^Name=' $$i | sed -e 's#^Name=\(.*\)$$#i18n(\"\1\")#' >> levelnames.cpp ;\
+ done
+ $(XGETTEXT) *.cpp -o $(podir)/katomic.pot
+ rm -f levelnames.cpp
+
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(kde_datadir)/katomic
+ -rm -rf $(DESTDIR)$(kde_datadir)/katomic/levels
+ mkdir $(DESTDIR)$(kde_datadir)/katomic/levels
+ cp $(srcdir)/levels/level_* $(DESTDIR)$(kde_datadir)/katomic/levels/
diff --git a/katomic/abilder.png b/katomic/abilder.png
new file mode 100644
index 00000000..99c60a0c
--- /dev/null
+++ b/katomic/abilder.png
Binary files differ
diff --git a/katomic/abilder.svgz b/katomic/abilder.svgz
new file mode 100644
index 00000000..8a412b3f
--- /dev/null
+++ b/katomic/abilder.svgz
Binary files differ
diff --git a/katomic/atom.h b/katomic/atom.h
new file mode 100644
index 00000000..19d9b087
--- /dev/null
+++ b/katomic/atom.h
@@ -0,0 +1,35 @@
+#ifndef ATOM_H
+#define ATOM_H
+
+#define MAX_CONNS_PER_ATOM 8
+
+class atom {
+ public:
+ char obj;
+ char conn[MAX_CONNS_PER_ATOM + 1];
+
+ bool operator==(const atom& rhs) const { return (rhs.obj == obj && !strcmp(rhs.conn,conn)); }
+ bool isEmpty() const { return (obj == 0 || obj == '.'); }
+};
+
+inline char int2atom(int i) {
+ if (!i)
+ return '.';
+ if (i == 254)
+ return '#';
+ if (i <= 9)
+ return i + '0';
+ return i + 'a' - 10;
+}
+
+inline int atom2int(char ch) {
+ if (ch == '.' || ch == 0)
+ return 0;
+ if (ch == '#')
+ return 254;
+ if (ch >= '0' && ch <= '9')
+ return ch - '0';
+ return ch - 'a' + 10;
+}
+
+#endif
diff --git a/katomic/configbox.cpp b/katomic/configbox.cpp
new file mode 100644
index 00000000..ea546d89
--- /dev/null
+++ b/katomic/configbox.cpp
@@ -0,0 +1,59 @@
+/* configbox.cpp
+ *
+ * 1999 (c) Cristian Tibirna (tibirna@kde.org)
+ *
+ */
+
+#include "configbox.h"
+#include <klocale.h>
+#include <kglobal.h>
+#include <kconfig.h>
+#include <qlayout.h>
+#include <qgroupbox.h>
+#include <qslider.h>
+
+#include "settings.h"
+
+extern Options settings;
+
+ConfigBox::ConfigBox ( QWidget *parent, const char *name)
+ : KDialogBase ( parent, name, true, i18n("Configure"), Ok | Cancel, Ok, true )
+{
+ QWidget *page = makeMainWidget();
+
+ QGridLayout *glay = new QGridLayout (page, 4, 5, 0, spacingHint());
+ glay->setRowStretch(0, 1);
+ glay->setRowStretch(3, 1);
+ glay->setColStretch(0, 1);
+ glay->setColStretch(4, 1);
+
+ glay->addWidget(new QLabel(i18n("Animation speed:"),page), 2, 1);
+
+ disp = new QLCDNumber(page);
+ glay->addWidget(disp, 1, 2);
+ disp->display(1);
+
+ speed = new QSlider(1, 10, 1, 1, QSlider::Horizontal, page);
+ glay->addMultiCellWidget(speed, 2, 2, 2, 3);
+
+ connect(speed, SIGNAL(valueChanged(int)), disp, SLOT(display(int)));
+
+ speed->setValue(settings.anim_speed);
+ incInitialSize(QSize(20,20), true);
+}
+
+void ConfigBox::slotOk()
+{
+ settings.anim_speed = speed->value();
+ settings.changed = true;
+
+ emit speedChanged();
+
+ accept();
+}
+
+ConfigBox::~ConfigBox()
+{
+}
+
+#include "configbox.moc"
diff --git a/katomic/configbox.h b/katomic/configbox.h
new file mode 100644
index 00000000..0acdfd0d
--- /dev/null
+++ b/katomic/configbox.h
@@ -0,0 +1,35 @@
+/* configbox.h
+ *
+ * 1999 (c) Cristian Tibirna (tibirna@kde.org)
+ *
+ */
+
+#ifndef CONFIGBOX_H
+#define CONFIGBOX_H
+
+#include <qlabel.h>
+#include <qslider.h>
+#include <qlcdnumber.h>
+
+#include <kdialogbase.h>
+
+class ConfigBox : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ ConfigBox ( QWidget *, const char* name );
+ ~ConfigBox();
+
+protected slots:
+ void slotOk();
+
+signals:
+ void speedChanged();
+
+private:
+ QSlider *speed;
+ QLCDNumber *disp;
+};
+
+#endif
diff --git a/katomic/feld.cpp b/katomic/feld.cpp
new file mode 100644
index 00000000..47af46d5
--- /dev/null
+++ b/katomic/feld.cpp
@@ -0,0 +1,644 @@
+/****************************************************************
+**
+** Implementation Feld class, derieved from Qt tutorial 8
+**
+****************************************************************/
+
+// bemerkungen : wenn paintEvent aufgerufen wird, wird das komplette
+// widget gelöscht und nur die sachen gezeichnet, die in
+// paintEvent stehen ! sollen dinge z.b nur bei maustasten-
+// druck gezeichnet werden, so muß dies in mousePressEvent
+// stehen !
+// paintEvent wird aufgerufen, falls fenster überdeckt wird,
+// oder auch einfach bewegt wird
+
+#include <kiconloader.h>
+#include <kglobal.h>
+#include <kstandarddirs.h>
+#include <ksimpleconfig.h>
+#include "molek.h"
+#include "feld.h"
+#include "settings.h"
+
+#if FIELD_SIZE < MOLEK_SIZE
+#error Molecule size (MOLEK_SIZE) must be <= field size (FIELD_SIZE)
+#endif
+
+extern Options settings;
+
+Feld::Feld( QWidget *parent, const char *name ) :
+ QWidget( parent, name ),
+ data(locate("appdata", "pics/abilder.png")),
+ undoBegin (0), undoSize (0), redoSize (0)
+{
+ anim = false;
+ dir = None;
+ sprite = QPixmap (30, 30);
+
+ cx = -1;
+ cy = -1;
+
+ point = new QPoint [1];
+
+ moving = false;
+ chosen = false;
+
+ setMouseTracking(true);
+
+ setFocusPolicy(QWidget::StrongFocus);
+ setBackgroundColor( QColor( 0, 0, 0) );
+
+ setFixedSize(15 * 30, 15 * 30);
+}
+
+Feld::~Feld ()
+{
+ delete [] point;
+}
+
+void Feld::resetValidDirs()
+{
+ for (int j = 0; j < FIELD_SIZE; j++)
+ for (int i = 0; i < FIELD_SIZE; i++)
+ if (feld[i][j] >= 150 && feld[i][j] <= 153)
+ {
+ feld[i][j] = 0;
+ putNonAtom(i,j, Feld::None);
+ }
+}
+
+void Feld::load (const KSimpleConfig& config)
+{
+ if(moving)
+ killTimers();
+
+ mol->load(config);
+
+ QString key;
+
+ for (int j = 0; j < FIELD_SIZE; j++) {
+
+ key.sprintf("feld_%02d", j);
+ QString line = config.readEntry(key);
+
+ for (int i = 0; i < FIELD_SIZE; i++)
+ feld[i][j] = atom2int(line[i].latin1());
+
+ }
+
+ moves = 0;
+ chosen = false;
+ moving = false;
+
+ undoSize = redoSize = undoBegin = 0;
+ emit enableUndo(false);
+ emit enableRedo(false);
+
+ xpos = ypos = 0;
+ nextAtom();
+}
+
+void Feld::mousePressEvent (QMouseEvent *e)
+{
+ if (moving)
+ return;
+
+ int x = e->pos ().x () / 30;
+ int y = e->pos ().y () / 30;
+
+ if ( feld [x] [y] == 150)
+ startAnimation (Feld::MoveUp);
+ else if ( feld [x] [y] == 151)
+ startAnimation (Feld::MoveLeft);
+ else if ( feld [x] [y] == 152)
+ startAnimation (Feld::MoveDown);
+ else if ( feld [x] [y] == 153)
+ startAnimation (Feld::MoveRight);
+ else if (feld [x] [y] != 254 && feld [x] [y] != 0) {
+ chosen = true;
+ xpos = x;
+ ypos = y;
+ dir = None;
+ resetValidDirs();
+ } else {
+ resetValidDirs();
+ chosen = false;
+ }
+ emitStatus();
+}
+
+const atom& Feld::getAtom(uint index) const
+{
+ return mol->getAtom(index);
+}
+
+
+void Feld::nextAtom()
+{
+ int x = xpos, y;
+
+ // make sure we don't check the current atom :-)
+ if (ypos++ >= 15) ypos = 0;
+
+ while(1)
+ {
+ for (y = ypos; y < FIELD_SIZE; y++)
+ {
+ if ( feld [x] [y] != 0 &&
+ feld [x] [y] != 254 &&
+ feld [x] [y] != 150 &&
+ feld [x] [y] != 151 &&
+ feld [x] [y] != 152 &&
+ feld [x] [y] != 153 )
+ {
+ xpos = x; ypos = y;
+ chosen = true;
+ resetValidDirs();
+ emitStatus();
+ return;
+ }
+ }
+ ypos = 0;
+ x++;
+ if (x >= FIELD_SIZE) x = 0;
+ }
+
+}
+
+
+void Feld::previousAtom()
+{
+ int x = xpos, y;
+
+ // make sure we don't check the current atom :-)
+ if (ypos-- <= 0) ypos = FIELD_SIZE-1;
+
+ while(1)
+ {
+ for (y = ypos; y >= 0; y--)
+ {
+ if ( feld [x] [y] != 0 &&
+ feld [x] [y] != 254 &&
+ feld [x] [y] != 150 &&
+ feld [x] [y] != 151 &&
+ feld [x] [y] != 152 &&
+ feld [x] [y] != 153 )
+ {
+ xpos = x; ypos = y;
+ chosen = true;
+ resetValidDirs();
+ emitStatus();
+ return;
+ }
+ }
+ ypos = FIELD_SIZE-1;
+ x--;
+ if (x <= 0) x = FIELD_SIZE-1;
+ }
+}
+
+
+void Feld::emitStatus()
+{
+ if (!chosen || moving) {}
+ else {
+
+ if (ypos > 0 && feld[xpos][ypos-1] == 0) {
+ feld [xpos][ypos-1] = 150;
+ putNonAtom(xpos, ypos-1, Feld::MoveUp);
+ }
+
+ if (ypos < FIELD_SIZE-1 && feld[xpos][ypos+1] == 0) {
+ feld [xpos][ypos+1] = 152;
+ putNonAtom(xpos, ypos+1, Feld::MoveDown);
+ }
+
+ if (xpos > 0 && feld[xpos-1][ypos] == 0) {
+ feld [xpos-1][ypos] = 151;
+ putNonAtom(xpos-1, ypos, Feld::MoveLeft);
+ }
+
+ if (xpos < FIELD_SIZE-1 && feld[xpos+1][ypos] == 0) {
+ feld [xpos+1][ypos] = 153;
+ putNonAtom(xpos+1, ypos, Feld::MoveRight);
+ }
+
+ }
+}
+
+void Feld::done ()
+{
+ if (moving)
+ return;
+
+ emitStatus();
+
+ if (checkDone())
+ emit gameOver(moves);
+
+}
+
+void Feld::startAnimation (Direction d)
+{
+ // if animation is already started, return
+ if (moving || !chosen)
+ return;
+
+ switch (d) {
+ case MoveUp:
+ if (ypos == 0 || feld [xpos] [ypos-1] != 150)
+ return;
+ break;
+ case MoveDown:
+ if (ypos == FIELD_SIZE-1 || feld [xpos] [ypos+1] != 152)
+ return;
+ break;
+ case MoveLeft:
+ if (xpos == 0 || feld [xpos-1] [ypos] != 151)
+ return;
+ break;
+ case MoveRight:
+ if (xpos == FIELD_SIZE-1 || feld [xpos+1] [ypos] != 153)
+ return;
+ break;
+ default:
+ break;
+ }
+
+ // reset validDirs now so that arrows don't get drawn
+ resetValidDirs();
+
+ int x = 0, y = 0;
+
+ moves++;
+ emit sendMoves(moves);
+ dir = d;
+
+ switch (dir) {
+ case MoveUp :
+ for (x = xpos, y = ypos-1, anz = 0; y >= 0 && feld [x] [y] == 0; anz++, y--);
+ if (anz != 0)
+ {
+ feld [x] [++y] = feld [xpos] [ypos];
+ }
+ break;
+ case MoveDown :
+ for (x = xpos, y = ypos+1, anz = 0; y <= FIELD_SIZE-1 && feld [x] [y] == 0; anz++, y++);
+ if (anz != 0)
+ {
+ feld [x] [--y] = feld [xpos] [ypos];
+ }
+ break;
+ case MoveRight :
+ for (x = xpos+1, y = ypos, anz = 0; x <= FIELD_SIZE-1 && feld [x] [y] == 0; anz++, x++);
+ if (anz != 0)
+ {
+ feld [--x] [y] = feld [xpos] [ypos];
+ }
+ break;
+ case MoveLeft :
+ for (x = xpos-1, y = ypos, anz = 0; x >= 0 && feld [x] [y] == 0; anz++, x--);
+ if (anz != 0)
+ {
+ feld [++x] [y] = feld [xpos] [ypos];
+ }
+ break;
+ default:
+ return;
+ }
+
+ if (anz != 0) {
+ moving = true;
+
+ // BEGIN: Insert undo informations
+ uint undoChunk = (undoBegin + undoSize) % MAX_UNDO;
+ undo[undoChunk].atom = feld[xpos][ypos];
+ undo[undoChunk].oldxpos = xpos;
+ undo[undoChunk].oldypos = ypos;
+ undo[undoChunk].xpos = x;
+ undo[undoChunk].ypos = y;
+ undo[undoChunk].dir = dir;
+ if (undoSize == MAX_UNDO)
+ undoBegin = (undoBegin + 1) % MAX_UNDO;
+ else
+ ++undoSize;
+ redoSize = undoSize;
+ emit enableUndo(true);
+ emit enableRedo(false);
+ // END: Insert undo informations
+
+ feld [xpos] [ypos] = 0;
+
+ // absolutkoordinaten des zu verschiebenden bildes
+ cx = xpos * 30;
+ cy = ypos * 30;
+ xpos = x;
+ ypos = y;
+ // 30 animationsstufen
+ framesbak = frames = anz * 30;
+
+ // 10 mal pro sek
+ startTimer (10);
+
+ bitBlt (&sprite, 0, 0, this, cx, cy, 30, 30, CopyROP);
+ }
+
+}
+
+void Feld::doUndo ()
+{
+ if (moving || !chosen || undoSize == 0)
+ return;
+
+ UndoInfo &undo_info = undo[(undoBegin + --undoSize) % MAX_UNDO];
+ emit enableUndo(undoSize != 0);
+ emit enableRedo(true);
+
+ --moves;
+ emit sendMoves(moves);
+
+ moving = true;
+ resetValidDirs ();
+
+ cx = undo_info.xpos;
+ cy = undo_info.ypos;
+ xpos = undo_info.oldxpos;
+ ypos = undo_info.oldypos;
+ feld[cx][cy] = 0;
+ feld[xpos][ypos] = undo_info.atom;
+ cx *= 30; cy *= 30;
+ framesbak = frames =
+ 30 * (abs (undo_info.xpos - undo_info.oldxpos) +
+ abs (undo_info.ypos - undo_info.oldypos) );
+ startTimer (10);
+ dir = (Direction) -((int) undo_info.dir);
+ bitBlt (&sprite, 0, 0, this, cx, cy, 30, 30, CopyROP);
+}
+
+void Feld::doRedo ()
+{
+ if (moving || !chosen || undoSize == redoSize)
+ return;
+
+ UndoInfo &undo_info = undo[(undoBegin + undoSize++) % MAX_UNDO];
+
+ emit enableUndo(true);
+ emit enableRedo(undoSize != redoSize);
+
+ ++moves;
+ emit sendMoves(moves);
+
+ moving = true;
+ resetValidDirs ();
+
+ cx = undo_info.oldxpos;
+ cy = undo_info.oldypos;
+ xpos = undo_info.xpos;
+ ypos = undo_info.ypos;
+ feld[cx][cy] = 0;
+ feld[xpos][ypos] = undo_info.atom;
+ cx *= 30; cy *= 30;
+ framesbak = frames =
+ 30 * (abs (undo_info.xpos - undo_info.oldxpos) +
+ abs (undo_info.ypos - undo_info.oldypos) );
+ startTimer (10);
+ dir = undo_info.dir;
+ bitBlt (&sprite, 0, 0, this, cx, cy, 30, 30, CopyROP);
+}
+
+void Feld::mouseMoveEvent (QMouseEvent *e)
+{
+ // warning: mouseMoveEvents can report positions upto 1 pixel outside
+ // of the field widget, so we must be sure handle this case
+
+ if( e->pos().x() < 0 || e->pos().x() >= 450 ||
+ e->pos().y() < 0 || e->pos().y() >= 450 )
+ {
+ setCursor(arrowCursor);
+ }
+ else
+ {
+ int x = e->pos ().x () / 30;
+ int y = e->pos ().y () / 30;
+
+ // verschiedene cursor je nach pos
+ if (feld[x][y] != 254 && feld [x] [y] != 0)
+ setCursor (crossCursor);
+ else
+ setCursor (arrowCursor);
+ }
+}
+
+
+bool Feld::checkDone ()
+{
+ int molecWidth = mol->molecSize().width();
+ int molecHeight = mol->molecSize().height();
+ int i = 0;
+ int j = 0;
+
+ // find first atom in molecule
+ uint firstAtom = 0;
+ for(j = 0; j < molecHeight && !firstAtom; ++j)
+ firstAtom = mol->getAtom(0, j);
+
+ // wot no atom?
+ if(!firstAtom)
+ return true; // true skips to next level
+
+ // position of first atom (in molecule coordinates)
+ int mx = 0;
+ int my = j - 1;
+
+ QRect extent(0, 0, FIELD_SIZE - molecWidth + 1, FIELD_SIZE - molecHeight + 1);
+ extent.moveBy(0, my);
+
+ // find first atom in playing field
+ for(i = extent.left(); i <= extent.right(); ++i)
+ {
+ for(j = extent.top(); j <= extent.bottom(); ++j)
+ {
+ if(feld[i][j] == firstAtom)
+ {
+ // attempt to match playing field to molecule
+ int ox = i - mx; // molecule origin (in field coordinates)
+ int oy = j - my; // molecule origin (in field coordinates)
+ ++my; // no need to test first atom again
+ while(mx < molecWidth)
+ {
+ while(my < molecHeight)
+ {
+ uint nextAtom = mol->getAtom(mx, my);
+ if(nextAtom != 0 && feld[ox + mx][oy + my] != nextAtom)
+ return false;
+ ++my;
+ }
+ my = 0;
+ ++mx;
+ }
+ return true;
+ }
+ }
+ }
+ // if we got here, then the first atom is too low or too far right
+ // for the molecule to be assembled correctly
+ return false;
+}
+
+
+void Feld::timerEvent (QTimerEvent *)
+{
+ // animation beenden
+ if (frames <= 0)
+ {
+ moving = false;
+ killTimers ();
+ done();
+ dir = None;
+ }
+ else
+ {
+ frames -= settings.anim_speed;
+ if (frames < 0)
+ frames = 0;
+
+ paintMovingAtom();
+ }
+}
+
+void Feld::paintMovingAtom()
+{
+ int a = settings.anim_speed;
+
+ QPainter paint(this);
+
+ switch(dir)
+ {
+ case MoveUp:
+ bitBlt(this, cx, cy - framesbak + frames, &sprite, CopyROP);
+ if(framesbak - frames > 0)
+ paint.eraseRect(cx, cy - framesbak + frames + 30, 30, a);
+ break;
+ case MoveDown:
+ bitBlt(this, cx, cy + framesbak - frames, &sprite, CopyROP);
+ if(framesbak - frames > 0)
+ paint.eraseRect(cx, cy + framesbak - frames - a, 30, a);
+ break;
+ case MoveRight:
+ bitBlt(this, cx + framesbak - frames, cy, &sprite, CopyROP);
+ if(framesbak - frames > 0)
+ paint.eraseRect(cx + framesbak - frames - a, cy, a, 30);
+ break;
+ case MoveLeft:
+ bitBlt(this, cx - framesbak + frames, cy, &sprite, CopyROP);
+ if(framesbak - frames > 0)
+ paint.eraseRect(cx - framesbak + frames + 30, cy, a, 30);
+ break;
+ case None:
+ break;
+ }
+}
+
+void Feld::putNonAtom (int x, int y, Direction which, bool brick)
+{
+ int xarr=0, yarr=0;
+ switch (which)
+ {
+ case None : xarr = 279, yarr = 31 * (brick?1:2); break;
+ case MoveUp : xarr = 248; yarr = 62; break;
+ case MoveLeft : xarr = 217; yarr = 93; break;
+ case MoveDown : xarr = 248; yarr = 93; break;
+ case MoveRight : xarr = 279; yarr = 93; break;
+ }
+
+ bitBlt(this, x * 30, y * 30, &data, xarr, yarr, 30, 30, CopyROP);
+}
+
+void Feld::paintEvent( QPaintEvent * )
+{
+ int i, j, x, y;
+
+ QPainter paint ( this );
+
+ paint.setPen (black);
+
+ // spielfeld gleich zeichnen
+
+ for (i = 0; i < FIELD_SIZE; i++)
+ {
+ for (j = 0; j < FIELD_SIZE; j++)
+ {
+ if(moving && i == xpos && j == ypos)
+ continue;
+
+ x = i * 30;
+ y = j * 30;
+
+ // zeichnet Randstücke
+ if (feld [i] [j] == 254) {
+ putNonAtom(i, j, Feld::None, true); continue;
+ }
+
+ if (feld[i][j] == 150) {
+ putNonAtom(i, j, Feld::MoveUp); continue;
+ }
+
+ if (feld[i][j] == 151) {
+ putNonAtom(i, j, Feld::MoveLeft); continue;
+ }
+ if (feld[i][j] == 152) {
+ putNonAtom(i, j, Feld::MoveDown); continue;
+ }
+
+ if (feld[i][j] == 153) {
+ putNonAtom(i, j, Feld::MoveRight); continue;
+ }
+
+ // zeichnet Atome
+ if (getAtom(feld [i] [j]).obj <= '9' && getAtom(feld [i] [j]).obj > '0')
+ {
+ bitBlt (this, x, y, &data, (getAtom(feld [i] [j]).obj - '1') * 31, 0, 30,
+ 30, CopyROP);
+ }
+
+ // zeichnet Kristalle
+ if (getAtom(feld [i] [j]).obj == 'o')
+ {
+ bitBlt (this, x, y, &data, 31, 93, 30, 30, CopyROP);
+ }
+
+
+
+ // verbindungen zeichnen
+ if (getAtom(feld [i] [j]).obj <= '9' ||
+ getAtom(feld [i] [j]).obj == 'o')
+ for (int c = 0; c < MAX_CONNS_PER_ATOM; c++) {
+ char conn = getAtom(feld [i] [j]).conn[c];
+ if (!conn)
+ break;
+
+ if (conn >= 'a' && conn <= 'a' + 8)
+ bitBlt (this, x, y,
+ &data, (conn - 'a') * 31, 31, 30, 30,
+ XorROP);
+ else
+ bitBlt (this, x, y,
+ &data, (conn - 'A') * 31, 62, 30, 30,
+ XorROP);
+
+ }
+
+ // zeichnet Verbindungsstäbe
+ if (getAtom(feld [i] [j]).obj >= 'A' &&
+ getAtom(feld [i] [j]).obj <= 'F')
+ bitBlt (this, x, y,
+ &data,
+ (getAtom(feld [i] [j]).obj - 'A' + 2) * 31 ,
+ 93, 30, 30,
+ CopyROP);
+ }
+ }
+}
+
+
+#include "feld.moc"
diff --git a/katomic/feld.h b/katomic/feld.h
new file mode 100644
index 00000000..6a1cf761
--- /dev/null
+++ b/katomic/feld.h
@@ -0,0 +1,116 @@
+/****************************************************************
+**
+** Definition of Feld class,
+**
+****************************************************************/
+
+#ifndef FELD_H
+#define FELD_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <qwidget.h>
+#include <qpoint.h>
+#include <qpainter.h>
+#include <qpixmap.h>
+#include <qmessagebox.h>
+
+#include <kscoredialog.h>
+
+#include "atom.h"
+
+#define MAX_UNDO (100)
+
+class KSimpleConfig;
+class Molek;
+
+#define FIELD_SIZE 15
+
+class Feld : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Feld (QWidget *parent=0, const char *name=0);
+ ~Feld ();
+
+ enum Direction { None = 0,
+ MoveUp = 1,
+ MoveDown = (-1),
+ MoveLeft = 2,
+ MoveRight = (-2) };
+
+ void startAnimation (Direction dir);
+ void done ();
+
+ void load (const KSimpleConfig& config);
+
+ void setMolek(Molek *_mol) { mol = _mol; }
+
+ void doUndo ();
+ void doRedo ();
+
+signals:
+ void gameOver(int moves);
+ void sendMoves(int moves);
+ void enableRedo(bool enable);
+ void enableUndo(bool enable);
+
+protected:
+ bool checkDone();
+ void timerEvent (QTimerEvent *);
+ void paintEvent( QPaintEvent * );
+ void paintMovingAtom();
+ void mousePressEvent (QMouseEvent *);
+ void mouseMoveEvent (QMouseEvent *);
+ void emitStatus();
+
+protected:
+ struct UndoInfo {
+ uint atom;
+ int oldxpos, oldypos;
+ int xpos, ypos;
+ Direction dir;
+ };
+
+public slots:
+ void nextAtom();
+ void previousAtom();
+
+private:
+
+ const atom& getAtom(uint index) const;
+
+ void putNonAtom(int, int, Direction, bool brick = false);
+
+ QPoint *point;
+ QPixmap data;
+ QPixmap sprite;
+
+ Molek *mol;
+
+ uint feld[FIELD_SIZE][FIELD_SIZE];
+
+ // number of movements
+ int moves;
+
+ Direction dir;
+ int cx, cy;
+ int xpos, ypos;
+ int anz;
+ int frames, framesbak;
+
+ bool anim;
+ bool chosen, moving;
+
+ uint undoBegin;
+ uint undoSize;
+ uint redoSize;
+ UndoInfo undo[MAX_UNDO];
+
+ void resetValidDirs();
+
+};
+
+#endif // FELD_H
diff --git a/katomic/gamewidget.cpp b/katomic/gamewidget.cpp
new file mode 100644
index 00000000..fc6838a8
--- /dev/null
+++ b/katomic/gamewidget.cpp
@@ -0,0 +1,230 @@
+/* toplevel.cpp
+
+ Copyright (C) 1998 Andreas Wüst (AndreasWuest@gmx.de)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ */
+
+#include "settings.h"
+#include "gamewidget.h"
+#include "feld.h"
+#include "molek.h"
+
+#include <qscrollbar.h>
+#include <qgroupbox.h>
+#include <qlayout.h>
+#include <qvbox.h>
+#include <qlabel.h>
+
+#include <kapplication.h>
+#include <kscoredialog.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+#include <kstandarddirs.h>
+#include <kglobal.h>
+#include <ksimpleconfig.h>
+#include <kglobalsettings.h>
+
+Options settings;
+
+#define MPOSX 480
+#define MPOSY 90
+
+// ##########################
+// # class GameWidget #
+// ##########################
+
+int level;
+
+void GameWidget::moveUp()
+{
+ feld->startAnimation (Feld::MoveUp);
+}
+
+void GameWidget::moveDown()
+{
+ feld->startAnimation (Feld::MoveDown);
+}
+
+void GameWidget::moveLeft()
+{
+ feld->startAnimation (Feld::MoveLeft);
+}
+
+void GameWidget::moveRight()
+{
+ feld->startAnimation (Feld::MoveRight);
+}
+
+void GameWidget::nextAtom()
+{
+ feld->nextAtom();
+}
+
+void GameWidget::previousAtom()
+{
+ feld->previousAtom();
+}
+
+void GameWidget::getButton (int button)
+{
+ feld->startAnimation ((Feld::Direction)button);
+}
+
+void GameWidget::doUndo ()
+{
+ feld->doUndo ();
+}
+
+void GameWidget::doRedo ()
+{
+ feld->doRedo ();
+}
+
+void GameWidget::gameOver(int moves) {
+ KMessageBox::information(this, i18n("You solved level %1 with %2 moves!").arg(level).arg(moves), i18n("Congratulations"));
+
+ KScoreDialog high(KScoreDialog::Name | KScoreDialog::Score, this);
+ high.setCaption(i18n("Level %1 Highscores").arg(level));
+ high.setConfigGroup(QString("Highscores Level %1").arg(level));
+
+ KScoreDialog::FieldInfo scoreInfo;
+
+ if (high.addScore(moves, scoreInfo, true, true))
+ {
+ high.exec();
+ }
+ updateLevel(level+1);
+}
+
+void GameWidget::getMoves(int moves)
+{
+ current.setNum(moves);
+ ys->setText(current);
+}
+
+void GameWidget::updateLevel (int l)
+{
+ level=l;
+ QString levelFile = locate("appdata", QString("levels/level_%1").arg(l));
+ if (levelFile.isNull()) {
+ return updateLevel(1);
+ }
+
+ KSimpleConfig cfg(levelFile, true);
+ cfg.setGroup("Level");
+ feld->load(cfg);
+
+ highScore->setConfigGroup(QString("High Scores Level %1").arg(level));
+ highest.setNum(highScore->highScore());
+
+ if (highest != "0" ) hs->setText(highest);
+ else hs->setText("-");
+ ys->setText("0");
+ scrl->setValue(level);
+
+ feld->repaint();
+}
+
+void GameWidget::restartLevel()
+{
+ updateLevel(level);
+}
+
+GameWidget::GameWidget ( QWidget *parent, const char* name )
+ : QWidget( parent, name )
+{
+ level = 1;
+ nlevels = KGlobal::dirs()->findAllResources("appdata", "levels/level_*",
+ false, true).count();
+
+ QHBoxLayout *top = new QHBoxLayout(this, 10);
+
+ // spielfeld
+ feld = new Feld (this, "feld");
+ feld->setFocus();
+
+ top->addWidget(feld);
+
+ QVBox *vb = new QVBox(this);
+ vb->setSpacing(20);
+ top->addWidget(vb);
+
+ // scrollbar
+ scrl = new QScrollBar(1, nlevels, 1,
+ 5, 1, QScrollBar::Horizontal, vb, "scrl" );
+ connect (scrl, SIGNAL (valueChanged (int)), SLOT (updateLevel (int)));
+
+ // molekül
+ molek = new Molek (vb, "molek");
+ feld->setMolek(molek);
+
+ connect (feld, SIGNAL (gameOver(int)), SLOT(gameOver(int)));
+ connect (feld, SIGNAL (sendMoves(int)), SLOT(getMoves(int)));
+ connect (feld, SIGNAL (enableRedo(bool)), SIGNAL(enableRedo(bool)));
+ connect (feld, SIGNAL (enableUndo(bool)), SIGNAL(enableUndo(bool)));
+
+ highScore = new KScoreDialog(KScoreDialog::Name | KScoreDialog::Score, this);
+
+ // the score group
+ QGroupBox *bg = new QGroupBox (i18n("Score"), vb, "bg");
+ QBoxLayout *slay = new QVBoxLayout (bg, 10);
+
+ slay->addSpacing(10);
+
+ slay->addWidget(new QLabel(i18n("Highscore:"), bg));
+
+ QFont headerFont = KGlobalSettings::generalFont();
+ headerFont.setBold(true);
+
+ hs = new QLabel (highest, bg);
+ hs->setAlignment(Qt::AlignRight);
+ hs->setFont(headerFont);
+ slay->addWidget(hs);
+
+ slay->addSpacing(10);
+
+ slay->addWidget(new QLabel(i18n("Your score so far:"), bg));
+
+ ys = new QLabel (current, bg);
+ ys->setAlignment(Qt::AlignRight);
+ ys->setFont(headerFont);
+ slay->addWidget(ys);
+
+ updateLevel(1);
+
+ KConfig *config = KGlobal::config();
+ config->setGroup("Options");
+ settings.anim_speed = config->readNumEntry("Animation Speed", 1);
+ if (settings.anim_speed < 1 || settings.anim_speed > MAX_SPEED)
+ settings.anim_speed = 1;
+
+ settings.changed = false;
+}
+
+GameWidget::~GameWidget()
+{
+}
+
+void GameWidget::showHighscores ()
+{
+ KScoreDialog high(KScoreDialog::Name | KScoreDialog::Score, this);
+ high.setCaption(i18n("Level %1 Highscores").arg(level));
+ high.setConfigGroup(QString("Highscores Level %1").arg(level));
+ high.exec();
+}
+
+#include "gamewidget.moc"
diff --git a/katomic/gamewidget.h b/katomic/gamewidget.h
new file mode 100644
index 00000000..6259e6b7
--- /dev/null
+++ b/katomic/gamewidget.h
@@ -0,0 +1,74 @@
+
+#ifndef GAMEWIDGET_H
+#define GAMEWIDGET_H
+
+class Feld;
+class Molek;
+class QScrollBar;
+class QLabel;
+class KScoreDialog;
+
+#include <qwidget.h>
+
+class GameWidget : public QWidget
+{
+ Q_OBJECT
+
+ public:
+
+ GameWidget ( QWidget *parent, const char *name=0 );
+
+ ~GameWidget();
+
+ signals:
+ void enableRedo(bool enable);
+ void enableUndo(bool enable);
+
+ public slots:
+ // bringt level auf neuesten stand
+ void updateLevel (int);
+
+ // restart current level
+ void restartLevel();
+
+ // getbutton erhält button der gedrückt wurde
+ void getButton (int);
+
+ void gameOver(int moves);
+
+ // use this slot to update the moves continually
+ void getMoves(int moves);
+
+ // Menupunkt Highscores im Pop-up Menu, der Highscore anzeigt
+ void showHighscores ();
+
+ void moveUp();
+ void moveDown();
+ void moveLeft();
+ void moveRight();
+ void nextAtom();
+ void previousAtom();
+ void doUndo ();
+ void doRedo ();
+
+ protected:
+
+ // stellt das spielfeld dar !
+ Feld *feld;
+
+ // stellt molekül dar
+ Molek *molek;
+
+ // scorllbar zur levelwahl
+ QScrollBar *scrl;
+
+ // important labels : highest and current scores
+ QLabel *hs, *ys;
+ QString highest, current;
+
+ int nlevels;
+
+ KScoreDialog *highScore;
+};
+
+#endif
diff --git a/katomic/hi128-app-katomic.png b/katomic/hi128-app-katomic.png
new file mode 100644
index 00000000..94f1cbd0
--- /dev/null
+++ b/katomic/hi128-app-katomic.png
Binary files differ
diff --git a/katomic/hi16-app-katomic.png b/katomic/hi16-app-katomic.png
new file mode 100644
index 00000000..fde5a50a
--- /dev/null
+++ b/katomic/hi16-app-katomic.png
Binary files differ
diff --git a/katomic/hi22-app-katomic.png b/katomic/hi22-app-katomic.png
new file mode 100644
index 00000000..d4a26a6a
--- /dev/null
+++ b/katomic/hi22-app-katomic.png
Binary files differ
diff --git a/katomic/hi32-app-katomic.png b/katomic/hi32-app-katomic.png
new file mode 100644
index 00000000..afbe144d
--- /dev/null
+++ b/katomic/hi32-app-katomic.png
Binary files differ
diff --git a/katomic/hi48-app-katomic.png b/katomic/hi48-app-katomic.png
new file mode 100644
index 00000000..8f18153e
--- /dev/null
+++ b/katomic/hi48-app-katomic.png
Binary files differ
diff --git a/katomic/hi64-app-katomic.png b/katomic/hi64-app-katomic.png
new file mode 100644
index 00000000..26d07e0a
--- /dev/null
+++ b/katomic/hi64-app-katomic.png
Binary files differ
diff --git a/katomic/katomic.desktop b/katomic/katomic.desktop
new file mode 100644
index 00000000..a614a171
--- /dev/null
+++ b/katomic/katomic.desktop
@@ -0,0 +1,73 @@
+[Desktop Entry]
+Name=KAtomic
+Name[af]=Katomic
+Name[ar]=لعبة التركيب الجزيئي الكيميائي (KAtomic)
+Name[be]=Ðтамы
+Name[bn]=কে-অà§à¦¯à¦¾à¦Ÿà¦®à¦¿à¦•
+Name[eo]=Atomoj
+Name[hi]=के-à¤à¤Ÿà¥‰à¤®à¤¿à¤•
+Name[ne]=केडीई à¤à¤Ÿà¥‹à¤®à¤¿à¤•
+Name[pa]=ਕੇ-ਪਰਮਾਣੂ
+Name[pl]=Atomy
+Name[pt_BR]=KAtômico
+Name[sv]=Katomic
+Name[ta]=கேஅடாமிகà¯
+Name[tg]=KÐтомҳо
+Name[th]=อะตอมมิภ- K
+Name[tr]=Atomlar
+Name[zh_TW]=KAtomic 原å­
+Icon=katomic
+Type=Application
+Exec=katomic %i %m -caption "%c"
+DocPath=katomic/index.html
+GenericName=Sokoban-like Logic Game
+GenericName[be]=Ð›Ð°Ð³Ñ–Ñ‡Ð½Ð°Ñ Ð³ÑƒÐ»ÑŒÐ½Ñ Ñ‚Ñ‹Ð¿Ñƒ Sokoban
+GenericName[bg]=ЛогичеÑка игра Ñ Ð°Ñ‚Ð¾Ð¼Ð¸
+GenericName[bn]=সোকোবান-à¦à¦° মত যà§à¦•à§à¦¤à¦¿à¦° খেলা
+GenericName[bs]=LogiÄka igra nalik na Sokoban
+GenericName[ca]=Joc de lògica similar al Sokoban
+GenericName[cs]=Logická hra jako Sokoban
+GenericName[cy]=Gêm Resymeg sy'n debyg i Sokoban
+GenericName[da]=Sokoban-lignende logisk spil
+GenericName[de]=Logikspiel (ähnlich Sokoban)
+GenericName[el]=Παιχνίδι λογικής παÏόμοιο με το Sokoban
+GenericName[eo]=Logikludo simila al Sokoban
+GenericName[es]=Juego de lógica similar al Sokoban
+GenericName[et]=Sokobani moodi loogikamäng
+GenericName[eu]=Sokoban-en antzeko joko logikoa
+GenericName[fi]=Sokoban-tyylinen Logiikkapeli
+GenericName[fr]=Jeu de logique dans le style de Sokoban
+GenericName[ga]=Cluiche Loighce Mar Sokoban
+GenericName[he]=חיקוי Sokoban, משחק לוגי
+GenericName[hr]=LogiÄka igra poput Sokobana
+GenericName[hu]=Sokoban-szerű logikai
+GenericName[is]=Leikur sem líkist Sokoban
+GenericName[it]=Gioco di logica simile a Sokoban
+GenericName[ja]=倉庫番ã®ã‚ˆã†ãªè«–ç†ã‚²ãƒ¼ãƒ 
+GenericName[km]=ល្បែង​ážáž€áŸ’ក​ដូច Sokoban
+GenericName[ko]=소코반 ê°™ì€ ì „ëžµ 게임
+GenericName[lt]=Sokoban tipo loginis žaidimas
+GenericName[lv]=Sokoban lÄ«dzÄ«ga loÄ£iskÄ spÄ“le
+GenericName[mk]=Логичка игра Ñлична на Сокобан
+GenericName[nb]=Sokoban-lignende logikkspill
+GenericName[nds]=Sokoban-liek Logikspeel
+GenericName[ne]=सोकोबान जसà¥à¤¤à¥ˆ यà¥à¤•à¥à¤¤à¤¿à¤¸à¤‚गत खेल
+GenericName[nl]=Sokoban-achtig logisch spel
+GenericName[nn]=Sokoban-liknande logikkspel
+GenericName[pl]=Gra logiczna typu Sokoban
+GenericName[pt]=Jogo de Lógica tipo Sokoban
+GenericName[pt_BR]=Jogo Lógico parecido com Sokoban
+GenericName[ru]=Забавные атомы
+GenericName[se]=Sokoban-lágan logihkkaspeallu
+GenericName[sk]=Logická hra ako Sokoban
+GenericName[sl]=LogiÄna igra podobna Sokobanu
+GenericName[sr]=Логичка игра налик на Sokoban
+GenericName[sr@Latn]=LogiÄka igra nalik na Sokoban
+GenericName[sv]=Sokoban-liknande logiskt spel
+GenericName[ta]=சோகோபான௠போனà¯à®± லாஜிக௠விளையாடà¯à®Ÿà¯
+GenericName[uk]=Гра на логіку подібна до Сокобану
+GenericName[wa]=Djeu di lodjike rishonnant a sokoban
+GenericName[zh_TW]=倉庫番(sokoban)å¼çš„智力éŠæˆ²
+X-KDE-StartupNotify=true
+X-DCOP-ServiceType=Multi
+Categories=Qt;KDE;Game;StrategyGame;
diff --git a/katomic/katomicui.rc b/katomic/katomicui.rc
new file mode 100644
index 00000000..da25f243
--- /dev/null
+++ b/katomic/katomicui.rc
@@ -0,0 +1,6 @@
+<!DOCTYPE kpartgui>
+<kpartgui name="katomic" version="5">
+
+<MenuBar/>
+
+</kpartgui>
diff --git a/katomic/levels/level_1 b/katomic/levels/level_1
new file mode 100644
index 00000000..dc63e883
--- /dev/null
+++ b/katomic/levels/level_1
@@ -0,0 +1,21 @@
+[Level]
+Name=Water
+atom_1=1-c
+atom_2=3-cg
+atom_3=1-g
+feld_00=...............
+feld_01=...............
+feld_02=...............
+feld_03=..###########..
+feld_04=..#..#......#..
+feld_05=..#.3#......#..
+feld_06=..#.##......#..
+feld_07=..#.#..#.####..
+feld_08=..#....#.2..#..
+feld_09=..###.#.....#..
+feld_10=..#1....#...#..
+feld_11=..###########..
+feld_12=...............
+feld_13=...............
+feld_14=...............
+mole_0=123
diff --git a/katomic/levels/level_10 b/katomic/levels/level_10
new file mode 100644
index 00000000..28bce761
--- /dev/null
+++ b/katomic/levels/level_10
@@ -0,0 +1,24 @@
+[Level]
+Name=Formic Acid
+atom_1=1-c
+atom_2=3-C
+atom_3=2-cgA
+atom_4=3-cg
+atom_5=1-g
+feld_00=...............
+feld_01=.#############.
+feld_02=.#...........#.
+feld_03=.###..###..###.
+feld_04=.#.....#.....#.
+feld_05=.#.###...###.#.
+feld_06=.#.#2..#...#.#.
+feld_07=.#1435###....#.
+feld_08=.#.#...#...#.#.
+feld_09=.#.###...###.#.
+feld_10=.#.....#.....#.
+feld_11=.###..###..###.
+feld_12=.#...........#.
+feld_13=.#############.
+feld_14=...............
+mole_0=.2..
+mole_1=1345
diff --git a/katomic/levels/level_11 b/katomic/levels/level_11
new file mode 100644
index 00000000..4b423171
--- /dev/null
+++ b/katomic/levels/level_11
@@ -0,0 +1,28 @@
+[Level]
+Name=Acetic Acid
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=3-C
+atom_6=2-cgA
+atom_7=3-cg
+atom_8=1-g
+feld_00=...............
+feld_01=...............
+feld_02=..###########..
+feld_03=..#...#...#.#..
+feld_04=..#.7.......#..
+feld_05=..#.#..8#.1.#..
+feld_06=..#4.3......#..
+feld_07=..#...#...#.#..
+feld_08=..#.........#..
+feld_09=..#.#.6.#...#..
+feld_10=..#5.....2..#..
+feld_11=..#...#...#.#..
+feld_12=..###########..
+feld_13=...............
+feld_14=...............
+mole_0=.25..
+mole_1=13678
+mole_2=.4...
diff --git a/katomic/levels/level_12 b/katomic/levels/level_12
new file mode 100644
index 00000000..bb51be76
--- /dev/null
+++ b/katomic/levels/level_12
@@ -0,0 +1,29 @@
+[Level]
+Name=trans-Butene
+atom_1=1-d
+atom_2=1-b
+atom_3=2-bdfh
+atom_4=2-fhB
+atom_5=1-h
+atom_6=2-bdD
+atom_7=1-f
+feld_00=...............
+feld_01=.#############.
+feld_02=.#...........#.
+feld_03=.#...#..6#...#.
+feld_04=.#4.#.7...#..#.
+feld_05=.#.#.##.##.#.#.
+feld_06=.#..2........#.
+feld_07=.###5##.##.###.
+feld_08=.#...........#.
+feld_09=.#.#.##1##.#.#.
+feld_10=.#..#31...#1.#.
+feld_11=.#...#..5#...#.
+feld_12=.#3..5.......#.
+feld_13=.#############.
+feld_14=...............
+mole_0=...1.7
+mole_1=.1..3.
+mole_2=1.46.5
+mole_3=.3..5.
+mole_4=2.5...
diff --git a/katomic/levels/level_13 b/katomic/levels/level_13
new file mode 100644
index 00000000..29433c5e
--- /dev/null
+++ b/katomic/levels/level_13
@@ -0,0 +1,28 @@
+[Level]
+Name=cis-Butene
+atom_1=1-d
+atom_2=1-b
+atom_3=2-bdfh
+atom_4=2-fhB
+atom_5=1-h
+atom_6=2-bdD
+atom_7=1-f
+feld_00=...............
+feld_01=.#############.
+feld_02=.#.#..##...#.#.
+feld_03=.##..#.....#.#.
+feld_04=.##....#..#..#.
+feld_05=.#.5..1#.2..7#.
+feld_06=.###....#.#..#.
+feld_07=.#..#......###.
+feld_08=.#.4..3.#6..3#.
+feld_09=.#.##.##.....#.
+feld_10=.##......#.#.#.
+feld_11=.#.7##5.#2.#1#.
+feld_12=.#.#....#.#..#.
+feld_13=.#############.
+feld_14=...............
+mole_0=.1..7.
+mole_1=1.46.7
+mole_2=.3..3.
+mole_3=2.52.5
diff --git a/katomic/levels/level_14 b/katomic/levels/level_14
new file mode 100644
index 00000000..1dd41fa7
--- /dev/null
+++ b/katomic/levels/level_14
@@ -0,0 +1,26 @@
+[Level]
+Name=Dimethyl ether
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=3-cg
+atom_6=1-g
+feld_00=...............
+feld_01=.#############.
+feld_02=.#...3.#5...1#.
+feld_03=.#.###.#.###.#.
+feld_04=.#.#..4#...#.#.
+feld_05=.#.#...#...#.#.
+feld_06=.#.....#.....#.
+feld_07=.####2....####.
+feld_08=.#.....#.....#.
+feld_09=.#.#...#...#.#.
+feld_10=.#.#..6#..4#.#.
+feld_11=.#.###.#.###2#.
+feld_12=.#....3#.....#.
+feld_13=.#############.
+feld_14=...............
+mole_0=.2.2.
+mole_1=13536
+mole_2=.4.4.
diff --git a/katomic/levels/level_15 b/katomic/levels/level_15
new file mode 100644
index 00000000..5de947f1
--- /dev/null
+++ b/katomic/levels/level_15
@@ -0,0 +1,27 @@
+[Level]
+Name=Butanol
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=3-ae
+atom_6=1-g
+feld_00=...............
+feld_01=.#############.
+feld_02=.#..42.....3.#.
+feld_03=.#.#..####.###.
+feld_04=.###2...#....#.
+feld_05=.#.6..#.....4#.
+feld_06=.#.##.#.##.4.#.
+feld_07=.#.#..#..#.###.
+feld_08=.###.3#.5.3#.#.
+feld_09=.#1..........#.
+feld_10=.#4...#..2...#.
+feld_11=.#..###2##.#.#.
+feld_12=.#....#.3..#.#.
+feld_13=.#############.
+feld_14=...............
+mole_0=.2222.
+mole_1=133336
+mole_2=.4445.
+mole_3=....4.
diff --git a/katomic/levels/level_16 b/katomic/levels/level_16
new file mode 100644
index 00000000..0e466be9
--- /dev/null
+++ b/katomic/levels/level_16
@@ -0,0 +1,31 @@
+[Level]
+Name=2-Methyl-2-Propanol
+atom_1=1-c
+atom_2=1-d
+atom_3=1-e
+atom_4=2-aceg
+atom_5=1-a
+atom_6=2-abeh
+atom_7=3-ae
+atom_8=1-f
+atom_9=1-g
+feld_00=...............
+feld_01=.#####...#####.
+feld_02=.#9.6#...#5.2#.
+feld_03=.#8#.#####.#.#.
+feld_04=.#5....#.....#.
+feld_05=.###.#..3#.###.
+feld_06=...#.....54#...
+feld_07=...##.....##...
+feld_08=...#4.....3#...
+feld_09=.###.#...#.###.
+feld_10=.#.....#.3..1#.
+feld_11=.#.#7#####.#.#.
+feld_12=.#4..#...#...#.
+feld_13=.#####...#####.
+feld_14=...............
+mole_0=.238.
+mole_1=.363.
+mole_2=14449
+mole_3=.575.
+mole_4=..5..
diff --git a/katomic/levels/level_17 b/katomic/levels/level_17
new file mode 100644
index 00000000..dc9efe1b
--- /dev/null
+++ b/katomic/levels/level_17
@@ -0,0 +1,28 @@
+[Level]
+Name=Glycerin
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=3-cg
+atom_6=1-g
+feld_00=...............
+feld_01=..###########..
+feld_02=..#.#.4#3.#.#..
+feld_03=..#.5#.#.#..#..
+feld_04=..##..3....##..
+feld_05=..#.#.....#.#..
+feld_06=..#.6....1..#..
+feld_07=..####5..####..
+feld_08=..#....15.1.#..
+feld_09=..#.#....3#.#..
+feld_10=..##.....6.##..
+feld_11=..#..#.#.#.2#..
+feld_12=..#.#.6#..#.#..
+feld_13=..###########..
+feld_14=...............
+mole_0=.2..
+mole_1=1356
+mole_2=1356
+mole_3=1356
+mole_4=.4..
diff --git a/katomic/levels/level_18 b/katomic/levels/level_18
new file mode 100644
index 00000000..3fcd823d
--- /dev/null
+++ b/katomic/levels/level_18
@@ -0,0 +1,23 @@
+[Level]
+Name=Poly-Tetra-Fluoro-Ethene
+atom_1=6-e
+atom_2=6-a
+atom_3=2-aceg
+feld_00=...............
+feld_01=.#############.
+feld_02=.#...........#.
+feld_03=.#....#2#1...#.
+feld_04=.#3...#.#....#.
+feld_05=.#.####3####.#.
+feld_06=.#2..........#.
+feld_07=.####..#.2####.
+feld_08=.#1.........1#.
+feld_09=.#.####.####.#.
+feld_10=.#..2.#.#....#.
+feld_11=.#1...#.#...3#.
+feld_12=.#..3........#.
+feld_13=.#############.
+feld_14=...............
+mole_0=1111
+mole_1=3333
+mole_2=2222
diff --git a/katomic/levels/level_19 b/katomic/levels/level_19
new file mode 100644
index 00000000..70871b37
--- /dev/null
+++ b/katomic/levels/level_19
@@ -0,0 +1,26 @@
+[Level]
+Name=Oxalic Acid
+atom_1=3-D
+atom_2=2-ceD
+atom_3=3-ae
+atom_4=1-a
+atom_5=2-egB
+atom_6=3-B
+feld_00=...............
+feld_01=###############
+feld_02=###3...#....###
+feld_03=##.....#..6.5##
+feld_04=#...#.....#...#
+feld_05=#...##.2.##...#
+feld_06=#....##.##....#
+feld_07=###1...3....###
+feld_08=#....##.##....#
+feld_09=#...##.4.##...#
+feld_10=#.4.#.....#...#
+feld_11=##.....#.....##
+feld_12=###....#....###
+feld_13=###############
+feld_14=...............
+mole_0=6251
+mole_1=.33
+mole_2=.44
diff --git a/katomic/levels/level_2 b/katomic/levels/level_2
new file mode 100644
index 00000000..bc211909
--- /dev/null
+++ b/katomic/levels/level_2
@@ -0,0 +1,25 @@
+[Level]
+Name=Methane
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=1-g
+feld_00=...............
+feld_01=...............
+feld_02=.#############.
+feld_03=.#...#..#....#.
+feld_04=.#.#..#5#....#.
+feld_05=.#..#...#3.#.#.
+feld_06=.#......####.#.
+feld_07=.#.......#1#.#.
+feld_08=.#.2..#..#...#.
+feld_09=.#.#####....##.
+feld_10=.#.4.#..#...#..
+feld_11=.#####..#...#..
+feld_12=........#####..
+feld_13=...............
+feld_14=...............
+mole_0=.2.
+mole_1=135
+mole_2=.4.
diff --git a/katomic/levels/level_20 b/katomic/levels/level_20
new file mode 100644
index 00000000..8ae7aaf9
--- /dev/null
+++ b/katomic/levels/level_20
@@ -0,0 +1,24 @@
+[Level]
+Name=Formaldehyde
+atom_1=1-e
+atom_2=2-aeB
+atom_3=1-a
+atom_4=3-D
+feld_00=...............
+feld_01=.#############.
+feld_02=.#4....#....2#.
+feld_03=.#..##.#.##..#.
+feld_04=.##.#.....#.##.
+feld_05=.#..#.....#..#.
+feld_06=.#.##..#..####.
+feld_07=.#....###....#.
+feld_08=.#.##..#..##.#.
+feld_09=.#..#.....#..#.
+feld_10=.##.#.....#.##.
+feld_11=.#..##.#.##..#.
+feld_12=.#3....#....1#.
+feld_13=.#############.
+feld_14=...............
+mole_0=1
+mole_1=24
+mole_2=3
diff --git a/katomic/levels/level_21 b/katomic/levels/level_21
new file mode 100644
index 00000000..a15a81c6
--- /dev/null
+++ b/katomic/levels/level_21
@@ -0,0 +1,30 @@
+[Level]
+Name=Crystal 1
+atom_1=o-ce
+atom_2=o-ace
+atom_3=o-ac
+atom_4=o-ceg
+atom_5=o-aceg
+atom_6=o-acg
+atom_7=o-eg
+atom_8=o-aeg
+atom_9=o-ag
+feld_00=...............
+feld_01=......##.......
+feld_02=.....####......
+feld_03=.....#55#......
+feld_04=....##56##.....
+feld_05=..###89..###...
+feld_06=.##2....72.##..
+feld_07=.##.41...5.##..
+feld_08=..###34.6###...
+feld_09=....##.8##.....
+feld_10=.....#..#......
+feld_11=.....####......
+feld_12=......##.......
+feld_13=...............
+feld_14=...............
+mole_0=1447
+mole_1=2558
+mole_2=2558
+mole_3=3669
diff --git a/katomic/levels/level_22 b/katomic/levels/level_22
new file mode 100644
index 00000000..50568c5a
--- /dev/null
+++ b/katomic/levels/level_22
@@ -0,0 +1,28 @@
+[Level]
+Name=Acetic acid ethyl ester
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=3-C
+atom_6=2-cgA
+atom_7=3-cg
+atom_8=1-g
+feld_00=...............
+feld_01=.#############.
+feld_02=.#..##.#.##..#.
+feld_03=.#...#.4.#...#.
+feld_04=.#....3...3.3#.
+feld_05=.##..#...#..##.
+feld_06=.#7.##6..##..#.
+feld_07=.#8....#.....#.
+feld_08=.#..##...##..#.
+feld_09=.##..#22.#4.##.
+feld_10=.#...2.......#.
+feld_11=.#..5#..1#...#.
+feld_12=.#.4##.#.##..#.
+feld_13=.#############.
+feld_14=...............
+mole_0=.25.22.
+mole_1=1367338
+mole_2=.4..44.
diff --git a/katomic/levels/level_23 b/katomic/levels/level_23
new file mode 100644
index 00000000..c44492ff
--- /dev/null
+++ b/katomic/levels/level_23
@@ -0,0 +1,24 @@
+[Level]
+Name=Ammonia
+atom_1=1-c
+atom_2=4-bdg
+atom_3=1-f
+atom_4=1-h
+feld_00=...............
+feld_01=.#############.
+feld_02=.##..3#..#..##.
+feld_03=.#...#..#....#.
+feld_04=.#........#..#.
+feld_05=.#1#.#...#..##.
+feld_06=.##...#....#.#.
+feld_07=.#....2......#.
+feld_08=.#.#....#..4##.
+feld_09=.##..#...#.#.#.
+feld_10=.#..#........#.
+feld_11=.#....#..#...#.
+feld_12=.##..#..#...##.
+feld_13=.#############.
+feld_14=...............
+mole_0=..3
+mole_1=12.
+mole_2=..4
diff --git a/katomic/levels/level_24 b/katomic/levels/level_24
new file mode 100644
index 00000000..0d47d71d
--- /dev/null
+++ b/katomic/levels/level_24
@@ -0,0 +1,29 @@
+[Level]
+Name=3-Methyl-Pentane
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=1-d
+atom_6=2-abeh
+atom_7=1-f
+atom_8=1-g
+feld_00=...............
+feld_01=###############
+feld_02=#.2.5..#..3..4#
+feld_03=#2.#...#...#..#
+feld_04=#.###.12..###.#
+feld_05=#.3#....4..#..#
+feld_06=#.......3.....#
+feld_07=###.2..4....###
+feld_08=#....3.......7#
+feld_09=#8.#.......#.6#
+feld_10=#.###....2###.#
+feld_11=#..#4..#4..#..#
+feld_12=#.....3#......#
+feld_13=###############
+feld_14=...............
+mole_0=..527..
+mole_1=.22622.
+mole_2=1333338
+mole_3=.44444.
diff --git a/katomic/levels/level_25 b/katomic/levels/level_25
new file mode 100644
index 00000000..32b93dca
--- /dev/null
+++ b/katomic/levels/level_25
@@ -0,0 +1,27 @@
+[Level]
+Name=Propanal
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=2-cgC
+atom_6=3-A
+atom_7=1-g
+feld_00=...............
+feld_01=..###########..
+feld_02=..#.2#.5....#..
+feld_03=..#.##4..##.#..
+feld_04=..#.....3.###..
+feld_05=..#..###....#..
+feld_06=..#..#....###..
+feld_07=..#....#....#..
+feld_08=..####..#...#..
+feld_09=..#72.....#.#..
+feld_10=..#..#.31.#.#..
+feld_11=..#6##..#.#4#..
+feld_12=..#.....#...#..
+feld_13=..###########..
+feld_14=...............
+mole_0=.22..
+mole_1=13357
+mole_2=.446.
diff --git a/katomic/levels/level_26 b/katomic/levels/level_26
new file mode 100644
index 00000000..1548b710
--- /dev/null
+++ b/katomic/levels/level_26
@@ -0,0 +1,27 @@
+[Level]
+Name=Propyne
+atom_1=1-c
+atom_2=2-gF
+atom_3=1-e
+atom_4=2-cH
+atom_5=2-aceg
+atom_6=1-a
+atom_7=1-g
+feld_00=...............
+feld_01=.#############.
+feld_02=.#...#####...#.
+feld_03=.#.#.........#.
+feld_04=.#.#.2#...#..#.
+feld_05=.####.###6#..#.
+feld_06=.#......#.##.#.
+feld_07=.#3#.......#.#.
+feld_08=.####.####...#.
+feld_09=.#.#....#....#.
+feld_10=.#...#.....#.#.
+feld_11=.#..###.1.##5#.
+feld_12=.#.7#....##4.#.
+feld_13=.#############.
+feld_14=...............
+mole_0=...3.
+mole_1=12457
+mole_2=...6.
diff --git a/katomic/levels/level_27 b/katomic/levels/level_27
new file mode 100644
index 00000000..06a349f7
--- /dev/null
+++ b/katomic/levels/level_27
@@ -0,0 +1,33 @@
+[Level]
+Name=Furanal
+atom_1=1-d
+atom_2=1-b
+atom_3=2-chC
+atom_4=2-dfA
+atom_5=A-
+atom_6=3-bh
+atom_7=2-bgC
+atom_8=1-f
+atom_9=2-ehB
+atom_a=1-a
+atom_b=3-D
+feld_00=...............
+feld_01=...########....
+feld_02=...#..#...#....
+feld_03=.###..5...####.
+feld_04=.#..8###..9..#.
+feld_05=.#..a...3#...#.
+feld_06=.####.#..#6..#.
+feld_07=.#b...#.###..#.
+feld_08=.#..........4#.
+feld_09=.##.####....##.
+feld_10=.#4.#.7...#..#.
+feld_11=.#.....#..#..#.
+feld_12=.####.1#.2#.##.
+feld_13=....##########.
+feld_14=...............
+mole_0=1...8
+mole_1=.357.
+mole_2=.4.4.
+mole_3=2.6.9b
+mole_4=....a
diff --git a/katomic/levels/level_28 b/katomic/levels/level_28
new file mode 100644
index 00000000..a614ec0a
--- /dev/null
+++ b/katomic/levels/level_28
@@ -0,0 +1,32 @@
+[Level]
+Name=Pyran
+atom_1=3-bd
+atom_2=1-e
+atom_3=2-afB
+atom_4=2-ehB
+atom_5=1-a
+atom_6=2-adD
+atom_7=2-beD
+atom_8=2-bdfh
+atom_9=1-f
+atom_a=1-h
+feld_00=...............
+feld_01=..#######......
+feld_02=..#.....#......
+feld_03=..#..6..######.
+feld_04=..#.##..#9...#.
+feld_05=..#.12.7####.#.
+feld_06=..###...#....#.
+feld_07=.##.##..#.4..#.
+feld_08=.#.....#2.#..#.
+feld_09=.#........#5.#.
+feld_10=.#.3a#5.#.##.#.
+feld_11=.#####..#....#.
+feld_12=....#...#8####.
+feld_13=....#######....
+feld_14=...............
+mole_0=.22..
+mole_1=.36.9
+mole_2=1..8.
+mole_3=.47.a
+mole_4=.55..
diff --git a/katomic/levels/level_29 b/katomic/levels/level_29
new file mode 100644
index 00000000..e5417b46
--- /dev/null
+++ b/katomic/levels/level_29
@@ -0,0 +1,31 @@
+[Level]
+Name=Cyclo-Pentane
+atom_1=1-d
+atom_2=1-c
+atom_3=2-begh
+atom_4=2-aceg
+atom_5=1-a
+atom_6=2-bdfh
+atom_7=2-bdeg
+atom_8=1-f
+atom_9=1-h
+feld_00=...............
+feld_01=..########.....
+feld_02=..#5.....#####.
+feld_03=..##..2#..9..#.
+feld_04=..#..6#1###7.#.
+feld_05=..#.......####.
+feld_06=..#........#...
+feld_07=..##2#.8#..#...
+feld_08=...###.##..#...
+feld_09=.###453....###.
+feld_10=.#1..##..#9..#.
+feld_11=.#....6..#####.
+feld_12=.#.#....8#.....
+feld_13=.#########.....
+feld_14=...............
+mole_0=.1.8.
+mole_1=1.6.8
+mole_2=23.6.
+mole_3=247.9
+mole_4=.559.
diff --git a/katomic/levels/level_3 b/katomic/levels/level_3
new file mode 100644
index 00000000..0df76525
--- /dev/null
+++ b/katomic/levels/level_3
@@ -0,0 +1,26 @@
+[Level]
+Name=Methanol
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=3-cg
+atom_6=1-g
+feld_00=...............
+feld_01=...............
+feld_02=..........####.
+feld_03=.####.....#..#.
+feld_04=.#..#.....#..#.
+feld_05=.#..##...##.5#.
+feld_06=.#..4#####...#.
+feld_07=.#.#.#.3#....#.
+feld_08=.#......#.6..#.
+feld_09=.#..#.#...#..#.
+feld_10=.#2..........#.
+feld_11=.#...#.#...#.#.
+feld_12=.######1...#.#.
+feld_13=......########.
+feld_14=...............
+mole_0=.2..
+mole_1=1356
+mole_2=.4..
diff --git a/katomic/levels/level_30 b/katomic/levels/level_30
new file mode 100644
index 00000000..8b78c3c8
--- /dev/null
+++ b/katomic/levels/level_30
@@ -0,0 +1,40 @@
+[Level]
+Name=Nitro-Glycerin
+atom_1=3-cd
+atom_2=1-c
+atom_3=4-beg
+atom_4=3-ah
+atom_5=1-e
+atom_6=2-aceg
+atom_7=3-af
+atom_8=A-
+atom_9=4-beh
+atom_a=3-ae
+atom_b=1-a
+atom_c=3-fg
+atom_d=3-ad
+atom_e=1-g
+atom_f=4-ceh
+atom_g=3-ba
+feld_00=...............
+feld_01=...#########...
+feld_02=...#.......#...
+feld_03=...#.1#f..####.
+feld_04=...#6#9#.c...#.
+feld_05=...#1#...e..4#.
+feld_06=.###.###...###.
+feld_07=.#.....3..a.c#.
+feld_08=.#.5#2.6.##..#.
+feld_09=.#.###8#..####.
+feld_10=.#g##..#b..d7#.
+feld_11=.#6....##..###.
+feld_12=.#######5..#...
+feld_13=.......#####...
+feld_14=...............
+mole_0=..18c..
+mole_1=...9...
+mole_2=..5a5..
+mole_3=.2666e.
+mole_4=..7bd..
+mole_5=13...fc
+mole_6=.4...g.
diff --git a/katomic/levels/level_31 b/katomic/levels/level_31
new file mode 100644
index 00000000..c23f8a56
--- /dev/null
+++ b/katomic/levels/level_31
@@ -0,0 +1,29 @@
+[Level]
+Name=Ethane
+atom_1=1-d
+atom_2=1-b
+atom_3=1-e
+atom_4=2-abeh
+atom_5=2-adef
+atom_6=1-a
+atom_7=1-f
+atom_8=1-h
+feld_00=...............
+feld_01=...............
+feld_02=....#########..
+feld_03=....#....2..#..
+feld_04=....#..#.#..#..
+feld_05=....#3.5.####..
+feld_06=..#####4.#1#...
+feld_07=..#...#....#...
+feld_08=..#........#...
+feld_09=..#.6.###8.##..
+feld_10=..###7...#..#..
+feld_11=..#.........#..
+feld_12=..###########..
+feld_13=...............
+feld_14=...............
+mole_0=137
+mole_1=.4.
+mole_2=.5.
+mole_3=268
diff --git a/katomic/levels/level_32 b/katomic/levels/level_32
new file mode 100644
index 00000000..73d96b51
--- /dev/null
+++ b/katomic/levels/level_32
@@ -0,0 +1,31 @@
+[Level]
+Name=Crystal 2
+atom_1=o-bd
+atom_2=o-bdf
+atom_3=o-bdh
+atom_4=o-df
+atom_5=o-bdfh
+atom_6=o-bh
+atom_7=o-dfh
+atom_8=o-bfh
+atom_9=o-fh
+feld_00=...............
+feld_01=...............
+feld_02=...............
+feld_03=......###......
+feld_04=.....##8##.....
+feld_05=....##..2##....
+feld_06=...##7.5..##...
+feld_07=...#...6..4#...
+feld_08=...##3..9.##...
+feld_09=....##..1##....
+feld_10=.....##.##.....
+feld_11=......###......
+feld_12=...............
+feld_13=...............
+feld_14=...............
+mole_0=..4..
+mole_1=.2.7.
+mole_2=1.5.9
+mole_3=.3.8.
+mole_4=..6..
diff --git a/katomic/levels/level_33 b/katomic/levels/level_33
new file mode 100644
index 00000000..929c5fea
--- /dev/null
+++ b/katomic/levels/level_33
@@ -0,0 +1,27 @@
+[Level]
+Name=Ethylene-Glycol
+atom_1=1-b
+atom_2=1-d
+atom_3=3-bf
+atom_4=2-bdfh
+atom_5=1-f
+atom_6=1-h
+feld_00=...............
+feld_01=....##########.
+feld_02=....#....3#..#.
+feld_03=....#.#...#..#.
+feld_04=....#..#.....#.
+feld_05=.####...#...##.
+feld_06=.#..4#..4#...#.
+feld_07=.#...2#1..#.##.
+feld_08=.#..#..#.5#.#..
+feld_09=.##1##..#.###..
+feld_10=..#....3...#...
+feld_11=..#....#.6.#...
+feld_12=..######.5.#...
+feld_13=.......#####...
+feld_14=...............
+mole_0=.2.5.5
+mole_1=..4.3.
+mole_2=.3.4..
+mole_3=1.1.6.
diff --git a/katomic/levels/level_34 b/katomic/levels/level_34
new file mode 100644
index 00000000..5bee796c
--- /dev/null
+++ b/katomic/levels/level_34
@@ -0,0 +1,33 @@
+[Level]
+Name=L-Alanine
+atom_1=1-d
+atom_2=1-c
+atom_3=1-b
+atom_4=2-cfgh
+atom_5=1-e
+atom_6=2-aceg
+atom_7=4-adf
+atom_8=3-C
+atom_9=2-cgA
+atom_a=1-h
+atom_b=3-cg
+atom_c=1-g
+feld_00=...............
+feld_01=.#############.
+feld_02=.#.b.4...5...#.
+feld_03=.#.####..##..#.
+feld_04=.#..3......3.#.
+feld_05=.##.....7..#.#.
+feld_06=.#..#.#.#2.#.#.
+feld_07=.#.1..#.#..#.#.
+feld_08=.#c#......9..#.
+feld_09=.#.#....8....#.
+feld_10=.#....#..#a.##.
+feld_11=.#..#.#..#...#.
+feld_12=.#....#6.#...#.
+feld_13=.#############.
+feld_14=...............
+mole_0=1.58..
+mole_1=2469bc
+mole_2=3.7...
+mole_3=.3.a..
diff --git a/katomic/levels/level_35 b/katomic/levels/level_35
new file mode 100644
index 00000000..948dcfa3
--- /dev/null
+++ b/katomic/levels/level_35
@@ -0,0 +1,31 @@
+[Level]
+Name=Cyanoguanidine
+atom_1=1-d
+atom_2=1-b
+atom_3=4-cfh
+atom_4=2-cgC
+atom_5=4-eA
+atom_6=1-a
+atom_7=1-e
+atom_8=4-acg
+atom_9=2-gG
+atom_a=4-E
+feld_00=...............
+feld_01=...............
+feld_02=...............
+feld_03=..###########..
+feld_04=..#.#.......#..
+feld_05=..#9###53##.#..
+feld_06=..#..2.#..a.#..
+feld_07=..####....###..
+feld_08=..#.....8...#..
+feld_09=..#7..#6###1#..
+feld_10=..#......4..#..
+feld_11=..###########..
+feld_12=...............
+feld_13=...............
+feld_14=...............
+mole_0=1..7.
+mole_1=.3489
+mole_2=2.5.a
+mole_3=..6..
diff --git a/katomic/levels/level_36 b/katomic/levels/level_36
new file mode 100644
index 00000000..b455234e
--- /dev/null
+++ b/katomic/levels/level_36
@@ -0,0 +1,23 @@
+[Level]
+Name=Prussic Acid (Cyanic Acid)
+atom_1=1-e
+atom_2=2-aG
+atom_3=4-E
+feld_00=...............
+feld_01=...............
+feld_02=...####........
+feld_03=...#..####.....
+feld_04=...##....####..
+feld_05=...#.3.#.#..#..
+feld_06=...###.#....#..
+feld_07=...#...1...##..
+feld_08=...##2......##.
+feld_09=.###.....#...#.
+feld_10=.#.###...#####.
+feld_11=.#.........#...
+feld_12=.###########...
+feld_13=...............
+feld_14=...............
+mole_0=1
+mole_1=2
+mole_2=3 \ No newline at end of file
diff --git a/katomic/levels/level_37 b/katomic/levels/level_37
new file mode 100644
index 00000000..4571d0ba
--- /dev/null
+++ b/katomic/levels/level_37
@@ -0,0 +1,41 @@
+[Level]
+Name=Anthracene
+atom_1=1-d
+atom_2=1-c
+atom_3=1-b
+atom_4=2-ehB
+atom_5=2-agC
+atom_6=2-cfA
+atom_7=2-beD
+atom_8=2-acC
+atom_9=2-egA
+atom_a=2-faB
+atom_b=1-f
+atom_c=2-bgC
+atom_d=2-ceA
+atom_e=2-aeD
+atom_f=2-adD
+atom_g=1-g
+atom_h=1-h
+feld_00=###############
+feld_01=#..4##.....#..#
+feld_02=#..h##...7###.#
+feld_03=#..d......1...#
+feld_04=#.......b....##
+feld_05=####..c.###d.##
+feld_06=#....ce.g...3.#
+feld_07=#..........##f#
+feld_08=##....#....a#.#
+feld_09=#9.#2.#b5.....#
+feld_10=#.###.####....#
+feld_11=#..#8.b..3....#
+feld_12=#.....#....#..#
+feld_13=#.a..#.....#63#
+feld_14=###############
+mole_0=1..b..
+mole_1=.47.b.
+mole_2=258c.b
+mole_3=.69dc.
+mole_4=3.aedg
+mole_5=.3.af.
+mole_6=..3..h
diff --git a/katomic/levels/level_38 b/katomic/levels/level_38
new file mode 100644
index 00000000..ffe619b3
--- /dev/null
+++ b/katomic/levels/level_38
@@ -0,0 +1,30 @@
+[Level]
+Name=Thiazole
+atom_1=1-d
+atom_2=2-ehB
+atom_3=C-
+atom_4=4-aB
+atom_5=2-bdD
+atom_6=1-f
+atom_7=5-fh
+atom_8=1-h
+feld_00=...............
+feld_01=..###########..
+feld_02=.##.........##.
+feld_03=.#..#..###.1.#.
+feld_04=.#.##..#8..#.#.
+feld_05=.#3#...#..##.#.
+feld_06=.#.........5.#.
+feld_07=.#...###.5####.
+feld_08=.#.#2#7..#4..#.
+feld_09=.#6#.#.......#.
+feld_10=.#.#.....#...#.
+feld_11=.#......##...#.
+feld_12=.##.....#...##.
+feld_13=..###########..
+feld_14=...............
+mole_0=1..6
+mole_1=.25.
+mole_2=.3.7
+mole_3=.45.
+mole_4=...8
diff --git a/katomic/levels/level_39 b/katomic/levels/level_39
new file mode 100644
index 00000000..cabcb547
--- /dev/null
+++ b/katomic/levels/level_39
@@ -0,0 +1,39 @@
+[Level]
+Name=Saccharin
+atom_1=1-c
+atom_2=4-bdg
+atom_3=3-C
+atom_4=2-dfA
+atom_5=5-chCD
+atom_6=2-ehB
+atom_7=2-agB
+atom_8=1-e
+atom_9=2-acD
+atom_a=2-ceD
+atom_b=1-a
+atom_c=2-bgC
+atom_d=2-dgA
+atom_e=1-f
+atom_f=1-h
+atom_g=3-A
+atom_h=3-B
+feld_00=...............
+feld_01=.......#####...
+feld_02=..######d#h###.
+feld_03=..#4..3#.#.9e#.
+feld_04=..#......b...#.
+feld_05=..#c#5.......#.
+feld_06=.##....#.#...#.
+feld_07=.#.....#8#1..#.
+feld_08=.#..f###.###.#.
+feld_09=.#.....2.....#.
+feld_10=.####...#g.###.
+feld_11=....#a...7.#...
+feld_12=....###..6.#...
+feld_13=......######...
+feld_14=...............
+mole_0=..3....
+mole_1=..4.8.e
+mole_2=12.69c.
+mole_3=.h57ad.
+mole_4=..g.b.f
diff --git a/katomic/levels/level_4 b/katomic/levels/level_4
new file mode 100644
index 00000000..20558070
--- /dev/null
+++ b/katomic/levels/level_4
@@ -0,0 +1,26 @@
+[Level]
+Name=Ethylene
+atom_1=1-d
+atom_2=1-b
+atom_3=2-fhB
+atom_4=2-bdD
+atom_5=1-f
+atom_6=1-h
+feld_00=...............
+feld_01=...............
+feld_02=..###.....###..
+feld_03=..#.#.....#.#..
+feld_04=..#2#######.#..
+feld_05=..#......#..#..
+feld_06=..##..4.#...#..
+feld_07=..#.#....5#3#..
+feld_08=..#...#....##..
+feld_09=..#..#....61#..
+feld_10=..#.#######.#..
+feld_11=..#.#.....#.#..
+feld_12=..###.....###..
+feld_13=...............
+feld_14=...............
+mole_0=1..5
+mole_1=.34.
+mole_2=2..6
diff --git a/katomic/levels/level_40 b/katomic/levels/level_40
new file mode 100644
index 00000000..7a9bef2f
--- /dev/null
+++ b/katomic/levels/level_40
@@ -0,0 +1,37 @@
+[Level]
+Name=Styrene
+atom_1=1-d
+atom_2=1-b
+atom_3=2-fhB
+atom_4=2-bdD
+atom_5=1-c
+atom_6=1-f
+atom_7=2-chC
+atom_8=2-egA
+atom_9=2-afB
+atom_a=2-bgC
+atom_b=2-ceA
+atom_c=2-adD
+atom_d=1-g
+atom_e=1-h
+feld_00=...............
+feld_01=...............
+feld_02=..###########..
+feld_03=..#.......#.#..
+feld_04=..#..b###.8.#..
+feld_05=..#...16#.#.#..
+feld_06=..#...2e.6#5#..
+feld_07=..#..c.3.##.#..
+feld_08=..#.##2##.7##..
+feld_09=..#..#4#....#..
+feld_10=..##9#.#.d..#..
+feld_11=..#......#.a#..
+feld_12=..###########..
+feld_13=...............
+feld_14=...............
+mole_0=1..6..
+mole_1=.34..6
+mole_2=2..7a.
+mole_3=..58bd
+mole_4=...9c.
+mole_5=..2..e
diff --git a/katomic/levels/level_41 b/katomic/levels/level_41
new file mode 100644
index 00000000..733a333d
--- /dev/null
+++ b/katomic/levels/level_41
@@ -0,0 +1,34 @@
+[Level]
+Name=Melamine
+atom_1=1-c
+atom_2=1-e
+atom_3=4-acg
+atom_4=2-cgC
+atom_5=4-cA
+atom_6=1-b
+atom_7=4-gec
+atom_8=2-aceg
+atom_9=4-adf
+atom_a=4-gA
+atom_b=1-h
+atom_c=1-g
+feld_00=...............
+feld_01=.####.....####.
+feld_02=.#..#######3.#.
+feld_03=.#9....#....6#.
+feld_04=.##.#.4#..#.##.
+feld_05=..#.........#..
+feld_06=..#....2..2.#..
+feld_07=..###.13c.###..
+feld_08=..#7........#..
+feld_09=..#....4...a#..
+feld_10=.##.#..#5.#.##.
+feld_11=.#.....#8....#.
+feld_12=.#b.#######..#.
+feld_13=.####.....####.
+feld_14=...............
+mole_0=.2...2.
+mole_1=134743c
+mole_2=..58a..
+mole_3=...9...
+mole_4=..6.b..
diff --git a/katomic/levels/level_42 b/katomic/levels/level_42
new file mode 100644
index 00000000..50cc2ce5
--- /dev/null
+++ b/katomic/levels/level_42
@@ -0,0 +1,26 @@
+[Level]
+Name=Cyclobutane
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=1-g
+feld_00=...............
+feld_01=...............
+feld_02=..########.....
+feld_03=..#...1..##....
+feld_04=..##5.##.4###..
+feld_05=...##.3.....#..
+feld_06=....#.#.....#..
+feld_07=...##1##..#3#..
+feld_08=...#...5#2###..
+feld_09=...#......#.#..
+feld_10=...#3...3..2#..
+feld_11=...#4.#.###.#..
+feld_12=...######.###..
+feld_13=...............
+feld_14=...............
+mole_0=.22.
+mole_1=1335
+mole_2=1335
+mole_3=.44.
diff --git a/katomic/levels/level_43 b/katomic/levels/level_43
new file mode 100644
index 00000000..e2aabf80
--- /dev/null
+++ b/katomic/levels/level_43
@@ -0,0 +1,42 @@
+[Level]
+Name=Nicotine
+atom_1=1-d
+atom_2=1-c
+atom_3=2-ehB
+atom_4=2-agC
+atom_5=4-cA
+atom_6=1-e
+atom_7=2-aeD
+atom_8=2-acC
+atom_9=2-egA
+atom_a=1-a
+atom_b=1-b
+atom_c=2-abeg
+atom_d=4-ace
+atom_e=2-adef
+atom_f=2-abdf
+atom_g=2-bdeg
+atom_h=1-h
+atom_i=1-f
+atom_j=2-bdfh
+feld_00=...............
+feld_01=...###########.
+feld_02=..##.h..#a..i#.
+feld_03=..#3...6#...##.
+feld_04=.##..#..6...#..
+feld_05=.#...2..j#d.##.
+feld_06=.#.a#....a#.e#.
+feld_07=.#.#g..c...#.#.
+feld_08=.##h..8.9..h##.
+feld_09=.#......1....#.
+feld_10=.##7f#5.#.6.##.
+feld_11=..#..b#.#4###..
+feld_12=..##..i####....
+feld_13=...#####.......
+feld_14=...............
+mole_0=1.6.6i.
+mole_1=.376f.i
+mole_2=248c.j.
+mole_3=.59dg.h
+mole_4=..aeah.
+mole_5=..bah..
diff --git a/katomic/levels/level_44 b/katomic/levels/level_44
new file mode 100644
index 00000000..3d432f09
--- /dev/null
+++ b/katomic/levels/level_44
@@ -0,0 +1,43 @@
+[Level]
+Name=Acetyle salicylic acid
+atom_1=1-c
+atom_2=3-B
+atom_3=1-b
+atom_4=1-e
+atom_5=2-aceg
+atom_6=2-aeD
+atom_7=3-ae
+atom_8=2-acC
+atom_9=2-egA
+atom_a=2-afB
+atom_b=1-g
+atom_c=2-bgC
+atom_d=2-ceA
+atom_e=2-adD
+atom_f=2-cfA
+atom_g=1-h
+atom_h=3-cg
+atom_i=3-C
+feld_00=...............
+feld_01=.........#####.
+feld_02=.#########9..#.
+feld_03=.#.#..f..#..##.
+feld_04=.#..#2#.5.#1.#.
+feld_05=.#7...8..b...#.
+feld_06=.###6#.#.#bh.#.
+feld_07=...#.e#.1.#d.#.
+feld_08=...##c..g.b###.
+feld_09=...#.#.#.4i#...
+feld_10=..##...3#..#...
+feld_11=..#..a#..###...
+feld_12=..########.....
+feld_13=...............
+feld_14=...............
+mole_0=.4....
+mole_1=15b...
+mole_2=26.i..
+mole_3=.7.fhb
+mole_4=.8c...
+mole_5=19db..
+mole_6=.ae...
+mole_7=3..g..
diff --git a/katomic/levels/level_45 b/katomic/levels/level_45
new file mode 100644
index 00000000..376fc944
--- /dev/null
+++ b/katomic/levels/level_45
@@ -0,0 +1,36 @@
+[Level]
+Name=Meta-Di-Nitro-Benzene
+atom_1=3-B
+atom_2=1-d
+atom_3=4-bD
+atom_4=3-A
+atom_5=2-ehB
+atom_6=2-afB
+atom_7=1-e
+atom_8=2-acD
+atom_9=2-ceD
+atom_a=1-a
+atom_b=2-bgC
+atom_c=2-dgA
+atom_d=1-f
+atom_e=4-hB
+atom_f=3-D
+feld_00=...............
+feld_01=...####........
+feld_02=...#..####.....
+feld_03=...#e2..f#.....
+feld_04=...#.#..8#.....
+feld_05=..##b...##.....
+feld_06=..#.#....####..
+feld_07=..#....c....#..
+feld_08=..#7..##.6d.##.
+feld_09=..#5#..9.#...#.
+feld_10=..#.#1...#...#.
+feld_11=..#....3.a.#.#.
+feld_12=..####.#.#####.
+feld_13=.....#####.....
+feld_14=...............
+mole_0=.2.7.d.
+mole_1=..58b..
+mole_2=..69c..
+mole_3=13.a.ef
diff --git a/katomic/levels/level_46 b/katomic/levels/level_46
new file mode 100644
index 00000000..9f2317f4
--- /dev/null
+++ b/katomic/levels/level_46
@@ -0,0 +1,29 @@
+[Level]
+Name=Propyne
+atom_1=1-d
+atom_2=1-e
+atom_3=2-abeh
+atom_4=2-aG
+atom_5=2-eE
+atom_6=1-a
+atom_7=1-f
+feld_00=...............
+feld_01=...##########..
+feld_02=...#........#..
+feld_03=...#.1#.....#..
+feld_04=..##.##.6#.##..
+feld_05=..#.....##7#...
+feld_06=..##.....####..
+feld_07=..#4.#......#..
+feld_08=..###5.#.3#.#..
+feld_09=....#..####.#..
+feld_10=....#..#..#.#..
+feld_11=....#..#..#.#..
+feld_12=....####..#2#..
+feld_13=..........###..
+feld_14=...............
+mole_0=127
+mole_1=.3.
+mole_2=.4.
+mole_3=.5.
+mole_4=.6.
diff --git a/katomic/levels/level_47 b/katomic/levels/level_47
new file mode 100644
index 00000000..d410afa5
--- /dev/null
+++ b/katomic/levels/level_47
@@ -0,0 +1,31 @@
+[Level]
+Name=Malonic Acid
+atom_1=1-c
+atom_2=3-dg
+atom_3=2-chC
+atom_4=3-C
+atom_5=1-e
+atom_6=2-aceg
+atom_7=1-a
+atom_8=2-dgA
+atom_9=3-ch
+atom_a=1-g
+atom_b=3-A
+feld_00=...............
+feld_01=...............
+feld_02=..#########....
+feld_03=..#.#2....#....
+feld_04=..#.#...6.#....
+feld_05=..#..4.##5#....
+feld_06=..#..b..#7#....
+feld_07=..#..#.1a.###..
+feld_08=..#..##.....#..
+feld_09=..#.39.8....#..
+feld_10=..#.........#..
+feld_11=..###..#....#..
+feld_12=....#########..
+feld_13=...............
+feld_14=...............
+mole_0=12.54..
+mole_1=..368..
+mole_2=..b7.9a
diff --git a/katomic/levels/level_48 b/katomic/levels/level_48
new file mode 100644
index 00000000..a78c8fc0
--- /dev/null
+++ b/katomic/levels/level_48
@@ -0,0 +1,35 @@
+[Level]
+Name=2,2-Dimethylpropane
+atom_1=1-d
+atom_2=1-c
+atom_3=1-b
+atom_4=2-cfgh
+atom_5=1-e
+atom_6=2-abeh
+atom_7=2-aceg
+atom_8=2-adfe
+atom_9=1-a
+atom_a=1-f
+atom_b=2-bcdg
+atom_c=1-h
+atom_d=1-g
+feld_00=...............
+feld_01=......######...
+feld_02=.####.#..1a#...
+feld_03=.#5.#.##.3c#...
+feld_04=.#9.###6#..#...
+feld_05=.##...47b..###.
+feld_06=.#.#..#8.....#.
+feld_07=.#...#..#..#.#.
+feld_08=.#.#...#.....#.
+feld_09=.#..#....#.1a#.
+feld_10=.#.2d......3c#.
+feld_11=.#....#..#####.
+feld_12=.##....#.#.....
+feld_13=..########.....
+feld_14=...............
+mole_0=.15a.
+mole_1=1.6.a
+mole_2=247bd
+mole_3=3.8.c
+mole_4=.39c.
diff --git a/katomic/levels/level_49 b/katomic/levels/level_49
new file mode 100644
index 00000000..446cba87
--- /dev/null
+++ b/katomic/levels/level_49
@@ -0,0 +1,36 @@
+[Level]
+Name=Ethyl-Benzene
+atom_1=1-d
+atom_2=1-b
+atom_3=2-ehB
+atom_4=2-afB
+atom_5=1-e
+atom_6=2-abeh
+atom_7=2-acD
+atom_8=2-ceD
+atom_9=1-a
+atom_a=1-f
+atom_b=2-bgC
+atom_c=2-dgA
+atom_d=1-h
+feld_00=...............
+feld_01=..#####........
+feld_02=..#15a#######..
+feld_03=..#.6......8#..
+feld_04=..##9.c#...##..
+feld_05=..#.#.#7...3#..
+feld_06=..#........4#..
+feld_07=..#..1##...##..
+feld_08=..#..2.#.a..#..
+feld_09=..###..b#d..#..
+feld_10=....#...##..#..
+feld_11=....#.#.....#..
+feld_12=....#.#.16a.#..
+feld_13=....#########..
+feld_14=...............
+mole_0=.15a.
+mole_1=.16a.
+mole_2=1.6.a
+mole_3=.37b.
+mole_4=.48c.
+mole_5=2.9.d
diff --git a/katomic/levels/level_5 b/katomic/levels/level_5
new file mode 100644
index 00000000..30adf5cc
--- /dev/null
+++ b/katomic/levels/level_5
@@ -0,0 +1,28 @@
+[Level]
+Name=Propene
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=2-agB
+atom_6=2-bdD
+atom_7=1-f
+atom_8=1-h
+feld_00=...............
+feld_01=...............
+feld_02=..#########....
+feld_03=..#7#.#.#.#....
+feld_04=..#.#.#.#.###..
+feld_05=.##4.6#2#.#.#..
+feld_06=.#2.1...#5#.#..
+feld_07=.#.#......#.#..
+feld_08=.#.#3#......#..
+feld_09=.#.#.#.#...##..
+feld_10=.###.#8#.#.#...
+feld_11=...#.#.#.#.#...
+feld_12=...#########...
+feld_13=...............
+feld_14=...............
+mole_0=.22.7
+mole_1=1356.
+mole_2=.4..8
diff --git a/katomic/levels/level_50 b/katomic/levels/level_50
new file mode 100644
index 00000000..3c79af00
--- /dev/null
+++ b/katomic/levels/level_50
@@ -0,0 +1,38 @@
+[Level]
+Name=L-Asparagine
+atom_1=3-B
+atom_2=1-d
+atom_3=1-b
+atom_4=1-e
+atom_5=3-ae
+atom_6=2-acD
+atom_7=1-c
+atom_8=4-cfh
+atom_9=2-aceg
+atom_a=2-agC
+atom_b=4-bdg
+atom_c=1-g
+atom_d=1-f
+atom_e=1-h
+atom_f=3-A
+feld_00=...............
+feld_01=...............
+feld_02=...#########...
+feld_03=...#44#.1f5#...
+feld_04=..##c.#..####..
+feld_05=..#7......#b#..
+feld_06=..#2........#..
+feld_07=..#3........#..
+feld_08=..#d#.#.....#..
+feld_09=..#e..##..#8#..
+feld_10=..##..#...###..
+feld_11=...#...699a#...
+feld_12=...#########...
+feld_13=...............
+feld_14=...............
+mole_0=.4...
+mole_1=.54.d
+mole_2=169b.
+mole_3=279ce
+mole_4=.8a..
+mole_5=3.f..
diff --git a/katomic/levels/level_51 b/katomic/levels/level_51
new file mode 100644
index 00000000..944cbd64
--- /dev/null
+++ b/katomic/levels/level_51
@@ -0,0 +1,31 @@
+[Level]
+Name=1,3,5,7-Cyclooctatetraene
+atom_1=1-d
+atom_2=1-b
+atom_3=2-bhC
+atom_4=2-dfA
+atom_5=2-fhB
+atom_6=2-bdD
+atom_7=1-f
+atom_8=1-h
+feld_00=...............
+feld_01=.########..###.
+feld_02=.#1....1####5#.
+feld_03=.#..#5.#4....#.
+feld_04=.#..##.##...4#.
+feld_05=.#..........##.
+feld_06=.#.#3..#3.#7#..
+feld_07=.#.##..##.###..
+feld_08=.#7.........##.
+feld_09=.##.#8.#8...6#.
+feld_10=..#.##.##6#2.#.
+feld_11=..#.......##.#.
+feld_12=..#2.###.....#.
+feld_13=..####.#######.
+feld_14=...............
+mole_0=.1..7.
+mole_1=1.56.7
+mole_2=.3..3.
+mole_3=.4..4.
+mole_4=2.56.8
+mole_5=.2..8.
diff --git a/katomic/levels/level_52 b/katomic/levels/level_52
new file mode 100644
index 00000000..f0480c84
--- /dev/null
+++ b/katomic/levels/level_52
@@ -0,0 +1,41 @@
+[Level]
+Name=Vanillin
+atom_1=1-c
+atom_2=3-C
+atom_3=2-dgA
+atom_4=1-b
+atom_5=2-ehB
+atom_6=2-afB
+atom_7=1-e
+atom_8=2-acD
+atom_9=2-ceD
+atom_a=1-a
+atom_b=2-bgC
+atom_c=1-d
+atom_d=3-bf
+atom_e=3-dh
+atom_f=2-bdfh
+atom_g=1-h
+atom_h=1-f
+feld_00=...............
+feld_01=........######.
+feld_02=.#########.c.#.
+feld_03=.#d.....f##h.#.
+feld_04=.#.....b.4..g#.
+feld_05=.#.#.........#.
+feld_06=.##...#..87.##.
+feld_07=.#5...3#2#1.6#.
+feld_08=.##.#...#9..3#.
+feld_09=.#..#..#e#..#..
+feld_10=.#.a#.#g..#.#..
+feld_11=.####...#...#..
+feld_12=....#...#...#..
+feld_13=....#########..
+feld_14=...............
+mole_0=.....c.h
+mole_1=.2....f.
+mole_2=13.7.d.g
+mole_3=..58b...
+mole_4=..693...
+mole_5=.4.a.e..
+mole_6=......g.
diff --git a/katomic/levels/level_53 b/katomic/levels/level_53
new file mode 100644
index 00000000..85da6ee2
--- /dev/null
+++ b/katomic/levels/level_53
@@ -0,0 +1,30 @@
+[Level]
+Name=Crystal 3
+atom_1=o-bc
+atom_2=o-bcf
+atom_3=o-bcg
+atom_4=o-bcfg
+atom_5=o-cf
+atom_6=o-bg
+atom_7=o-cfg
+atom_8=o-bfg
+atom_9=o-fg
+feld_00=...............
+feld_01=...............
+feld_02=...............
+feld_03=...............
+feld_04=...#########...
+feld_05=...#8.1.4..#...
+feld_06=...#.6.4.4.#...
+feld_07=...#8.3.4.9#...
+feld_08=...#.3.2.7.#...
+feld_09=...#..2.7.5#...
+feld_10=...#########...
+feld_11=...............
+feld_12=...............
+feld_13=...............
+feld_14=...............
+mole_0=...5779
+mole_1=..2448.
+mole_2=.2448..
+mole_3=1336...
diff --git a/katomic/levels/level_54 b/katomic/levels/level_54
new file mode 100644
index 00000000..07d710b0
--- /dev/null
+++ b/katomic/levels/level_54
@@ -0,0 +1,39 @@
+[Level]
+Name=Uric Acid
+atom_1=1-d
+atom_2=3-B
+atom_3=1-b
+atom_4=4-ceh
+atom_5=2-aeD
+atom_6=4-acf
+atom_7=2-egA
+atom_8=2-acC
+atom_9=2-dgA
+atom_a=4-bdg
+atom_b=4-beh
+atom_c=1-a
+atom_d=1-f
+atom_e=2-fhB
+atom_f=3-D
+atom_g=3-C
+feld_00=...............
+feld_01=.###########...
+feld_02=.#.#.#.#...#...
+feld_03=.#...#.#...#...
+feld_04=.#.47.8#..g#...
+feld_05=.###...#.#####.
+feld_06=.#.5....b#9..#.
+feld_07=.#.....cf....#.
+feld_08=.#..2#.d....6#.
+feld_09=.#####1#...###.
+feld_10=...#...#.....#.
+feld_11=...#...#.#...#.
+feld_12=...#..3#e#a#.#.
+feld_13=...###########.
+feld_14=...............
+mole_0=1.g..
+mole_1=.47.d
+mole_2=258a.
+mole_3=.69.ef
+mole_4=3..b.
+mole_5=...c.
diff --git a/katomic/levels/level_55 b/katomic/levels/level_55
new file mode 100644
index 00000000..36fb3d64
--- /dev/null
+++ b/katomic/levels/level_55
@@ -0,0 +1,36 @@
+[Level]
+Name=Thymine
+atom_1=1-c
+atom_2=4-bdg
+atom_3=1-b
+atom_4=3-C
+atom_5=2-cfA
+atom_6=2-fhB
+atom_7=2-bdD
+atom_8=1-f
+atom_9=2-cdeh
+atom_a=1-a
+atom_b=1-g
+atom_c=1-h
+atom_d=3-D
+feld_00=...............
+feld_01=.####....#####.
+feld_02=.#31#....#.7.#.
+feld_03=.#..######.#.#.
+feld_04=.#..##28##.#.#.
+feld_05=.#..........b#.
+feld_06=.#.##....##a.#.
+feld_07=.#..6.##..5#.#.
+feld_08=.#4##....##..#.
+feld_09=.#....##...#.#.
+feld_10=.#.#.c.....#.#.
+feld_11=.#.6##..##...#.
+feld_12=.#....d2....9#.
+feld_13=.#############.
+feld_14=...............
+mole_0=..4.8.
+mole_1=..52..
+mole_2=12..6d
+mole_3=..67..
+mole_4=.3..9b
+mole_5=....ac
diff --git a/katomic/levels/level_56 b/katomic/levels/level_56
new file mode 100644
index 00000000..6badd2f6
--- /dev/null
+++ b/katomic/levels/level_56
@@ -0,0 +1,37 @@
+[Level]
+Name=Aniline
+atom_1=1-c
+atom_2=1-d
+atom_3=4-beg
+atom_4=1-a
+atom_5=2-ehB
+atom_6=2-agC
+atom_7=2-cfA
+atom_8=1-e
+atom_9=2-adD
+atom_a=A-
+atom_b=2-chC
+atom_c=2-dgA
+atom_d=1-g
+atom_e=1-h
+feld_00=...............
+feld_01=.......#######.
+feld_02=.#######c#...#.
+feld_03=.#..34#......#.
+feld_04=.#.......##7##.
+feld_05=.#...##d1a###..
+feld_06=.##6..##....#..
+feld_07=.###...e.#..#..
+feld_08=.#1.........#..
+feld_09=.#..##...##.#..
+feld_10=.#..b##...####.
+feld_11=.#..8......5.#.
+feld_12=.#######9#..2#.
+feld_13=.......#######.
+feld_14=...............
+mole_0=.2.8..
+mole_1=..59..
+mole_2=.16.bd
+mole_3=..7ac.
+mole_4=13...e
+mole_5=.4....
diff --git a/katomic/levels/level_57 b/katomic/levels/level_57
new file mode 100644
index 00000000..6be47483
--- /dev/null
+++ b/katomic/levels/level_57
@@ -0,0 +1,25 @@
+[Level]
+Name=Chloroform
+atom_1=7-d
+atom_2=7-b
+atom_3=2-bdfh
+atom_4=1-f
+atom_5=7-h
+feld_00=...............
+feld_01=......#######..
+feld_02=......#...#.#..
+feld_03=..#######.#.#..
+feld_04=..#...##....#..
+feld_05=..###1#.....#..
+feld_06=..#......4#.#..
+feld_07=..#..#...#3.#..
+feld_08=..#.2########..
+feld_09=..#..5.#.......
+feld_10=..####.#.......
+feld_11=..#....#.......
+feld_12=..######.......
+feld_13=...............
+feld_14=...............
+mole_0=1.4
+mole_1=.3.
+mole_2=2.5
diff --git a/katomic/levels/level_58 b/katomic/levels/level_58
new file mode 100644
index 00000000..742d6eb0
--- /dev/null
+++ b/katomic/levels/level_58
@@ -0,0 +1,28 @@
+[Level]
+Name=Carbonic acid
+atom_1=1-e
+atom_2=3-ad
+atom_3=3-be
+atom_4=1-a
+atom_5=2-fhB
+atom_6=3-D
+feld_00=...............
+feld_01=...............
+feld_02=..##########...
+feld_03=..#...#.1..##..
+feld_04=..#...#.#...#..
+feld_05=..#2.##.##..#..
+feld_06=..##.6......#..
+feld_07=..##........#..
+feld_08=..#...##.##.#..
+feld_09=..#....#5#..#..
+feld_10=..###...3#..#..
+feld_11=....#....4..#..
+feld_12=....#########..
+feld_13=...............
+feld_14=...............
+mole_0=1.
+mole_1=2.
+mole_2=.56
+mole_3=3.
+mole_4=4.
diff --git a/katomic/levels/level_59 b/katomic/levels/level_59
new file mode 100644
index 00000000..1684a006
--- /dev/null
+++ b/katomic/levels/level_59
@@ -0,0 +1,39 @@
+[Level]
+Name=Crystal 4
+atom_1=o-be
+atom_2=o-ad
+atom_3=o-bdf
+atom_4=o-bdh
+atom_5=o-cf
+atom_6=o-ceh
+atom_7=o-acf
+atom_8=o-ch
+atom_9=o-dg
+atom_a=o-beg
+atom_b=o-adg
+atom_c=o-bg
+atom_d=o-dfh
+atom_e=o-bfh
+atom_f=o-eh
+atom_g=o-af
+feld_00=...............
+feld_01=...............
+feld_02=..##.......##..
+feld_03=..###########..
+feld_04=...#.56..d.#...
+feld_05=...#...ba..#...
+feld_06=...#97...f.#...
+feld_07=...#.......#...
+feld_08=...#2...e.3#...
+feld_09=...#..84...#...
+feld_10=...#c...g.1#...
+feld_11=..###########..
+feld_12=..##.......##..
+feld_13=...............
+feld_14=...............
+mole_0=..59..
+mole_1=.3..d.
+mole_2=1.6a.f
+mole_3=2.7b.g
+mole_4=.4..e.
+mole_5=..8c..
diff --git a/katomic/levels/level_6 b/katomic/levels/level_6
new file mode 100644
index 00000000..f8de8bf9
--- /dev/null
+++ b/katomic/levels/level_6
@@ -0,0 +1,26 @@
+[Level]
+Name=Ethanol
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=3-cg
+atom_6=1-g
+feld_00=...............
+feld_01=.......#####...
+feld_02=.......#43.#...
+feld_03=...#####.#.#...
+feld_04=...#......4#...
+feld_05=...###2...##...
+feld_06=.....#.#1#.###.
+feld_07=.....##2...#.#.
+feld_08=..####.3.....#.
+feld_09=..#.5....#...#.
+feld_10=..#####.#..#.#.
+feld_11=.....#....#.6#.
+feld_12=.....#########.
+feld_13=...............
+feld_14=...............
+mole_0=.22..
+mole_1=13356
+mole_2=.44..
diff --git a/katomic/levels/level_60 b/katomic/levels/level_60
new file mode 100644
index 00000000..479d51d2
--- /dev/null
+++ b/katomic/levels/level_60
@@ -0,0 +1,28 @@
+[Level]
+Name=Acrylo-Nitril
+atom_1=1-d
+atom_2=1-b
+atom_3=2-bhC
+atom_4=2-dfA
+atom_5=2-fF
+atom_6=1-h
+atom_7=4-H
+feld_00=...............
+feld_01=...............
+feld_02=..#####.#####..
+feld_03=..#..1#.#5..#..
+feld_04=..#..#####7.#..
+feld_05=..#..#.3.#..#..
+feld_06=..#..#...#..#..
+feld_07=..#.........#..
+feld_08=..##..###..##..
+feld_09=...#...4...#...
+feld_10=...#.2.#.6.#...
+feld_11=...#.#.#.#.#...
+feld_12=...#########...
+feld_13=...............
+feld_14=...............
+mole_0=1.57
+mole_1=.3.
+mole_2=.4.
+mole_3=2.6
diff --git a/katomic/levels/level_61 b/katomic/levels/level_61
new file mode 100644
index 00000000..03a30071
--- /dev/null
+++ b/katomic/levels/level_61
@@ -0,0 +1,30 @@
+[Level]
+Name=Furan
+atom_1=1-d
+atom_2=1-b
+atom_3=2-bhC
+atom_4=2-cfA
+atom_5=3-df
+atom_6=A-
+atom_7=2-dgA
+atom_8=1-f
+atom_9=1-h
+feld_00=...............
+feld_01=...............
+feld_02=...............
+feld_03=.#############.
+feld_04=.#1..#...#..8#.
+feld_05=.#.#3.4#7.3#.#.
+feld_06=.#..#.#.#.#..#.
+feld_07=.#...#.5.#...#.
+feld_08=.##.........##.
+feld_09=.#...##.##...#.
+feld_10=.#2.#..6..#.9#.
+feld_11=.#############.
+feld_12=...............
+feld_13=...............
+feld_14=...............
+mole_0=1.5.8
+mole_1=.3.3.
+mole_2=.467.
+mole_3=2...9
diff --git a/katomic/levels/level_62 b/katomic/levels/level_62
new file mode 100644
index 00000000..cd17f418
--- /dev/null
+++ b/katomic/levels/level_62
@@ -0,0 +1,31 @@
+[Level]
+Name=l-Lactic acid
+atom_1=1-d
+atom_2=1-b
+atom_3=3-dh
+atom_4=2-bdfh
+atom_5=1-h
+atom_6=3-C
+atom_7=2-cfA
+atom_8=3-cg
+atom_9=1-g
+feld_00=###############
+feld_01=###############
+feld_02=##1.#.......4##
+feld_03=##..#3..#....##
+feld_04=##.....#...####
+feld_05=##.....#...4.##
+feld_06=##.#..7#6....##
+feld_07=##..#######..##
+feld_08=##....9#8..#.##
+feld_09=##.1...#.....##
+feld_10=####...#.....##
+feld_11=##....#..5#..##
+feld_12=##2.......#.5##
+feld_13=###############
+feld_14=###############
+mole_0=1..6..
+mole_1=.3.789
+mole_2=1.4...
+mole_3=.4.5..
+mole_4=2.5...
diff --git a/katomic/levels/level_63 b/katomic/levels/level_63
new file mode 100644
index 00000000..8e4835bf
--- /dev/null
+++ b/katomic/levels/level_63
@@ -0,0 +1,34 @@
+[Level]
+Name=Maleic Acid
+atom_1=3-B
+atom_2=3-be
+atom_3=2-adD
+atom_4=2-beD
+atom_5=3-ad
+atom_6=1-f
+atom_7=2-bhC
+atom_8=2-dfA
+atom_9=1-h
+feld_00=...............
+feld_01=...............
+feld_02=.#############.
+feld_03=.#6...8#5...7#.
+feld_04=.#.#..###..#.#.
+feld_05=.##6...#...9##.
+feld_06=..#..#1#3#..#..
+feld_07=..##..###..##..
+feld_08=..#....#....#..
+feld_09=.##1...#...2##.
+feld_10=.#.#.......#.#.
+feld_11=.#4.........9#.
+feld_12=.#############.
+feld_13=...............
+feld_14=...............
+mole_0=..6.
+mole_1=.2..
+mole_2=13.6
+mole_3=..7.
+mole_4=..8.
+mole_5=14.9
+mole_6=.5..
+mole_7=..9.
diff --git a/katomic/levels/level_64 b/katomic/levels/level_64
new file mode 100644
index 00000000..a2b06ed8
--- /dev/null
+++ b/katomic/levels/level_64
@@ -0,0 +1,34 @@
+[Level]
+Name=meso-Tartaric acid
+atom_1=1-c
+atom_2=3-dg
+atom_3=2-chC
+atom_4=3-C
+atom_5=1-e
+atom_6=2-aceg
+atom_7=3-ae
+atom_8=1-a
+atom_9=2-dgA
+atom_a=3-ch
+atom_b=1-g
+atom_c=3-A
+feld_00=........###....
+feld_01=..#######2####.
+feld_02=..#.3....5...#.
+feld_03=.##.a#.....#.#.
+feld_04=.#..#4#...#7.#.
+feld_05=.#.#...#.#.5.#.
+feld_06=.#...........#.
+feld_07=.#...#.....#.#.
+feld_08=.#87#6#...#..#.
+feld_09=.#.#..6#.#bc.#.
+feld_10=.#....#...#8.#.
+feld_11=.###.......#.#.
+feld_12=...#..9......#.
+feld_13=...####1######.
+feld_14=......###......
+mole_0=....5...
+mole_1=12.574..
+mole_2=..3669..
+mole_3=..c78.ab
+mole_4=...8....
diff --git a/katomic/levels/level_65 b/katomic/levels/level_65
new file mode 100644
index 00000000..8af4e9ae
--- /dev/null
+++ b/katomic/levels/level_65
@@ -0,0 +1,39 @@
+[Level]
+Name=Crystal 5
+atom_1=o-cd
+atom_2=o-bc
+atom_3=o-de
+atom_4=o-adg
+atom_5=o-cfh
+atom_6=o-beg
+atom_7=o-ab
+atom_8=o-beh
+atom_9=o-adf
+atom_a=o-ef
+atom_b=o-acf
+atom_c=o-bdg
+atom_d=o-ceh
+atom_e=o-ah
+atom_f=o-fg
+atom_g=o-gh
+atom_h=o-abcdefgh
+feld_00=...............
+feld_01=...............
+feld_02=...............
+feld_03=...#########...
+feld_04=...#########...
+feld_05=...##..3.a##...
+feld_06=...##19c6b##...
+feld_07=...##d.7.f##...
+feld_08=...##ghe58##...
+feld_09=...##2...4##...
+feld_10=...#########...
+feld_11=...#########...
+feld_12=...............
+feld_13=...............
+feld_14=...............
+mole_0=.3.a.
+mole_1=148bf
+mole_2=.5hc.
+mole_3=269dg
+mole_4=.7.e.
diff --git a/katomic/levels/level_66 b/katomic/levels/level_66
new file mode 100644
index 00000000..8d4e0fa5
--- /dev/null
+++ b/katomic/levels/level_66
@@ -0,0 +1,31 @@
+[Level]
+Name=Formic acid ethyl ester
+atom_1=1-c
+atom_2=2-bgC
+atom_3=3-A
+atom_4=1-d
+atom_5=3-bf
+atom_6=2-bdfh
+atom_7=1-h
+atom_8=1-f
+feld_00=...............
+feld_01=.....#########.
+feld_02=..####.....2.#.
+feld_03=..#..#..###.6#.
+feld_04=..#.4.......##.
+feld_05=.##.###1.#...#.
+feld_06=.#..........6#.
+feld_07=.#.......4...#.
+feld_08=.#8#.#.###...#.
+feld_09=.###........##.
+feld_10=...#.....7#3#..
+feld_11=...#7###.####..
+feld_12=...#.5...#.....
+feld_13=...#######.....
+feld_14=...............
+mole_0=...4.8
+mole_1=..4.6.
+mole_2=...6.7
+mole_3=..5.7.
+mole_4=12....
+mole_5=.3
diff --git a/katomic/levels/level_67 b/katomic/levels/level_67
new file mode 100644
index 00000000..29f1b390
--- /dev/null
+++ b/katomic/levels/level_67
@@ -0,0 +1,31 @@
+[Level]
+Name=1,4-Cyclohexadiene
+atom_1=1-c
+atom_2=1-d
+atom_3=2-bdfh
+atom_4=1-b
+atom_5=2-fhB
+atom_6=2-bdD
+atom_7=1-f
+atom_8=2-cfh
+atom_9=1-h
+feld_00=...............
+feld_01=...............
+feld_02=....#######....
+feld_03=....#2...4#....
+feld_04=..###..#..###..
+feld_05=..#6#..#..#5#..
+feld_06=..#.4.....9.#..
+feld_07=..##..7#5..##..
+feld_08=..#.3.....3.#..
+feld_09=..#6#..#..#7#..
+feld_10=..###..#..###..
+feld_11=....#2...9#....
+feld_12=....#######....
+feld_13=...............
+feld_14=...............
+mole_0=.2..7.
+mole_1=2.56.7
+mole_2=.3..3.
+mole_3=4.56.9
+mole_4=.4..9.
diff --git a/katomic/levels/level_68 b/katomic/levels/level_68
new file mode 100644
index 00000000..86addd87
--- /dev/null
+++ b/katomic/levels/level_68
@@ -0,0 +1,39 @@
+[Level]
+Name=Squaric acid
+atom_1=1-c
+atom_2=3-cg
+atom_3=1-g
+atom_4=a-a
+atom_5=a-c
+atom_6=a-c
+atom_7=o-c
+atom_8=C-c
+atom_9=D-c
+atom_a=2-ceA
+atom_b=2-egA
+atom_c=2-ag
+atom_d=2-afB
+atom_e=2-adD
+atom_f=3-bg
+atom_g=3-ch
+atom_h=3-C
+feld_00=...............
+feld_01=..###########..
+feld_02=..#e..#.....#..
+feld_03=..#3.b#....a#..
+feld_04=..#.....#####..
+feld_05=..#.........#..
+feld_06=..#.........#..
+feld_07=..#...#.....#..
+feld_08=..#.h.#d#...#..
+feld_09=..#.###h#...#..
+feld_10=..#.gf####..#..
+feld_11=..#...#.....#..
+feld_12=..#.1.#.....#..
+feld_13=..###########..
+feld_14=...............
+mole_0=..hh..
+mole_1=..ab..
+mole_2=..de..
+mole_3=1f..g3
+mole_4=......
diff --git a/katomic/levels/level_69 b/katomic/levels/level_69
new file mode 100644
index 00000000..691aa3b5
--- /dev/null
+++ b/katomic/levels/level_69
@@ -0,0 +1,43 @@
+[Level]
+Name=Ascorbic acid
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=1-g
+atom_6=3-ac
+atom_7=2-bgB
+atom_8=2-afB
+atom_9=2-bdD
+atom_a=2-fhB
+atom_b=3-df
+atom_c=2-befh
+atom_d=3-D
+atom_e=3-ch
+atom_f=3-bg
+atom_g=1-b
+atom_h=2-bdfh
+atom_i=3-bf
+atom_j=1-f
+atom_k=1-d
+feld_00=###############
+feld_01=#djgh.........#
+feld_02=#k#........c#.#
+feld_03=#a.#h......#b.#
+feld_04=#...#.....#..g#
+feld_05=#....#...#8..f#
+feld_06=#.....#.#....5#
+feld_07=#......#.....j#
+feld_08=#.....#.#.....#
+feld_09=#....#...#....#
+feld_10=#...#.....#1..#
+feld_11=#..#.......#..#
+feld_12=#.#.........#9#
+feld_13=#.i........eig#
+feld_14=###############
+mole_0=.k.j.j..
+mole_1=..h.i...
+mole_2=.i.h.b..
+mole_3=g.g.c.ad
+mole_4=...g89..
+mole_5=..1f..e5
diff --git a/katomic/levels/level_7 b/katomic/levels/level_7
new file mode 100644
index 00000000..35839e26
--- /dev/null
+++ b/katomic/levels/level_7
@@ -0,0 +1,27 @@
+[Level]
+Name=Iso-Propanol
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=3-ae
+atom_6=1-g
+feld_00=...............
+feld_01=....###.###....
+feld_02=....#1#.#.#....
+feld_03=....#4.#..#....
+feld_04=.####....2####.
+feld_05=.#...........#.
+feld_06=.##.........##.
+feld_07=..##...#...##..
+feld_08=.##.3.3....5##.
+feld_09=.#.2....3....#.
+feld_10=.####2...4####.
+feld_11=....#6.#.4#....
+feld_12=....#.###.#....
+feld_13=....###.###....
+feld_14=...............
+mole_0=.222.
+mole_1=13336
+mole_2=.454.
+mole_3=..4..
diff --git a/katomic/levels/level_70 b/katomic/levels/level_70
new file mode 100644
index 00000000..42d96c3f
--- /dev/null
+++ b/katomic/levels/level_70
@@ -0,0 +1,30 @@
+[Level]
+Name=Phosgene
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=3-cg
+atom_6=1-g
+atom_7=3-C
+atom_8=2-dfA
+atom_9=7-b
+atom_a=7-h
+feld_00=...............
+feld_01=.#############.
+feld_02=.#....a#89...#.
+feld_03=.#.....#....7#.
+feld_04=.#...#####...#.
+feld_05=.#.....#.....#.
+feld_06=.#.....#.....#.
+feld_07=.#...........#.
+feld_08=.#...........#.
+feld_09=.#...........#.
+feld_10=.#############.
+feld_11=...............
+feld_12=...............
+feld_13=...............
+feld_14=...............
+mole_0=.7.
+mole_1=.8.
+mole_2=9.a
diff --git a/katomic/levels/level_71 b/katomic/levels/level_71
new file mode 100644
index 00000000..0eb656de
--- /dev/null
+++ b/katomic/levels/level_71
@@ -0,0 +1,37 @@
+[Level]
+Name=Thiophene
+atom_1=1-d
+atom_2=1-b
+atom_3=2-fhB
+atom_4=2-bdD
+atom_5=1-f
+atom_6=1-h
+atom_7=1-h
+atom_8=5-
+atom_9=5-bh
+atom_a=2-cfA
+atom_b=2-dgA
+atom_c=2-cgC
+atom_d=A-
+atom_e=2-bgC
+atom_f=2-chC
+atom_g=2-dfA
+feld_00=...............
+feld_01=...............
+feld_02=.##############
+feld_03=.#..g#....6#..#
+feld_04=.#..5#........#
+feld_05=.#...#........#
+feld_06=.#...#........#
+feld_07=.#...#...#.####
+feld_08=.#de..........#
+feld_09=.##.......g#..#
+feld_10=.#.f....#....##
+feld_11=.#.#..#.#.....#
+feld_12=.#91..#.#2....#
+feld_13=.##############
+feld_14=...............
+mole_0=1...5
+mole_1=.fde.
+mole_2=.g.g.
+mole_3=2.9.6
diff --git a/katomic/levels/level_72 b/katomic/levels/level_72
new file mode 100644
index 00000000..3dec1394
--- /dev/null
+++ b/katomic/levels/level_72
@@ -0,0 +1,38 @@
+[Level]
+Name=Urea
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=2-agB
+atom_6=2-bdD
+atom_7=1-f
+atom_8=1-h
+atom_9=2-fhB
+atom_a=3-D
+atom_b=4-adf
+atom_c=4-bdg
+atom_d=1-b
+atom_e=4-beg
+atom_f=4-adg
+feld_00=.##########...
+feld_01=.##1..f#..#...
+feld_02=.#.#...#..####
+feld_03=.#.#.........#
+feld_04=.#.##..#.#.#.#
+feld_05=.#2........#.#
+feld_06=.#.######.##.#
+feld_07=.#.1e.......a#
+feld_08=.#4.#.#...####
+feld_09=.#..#.#...#...
+feld_10=.#..#.#...#...
+feld_11=.#.9#.#...#...
+feld_12=.#..#.#...#...
+feld_13=.###......#...
+feld_14=...########...
+mole_0=.2..
+mole_1=1f..
+mole_2=..9a
+mole_3=1e..
+mole_4=.4..
+le_4=.4..
diff --git a/katomic/levels/level_73 b/katomic/levels/level_73
new file mode 100644
index 00000000..21de96a8
--- /dev/null
+++ b/katomic/levels/level_73
@@ -0,0 +1,32 @@
+[Level]
+Name=Pyruvic Acid
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=3-cg
+atom_6=1-g
+atom_7=2-ceA
+atom_8=2-aeB
+atom_9=3-C
+atom_a=3-D
+feld_00=...............
+feld_01=###############
+feld_02=#...........6a#
+feld_03=###...#....7###
+feld_04=..#...#....#..#
+feld_05=..#...#....#..#
+feld_06=..#.###....#..#
+feld_07=..#..1#....#..#
+feld_08=..#####.......#
+feld_09=..#89#........#
+feld_10=..#..#........#
+feld_11=###..#........#
+feld_12=#5#.......##..#
+feld_13=#43.......6####
+feld_14=###########....
+mole_0=.9..
+mole_1=.756
+mole_2=.8a.
+mole_3=136.
+mole_4=.4..
diff --git a/katomic/levels/level_74 b/katomic/levels/level_74
new file mode 100644
index 00000000..166debb4
--- /dev/null
+++ b/katomic/levels/level_74
@@ -0,0 +1,34 @@
+[Level]
+Name=Ethylene oxide
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=3-ae
+atom_6=1-g
+atom_7=2-cdfh
+atom_8=2-bdfg
+atom_9=A-bdfg
+atom_a=3-bh
+atom_b=1-h
+atom_c=1-b
+atom_d=1-f
+atom_e=1-d
+feld_00=...............
+feld_01=...............
+feld_02=...............
+feld_03=##############.
+feld_04=#..a#..#....c#.
+feld_05=#.........#..#.
+feld_06=#..#b........#.
+feld_07=#9..d#.#.....#.
+feld_08=##...##...#..#.
+feld_09=##...#.#..#..#.
+feld_10=#............#.
+feld_11=#............#.
+feld_12=#.#..........#.
+feld_13=#.8.e#..#7...#.
+feld_14=##############.
+mole_0=e...d
+mole_1=.798.
+mole_2=c.a.b
diff --git a/katomic/levels/level_75 b/katomic/levels/level_75
new file mode 100644
index 00000000..4dd37688
--- /dev/null
+++ b/katomic/levels/level_75
@@ -0,0 +1,30 @@
+[Level]
+Name=Phosphoric Acid
+atom_1=1-c
+atom_2=3-cg
+atom_3=1-g
+atom_4=9-g
+atom_5=9-A
+atom_6=3-C
+atom_7=3-ae
+atom_8=9-cegA
+atom_9=1-a
+feld_00=###############
+feld_01=#.#...........#
+feld_02=#........#.#..#
+feld_03=#.........#...#
+feld_04=#.#......#.#..#
+feld_05=#6#...........#
+feld_06=###...........#
+feld_07=#......#.#....#
+feld_08=#.......#.....#
+feld_09=#......#.#...2#
+feld_10=##31..........#
+feld_11=#.....7.#...29#
+feld_12=#....##.##..###
+feld_13=#..##.###....8#
+feld_14=#####....######
+mole_0=..6..
+mole_1=12823
+mole_2=..7..
+mole_3=..9..
diff --git a/katomic/levels/level_76 b/katomic/levels/level_76
new file mode 100644
index 00000000..d6de2065
--- /dev/null
+++ b/katomic/levels/level_76
@@ -0,0 +1,37 @@
+[Level]
+Name=Diacetyl
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=1-g
+atom_6=2-ehB
+atom_7=2-afB
+atom_8=2-bdfh
+atom_9=3-D
+atom_a=3-ad
+atom_b=1-d
+atom_c=1-h
+atom_d=1-f
+atom_e=1-b
+feld_00=#######........
+feld_01=#9...9########.
+feld_02=#.....#.....d#.
+feld_03=#.....#......#.
+feld_04=#.....#......#.
+feld_05=#............#.
+feld_06=#.........####.
+feld_07=#....e....7b8.#
+feld_08=######.......e#
+feld_09=..#8..........#
+feld_10=..#.......#...#
+feld_11=..#.......#...#
+feld_12=..#b6....c#...#
+feld_13=..#########...#
+feld_14=..........#####
+mole_0=b.d.
+mole_1=.8..
+mole_2=e.69
+mole_3=b.79
+mole_4=.8..
+mole_5=e.c.
diff --git a/katomic/levels/level_77 b/katomic/levels/level_77
new file mode 100644
index 00000000..7fcd8795
--- /dev/null
+++ b/katomic/levels/level_77
@@ -0,0 +1,38 @@
+[Level]
+Name=trans-Dichloroethene
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=1-g
+atom_6=2-ehB
+atom_7=2-afB
+atom_8=2-bdfh
+atom_9=3-D
+atom_a=3-ad
+atom_b=1-d
+atom_c=1-h
+atom_d=1-f
+atom_e=1-b
+atom_f=2-fhB
+atom_g=2-bdD
+atom_h=7-f
+atom_i=7-b
+feld_00=..............
+feld_01=.#############
+feld_02=.#..i#.#.....#
+feld_03=.#..g##...#..#
+feld_04=.#...#...f#..#
+feld_05=.#.....#..####
+feld_06=.#........#...
+feld_07=.#........#...
+feld_08=.#...#....#...
+feld_09=.#...#....#...
+feld_10=.#...#....#...
+feld_11=.#...#.#.h#...
+feld_12=.#...#..#c#...
+feld_13=.#..b#...##...
+feld_14=.##########...
+mole_0=b..h
+mole_1=.fg.
+mole_2=i..c
diff --git a/katomic/levels/level_78 b/katomic/levels/level_78
new file mode 100644
index 00000000..65624b05
--- /dev/null
+++ b/katomic/levels/level_78
@@ -0,0 +1,41 @@
+[Level]
+Name=Allylisothiocyanate
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=1-g
+atom_6=2-ehB
+atom_7=2-afB
+atom_8=2-bdfh
+atom_9=3-D
+atom_a=3-ad
+atom_b=1-d
+atom_c=1-h
+atom_d=1-f
+atom_e=1-b
+atom_f=2-fhB
+atom_g=2-bdD
+atom_h=7-f
+atom_i=7-b
+atom_j=4-fB
+atom_k=2-BD
+atom_l=5-D
+feld_00=###############
+feld_01=#gl.f#.......j#
+feld_02=#..#####......#
+feld_03=#...........#.#
+feld_04=#......###..#.#
+feld_05=#...#.......###
+feld_06=#...#.......#.#
+feld_07=#.#.#.....#.#.#
+feld_08=#.#.......#...#
+feld_09=###.......#...#
+feld_10=#.#..###......#
+feld_11=#.#...........#
+feld_12=#......#####..#
+feld_13=#......ce#b.k.#
+feld_14=###############
+mole_0=b..jkl
+mole_1=.fg...
+mole_2=e..c..
diff --git a/katomic/levels/level_79 b/katomic/levels/level_79
new file mode 100644
index 00000000..6e9e6cb5
--- /dev/null
+++ b/katomic/levels/level_79
@@ -0,0 +1,57 @@
+[Level]
+Name=Diketene
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=1-g
+atom_6=2-ehB
+atom_7=2-afB
+atom_8=2-bdfh
+atom_9=3-D
+atom_a=3-ad
+atom_b=1-d
+atom_c=1-h
+atom_d=1-f
+atom_e=1-b
+atom_f=2-fhB
+atom_g=2-bdD
+atom_h=7-f
+atom_i=7-b
+atom_j=4-fB
+atom_k=2-BD
+atom_l=5-D
+atom_m=2-eg
+atom_n=2-ce
+atom_o=2-ac
+atom_p=3-ag
+atom_q=3-B
+atom_r=C-
+atom_s=A-
+atom_t=2-ag
+atom_u=2-acC
+atom_v=3-ce
+atom_w=3-A
+atom_x=2-egA
+atom_y=2-C
+atom_z=2-bhC
+feld_00=###############
+feld_01=##4x........u##
+feld_02=#..b........z.#
+feld_03=#..#.#...#.#..#
+feld_04=#...#.....#...#
+feld_05=#5.#.#...#.#..#
+feld_06=#w............#
+feld_07=##...........##
+feld_08=#v............#
+feld_09=#..#.#...#.#..#
+feld_10=#...#.....#...#
+feld_11=#..#.#...#.#..#
+feld_12=#3............#
+feld_13=##.d.........##
+feld_14=###############
+mole_0=b.d
+mole_1=.z.
+mole_2=vx.
+mole_3=u35
+mole_4=w4.
diff --git a/katomic/levels/level_8 b/katomic/levels/level_8
new file mode 100644
index 00000000..5e762c7d
--- /dev/null
+++ b/katomic/levels/level_8
@@ -0,0 +1,26 @@
+[Level]
+Name=Ethanal
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=2-agB
+atom_6=3-D
+feld_00=...............
+feld_01=...............
+feld_02=..###########..
+feld_03=..#.........#..
+feld_04=..#.##...##.#..
+feld_05=..#2.....3..#..
+feld_06=..#.###.###.#..
+feld_07=..#4...1....#..
+feld_08=..#5###2###.#..
+feld_09=..#.........#..
+feld_10=..#.##...##.#..
+feld_11=..#..6......#..
+feld_12=..###########..
+feld_13=...............
+feld_14=...............
+mole_0=.22.
+mole_1=1356
+mole_2=.4..
diff --git a/katomic/levels/level_80 b/katomic/levels/level_80
new file mode 100644
index 00000000..5d6307b5
--- /dev/null
+++ b/katomic/levels/level_80
@@ -0,0 +1,29 @@
+[Level]
+Name=Acroleine
+atom_1=1-f
+atom_2=1-h
+atom_3=1-b
+atom_4=2-dfA
+atom_5=2-bhC
+atom_6=2-bdD
+atom_7=3-B
+feld_00=...............
+feld_01=###############
+feld_02=#.....1#1.....#
+feld_03=#.....###.....#
+feld_04=#.............#
+feld_05=#.............#
+feld_06=#7#.........#2#
+feld_07=###.........###
+feld_08=###.........###
+feld_09=#6#.........#3#
+feld_10=#.............#
+feld_11=#.............#
+feld_12=#.....###.....#
+feld_13=#.....5#4.....#
+feld_14=###############
+mole_0=..1.
+mole_1=76.1
+mole_2=..5.
+mole_3=..4.
+mole_4=.3.2
diff --git a/katomic/levels/level_81 b/katomic/levels/level_81
new file mode 100644
index 00000000..8c62106a
--- /dev/null
+++ b/katomic/levels/level_81
@@ -0,0 +1,37 @@
+[Level]
+Name=Malonic Acid
+atom_1=1-f
+atom_2=1-h
+atom_3=1-b
+atom_4=2-dfA
+atom_5=2-bhC
+atom_6=2-bdD
+atom_7=3-B
+atom_8=2-bdfh
+atom_9=2-cfA
+atom_a=2-chC
+atom_b=3-cg
+atom_c=3-C
+atom_d=3-A
+atom_e=1-g
+atom_f=1-d
+feld_00=###############
+feld_01=##c8d.......e##
+feld_02=#e#.........#b#
+feld_03=#............9#
+feld_04=#.............#
+feld_05=#.............#
+feld_06=#.....#.#.....#
+feld_07=#......#......#
+feld_08=#.....#.#.....#
+feld_09=#.............#
+feld_10=#.............#
+feld_11=#.............#
+feld_12=#a#.........#f#
+feld_13=##.........b3##
+feld_14=###############
+mole_0=..c..
+mole_1=f.9be
+mole_2=.8...
+mole_3=3.abe
+mole_4=..d..
diff --git a/katomic/levels/level_82 b/katomic/levels/level_82
new file mode 100644
index 00000000..7d6fdfea
--- /dev/null
+++ b/katomic/levels/level_82
@@ -0,0 +1,44 @@
+[Level]
+Name=Uracil
+atom_1=1-f
+atom_2=1-h
+atom_3=1-b
+atom_4=2-dfA
+atom_5=2-bhC
+atom_6=2-bdD
+atom_7=3-B
+atom_8=2-bdfh
+atom_9=2-cfA
+atom_a=2-chC
+atom_b=3-cg
+atom_c=3-C
+atom_d=3-A
+atom_e=1-g
+atom_f=1-d
+atom_g=2-bgC
+atom_h=4-beh
+atom_i=4-ceh
+atom_j=2-afB
+atom_k=3-D
+atom_l=1-a
+feld_00=###############
+feld_01=#3..........4c#
+feld_02=#l..........4.#
+feld_03=#.#..#....#...#
+feld_04=#.#..#........#
+feld_05=#.#..#.#......#
+feld_06=#..##k....#...#
+feld_07=#.............#
+feld_08=#....#je...#..#
+feld_09=#..#.#i###....#
+feld_10=#....###.#....#
+feld_11=#.#...........#
+feld_12=#...#.....#.f5#
+feld_13=#............h#
+feld_14=###############
+mole_0=..c..
+mole_1=f.4..
+mole_2=.5.ie
+mole_3=.4.jk
+mole_4=3.h..
+mole_5=..l..
diff --git a/katomic/levels/level_83 b/katomic/levels/level_83
new file mode 100644
index 00000000..0c30ef6b
--- /dev/null
+++ b/katomic/levels/level_83
@@ -0,0 +1,46 @@
+[Level]
+Name=Caffeine
+atom_1=1-d
+atom_2=1-e
+atom_3=1-f
+atom_4=2-abeh
+atom_5=1-c
+atom_6=2-adgh
+atom_7=3-C
+atom_8=4-adf
+atom_9=4-ceh
+atom_a=2-Acg
+atom_b=2-bCg
+atom_c=2-cCh
+atom_d=1-g
+atom_e=3-B
+atom_f=2-acD
+atom_g=4-ceg
+atom_h=A-
+atom_i=4-Ag
+atom_j=2-adef
+atom_k=1-b
+atom_l=1-a
+atom_m=1-h
+feld_00=###############
+feld_01=#1#.....#...3d#
+feld_02=#2.........####
+feld_03=#......#.....4#
+feld_04=#e#...........#
+feld_05=#.#.#.a#.#....#
+feld_06=###...#...#...#
+feld_07=#5.#..........#
+feld_08=#..9...#...#..#
+feld_09=#.6.#...lm....#
+feld_10=####.......j..#
+feld_11=#12#.#kc.#....#
+feld_12=#ab..#..#######
+feld_13=#hi.....78..fg#
+feld_14=###############
+mole_0=....123.
+mole_1=12...4..
+mole_2=56.7.8..
+mole_3=..9ab.cd
+mole_4=.efgahi.
+mole_5=...j....
+mole_6=..klm...
diff --git a/katomic/levels/level_9 b/katomic/levels/level_9
new file mode 100644
index 00000000..ac49d58b
--- /dev/null
+++ b/katomic/levels/level_9
@@ -0,0 +1,27 @@
+[Level]
+Name=Acetone
+atom_1=1-c
+atom_2=1-e
+atom_3=2-aceg
+atom_4=1-a
+atom_5=2-cgC
+atom_6=3-A
+atom_7=1-g
+feld_00=...............
+feld_01=.#############.
+feld_02=.####..##....#.
+feld_03=.##.....#.#..#.
+feld_04=.#.....6#.####.
+feld_05=.#.#3#.4.5..2#.
+feld_06=.#.#4###..1..#.
+feld_07=.###..2....###.
+feld_08=.#.....###.#.#.
+feld_09=.#.....3.#.#.#.
+feld_10=.####.#.....7#.
+feld_11=.#..#.#.....##.
+feld_12=.#....##..####.
+feld_13=.#############.
+feld_14=...............
+mole_0=.2.2.
+mole_1=13537
+mole_2=.464.
diff --git a/katomic/main.cpp b/katomic/main.cpp
new file mode 100644
index 00000000..91072a8b
--- /dev/null
+++ b/katomic/main.cpp
@@ -0,0 +1,68 @@
+/* main.cpp
+
+ Copyright (C) 1998 Andreas Wüst (AndreasWuest@gmx.de)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ */
+
+
+#include "toplevel.h"
+
+#include <kapplication.h>
+#include <klocale.h>
+#include <kcmdlineargs.h>
+#include <kaboutdata.h>
+
+
+static const char description[] =
+ I18N_NOOP("KDE Atomic Entertainment Game");
+
+static const char version[] = "2.0";
+
+
+// ##########################
+// # Main #
+// ##########################
+
+int main(int argc, char **argv)
+{
+ KAboutData aboutData( "katomic", I18N_NOOP("KAtomic"),
+ version, description, KAboutData::License_GPL,
+ "(c) 1998, Andreas Wuest");
+ aboutData.addAuthor("Andreas Wuest", 0, "AndreasWuest@gmx.de");
+ aboutData.addAuthor("Stephan Kulow", 0, "coolo@kde.org");
+ aboutData.addAuthor("Cristian Tibirna", 0, "tibirna@kde.org");
+ aboutData.addCredit("Carsten Pfeiffer");
+ aboutData.addCredit("Dave Corrie");
+ aboutData.addCredit("Kai Jung", I18N_NOOP("6 new levels"), "jung@fh-fresenius.de");
+ aboutData.addCredit("Danny Allen", I18N_NOOP("Game graphics and application icon"), "danny@dannyallen.co.uk");
+
+ KCmdLineArgs::init( argc, argv, &aboutData );
+
+ QApplication::setColorSpec(QApplication::ManyColor);
+ KApplication a;
+ KGlobal::locale()->insertCatalogue("libkdegames");
+
+ if ( a.isRestored() )
+ RESTORE(AtomTopLevel)
+ else {
+ AtomTopLevel *top = new AtomTopLevel;
+ top->show();
+ a.setMainWidget(top);
+ }
+ return a.exec();
+}
+
diff --git a/katomic/molek.cpp b/katomic/molek.cpp
new file mode 100644
index 00000000..3425ffe1
--- /dev/null
+++ b/katomic/molek.cpp
@@ -0,0 +1,158 @@
+/****************************************************************
+**
+** Implementation Molek class, derieved from Qt tutorial 8
+**
+****************************************************************/
+
+// bemerkungen : wenn paintEvent aufgerufen wird, wird das komplette
+// widget gelöscht und nur die sachen gezeichnet, die in
+// paintEvent stehen ! sollen dinge z.b nur bei maustasten-
+// druck gezeichnet werden, so muß dies in mousePressEvent
+// stehen !
+// paintEvent wird aufgerufen, falls fenster überdeckt wird,
+// oder auch einfach bewegt wird
+
+#include <config.h>
+
+#include "molek.moc"
+#include <kiconloader.h>
+#include <kglobal.h>
+#include <kstandarddirs.h>
+#include <ksimpleconfig.h>
+#include <klocale.h>
+#include <kdebug.h>
+
+#include <ctype.h>
+
+extern int level;
+
+Molek::Molek( QWidget *parent, const char *name ) : QWidget( parent, name ),
+ data(locate("appdata", "pics/molek.png"))
+{
+ setBackgroundColor (QColor (0, 0, 0));
+ setMinimumSize(240, 200);
+}
+
+Molek::~Molek ()
+{
+}
+
+const atom& Molek::getAtom(uint index) const
+{
+ static atom none = { 0, "" };
+
+ if (index > atoms.count() || index == 0)
+ return none;
+
+ return *atoms.at(index - 1);
+}
+
+void Molek::load (const KSimpleConfig& config)
+{
+ atoms.clear();
+ QString key;
+
+ atom current;
+
+ int atom_index = 1;
+ QString value;
+ while (true) {
+ key.sprintf("atom_%c", int2atom(atom_index));
+ value = config.readEntry(key);
+ if (value.isEmpty())
+ break;
+
+ current.obj = value.at(0).latin1();
+ value = value.mid(2);
+ if (value.isNull())
+ value = "";
+
+ strlcpy(current.conn, value.ascii(), sizeof(current.conn));
+ kdWarning( atoms.find(current) != atoms.end() )
+ << "OOOPS, duplicate atom definition in " << key << endl;
+ atoms.append(current);
+ atom_index++;
+ }
+
+ QString line;
+
+ for (int j = 0; j < MOLEK_SIZE; j++) {
+
+ key.sprintf("mole_%d", j);
+ line = config.readEntry(key);
+
+ for (int i = 0; i < MOLEK_SIZE; i++)
+ molek[i][j] = atom2int(line.at(i).latin1());
+ }
+
+ mname = i18n(config.readEntry("Name", I18N_NOOP("Noname")).latin1());
+
+ int& height = _size.rheight();
+ int& width = _size.rwidth();
+
+ height = 0;
+ width = 0;
+
+ for (int i = 0; i < MOLEK_SIZE; i++)
+ for (int j = 0; j < MOLEK_SIZE; j++) {
+ if (molek [i][j] == 0)
+ continue;
+ if (i > width) width = i;
+ if (j > height) height = j;
+ }
+ height++;
+ width++;
+
+ repaint ();
+}
+
+void Molek::paintEvent( QPaintEvent * )
+{
+ QString st = i18n("Level: %1").arg(level);
+
+ QPainter paint (this);
+ paint.setPen (QColor (190, 190, 190));
+ paint.drawText (7, height() - 36, mname);
+ paint.drawText (7, height() - 18, st);
+ // spielfeld gleich zeichnen
+ for (int i = 0; i < MOLEK_SIZE; i++)
+ for (int j = 0; j < MOLEK_SIZE; j++) {
+ int x = 10 + i * 15;
+ int y = 10 + j * 15;
+
+ if (molek[i][j] == 0)
+ continue;
+
+ // paints atoms
+ if (getAtom(molek [i] [j]).obj <= '9' && getAtom(molek [i] [j]).obj >= '1')
+ bitBlt (this, x, y, &data, (getAtom(molek [i] [j]).obj - '1') * 15, 0, 15,
+ 15, CopyROP);
+
+ // paints cristals
+ if (getAtom(molek [i] [j]).obj == 'o')
+ bitBlt (this, x, y, &data, 10 * 15, 0, 15, 15, CopyROP);
+
+ // paints connections
+ if (isdigit(getAtom(molek[i][j]).obj) || getAtom(molek[i][j]).obj == 'o')
+ for (int c = 0; c < MAX_CONNS_PER_ATOM; c++) {
+ char conn = getAtom(molek [i] [j]).conn[c];
+ if (!conn)
+ break;
+
+ if (conn >= 'a' && conn <= 'a' + 8)
+ bitBlt (this, x, y, &data, (conn - 'a') * 15, 16, 15, 15, XorROP);
+ else
+ bitBlt (this, x, y, &data, (conn - 'A') * 15, 34, 15, 15, XorROP);
+
+ }
+
+
+ // paints connections
+ if (getAtom(molek[i][j]).obj >= 'A' && getAtom(molek[i][j]).obj <= 'F')
+ bitBlt (this, x, y, &data, (getAtom(molek[i][j]).obj - 'A' + 11) * 15 , 0, 15, 15,
+ CopyROP);
+
+ }
+
+ paint.end ();
+}
diff --git a/katomic/molek.h b/katomic/molek.h
new file mode 100644
index 00000000..6189e4e8
--- /dev/null
+++ b/katomic/molek.h
@@ -0,0 +1,52 @@
+/****************************************************************
+**
+** Definition of Molek class,
+**
+****************************************************************/
+
+#ifndef MOLEK_H
+#define MOLEK_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <qwidget.h>
+#include <qpoint.h>
+#include <qpainter.h>
+#include <qpixmap.h>
+#include "atom.h"
+#include <qvaluelist.h>
+
+class KSimpleConfig;
+
+#define MOLEK_SIZE 15
+
+class Molek : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Molek (QWidget *parent=0, const char *name=0);
+ ~Molek ();
+
+ void load(const KSimpleConfig& config);
+
+ const atom& getAtom(uint index) const;
+ int atomSize() const { return atoms.count(); }
+
+ QSize molecSize() const { return _size; }
+ uint getAtom(int x, int y) const { return molek[x][y]; }
+
+protected:
+ void paintEvent( QPaintEvent * );
+
+private:
+ QPixmap data;
+ uint molek[MOLEK_SIZE][MOLEK_SIZE]; // the indexes within atoms
+ QValueList<atom> atoms;
+ QString mname;
+ QSize _size;
+
+
+};
+
+#endif // MOLEK_H
diff --git a/katomic/molek.png b/katomic/molek.png
new file mode 100644
index 00000000..d816bcd9
--- /dev/null
+++ b/katomic/molek.png
Binary files differ
diff --git a/katomic/settings.h b/katomic/settings.h
new file mode 100644
index 00000000..e43471c2
--- /dev/null
+++ b/katomic/settings.h
@@ -0,0 +1,36 @@
+/* settings.h
+
+ Copyright (C) 1999 Stephan Kulow (coolo@kde.org)
+ Cristian Tibirna (tibirna@kde.org)
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+*/
+
+#ifndef SETTINGS_H
+#define SETTINGS_H
+
+#include <qstring.h>
+
+#define MAX_SPEED 10
+
+
+struct Options
+{
+ int anim_speed;
+
+ bool changed;
+};
+
+#endif
diff --git a/katomic/toplevel.cpp b/katomic/toplevel.cpp
new file mode 100644
index 00000000..ca4de920
--- /dev/null
+++ b/katomic/toplevel.cpp
@@ -0,0 +1,119 @@
+/* toplevel.cpp
+
+ Copyright (C) 1998 Andreas Wüst (AndreasWuest@gmx.de)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ */
+
+#include <qgroupbox.h>
+#include <qlayout.h>
+
+#include <kglobal.h>
+#include <klocale.h>
+#include <ksimpleconfig.h>
+#include <kstandarddirs.h>
+#include <kapplication.h>
+
+#include "gamewidget.h"
+#include "toplevel.h"
+#include "settings.h"
+#include "configbox.h"
+#include <kaction.h>
+#include <kstdaction.h>
+#include <kstdgameaction.h>
+#include <kdebug.h>
+
+extern Options settings;
+
+void AtomTopLevel::createMenu()
+{
+ KAction *act = KStdGameAction::highscores(main, SLOT(showHighscores()), actionCollection());
+ act->setText(i18n("Show &Highscores"));
+ KStdGameAction::quit(this, SLOT(close()), actionCollection());
+ KStdGameAction::restart(main, SLOT(restartLevel()), actionCollection());
+
+ KStdAction::preferences(this, SLOT(configopts()), actionCollection());
+
+ undoAction = KStdGameAction::undo (main, SLOT(doUndo()), actionCollection());
+ redoAction = KStdGameAction::redo (main, SLOT(doRedo()), actionCollection());
+ undoAction->setEnabled(false);
+ redoAction->setEnabled(false);
+ connect (main, SIGNAL (enableRedo(bool)), SLOT(enableRedo(bool)));
+ connect (main, SIGNAL (enableUndo(bool)), SLOT(enableUndo(bool)));
+
+ new KAction(i18n("Atom Up"), Key_Up, main, SLOT(moveUp()), actionCollection(), "atom_up");
+ new KAction(i18n("Atom Down"), Key_Down, main, SLOT(moveDown()), actionCollection(), "atom_down");
+ new KAction(i18n("Atom Left"), Key_Left, main, SLOT(moveLeft()), actionCollection(), "atom_left");
+ new KAction(i18n("Atom Right"), Key_Right, main, SLOT(moveRight()), actionCollection(), "atom_right");
+
+ new KAction(i18n("Next Atom"), Key_Tab, main, SLOT(nextAtom()), actionCollection(), "next_atom");
+ new KAction(i18n("Previous Atom"), SHIFT+Key_Tab, main, SLOT(previousAtom()), actionCollection(), "prev_atom");
+}
+
+void AtomTopLevel::configopts()
+{
+ (new ConfigBox(this, "Options"))->show();
+}
+
+void AtomTopLevel::initConfig()
+{
+ config = KGlobal::config();
+}
+
+void AtomTopLevel::saveConfig()
+{
+ config = KGlobal::config();
+
+ if (settings.changed) {
+ config->setGroup("Options");
+ config->writeEntry("Animation Speed", settings.anim_speed);
+ config->setGroup("Colors");
+ }
+ config->sync();
+}
+
+
+AtomTopLevel::AtomTopLevel()
+{
+ main = new GameWidget(this, "gamewidget");
+ createMenu();
+ initConfig();
+ setCentralWidget(main);
+
+ setupGUI( KMainWindow::Save | Keys | Create );
+}
+
+AtomTopLevel::~AtomTopLevel()
+{
+}
+
+bool AtomTopLevel::queryExit()
+{
+ saveConfig();
+ return true;
+}
+
+void AtomTopLevel::enableRedo(bool enable)
+{
+ redoAction->setEnabled(enable);
+}
+
+void AtomTopLevel::enableUndo(bool enable)
+{
+ undoAction->setEnabled(enable);
+}
+
+#include "toplevel.moc"
diff --git a/katomic/toplevel.h b/katomic/toplevel.h
new file mode 100644
index 00000000..38c613d0
--- /dev/null
+++ b/katomic/toplevel.h
@@ -0,0 +1,66 @@
+/* toplevel.h
+ *
+ * Andreas Wüst
+ *
+ */
+
+#ifndef TOPLEVEL_H
+#define TOPLEVEL_H
+
+class GameWidget;
+class KAction;
+class KConfig;
+
+#include <kmainwindow.h>
+
+/**
+ * This is the class AtomTopLevel. The class is used only for the program
+ * AtomTopLevel.
+ *
+ * @short Basic class for AtomTopLevel
+ * @author Andreas Wüst
+ */
+
+class AtomTopLevel : public KMainWindow
+{
+ Q_OBJECT
+
+ public:
+
+ AtomTopLevel();
+
+ ~AtomTopLevel();
+
+ protected:
+
+ // Creates the menubar and connects the menu-entries to the
+ // appropriate functions
+ void createMenu();
+
+ // Get the configuration from the config-file.
+ void initConfig();
+
+ // Save the current configuration to the config-file.
+ void saveConfig();
+
+ // called before exiting -> save configuration
+ virtual bool queryExit();
+
+ KConfig *config;
+
+ GameWidget *main;
+
+ KAction *redoAction, *undoAction;
+
+ protected slots:
+ void enableRedo(bool enable);
+ void enableUndo(bool enable);
+
+public slots:
+
+ // Shows a dialog for options other than keys
+ void configopts();
+
+};
+
+#endif