summaryrefslogtreecommitdiffstats
path: root/q15/src/gameboard.h
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2020-11-25 15:16:40 +0100
committergregory guy <gregory-tde@laposte.net>2020-12-01 12:21:04 +0100
commite33e8edb80936f8dd04729d70c0c991612340d5e (patch)
treee0b1b8d6098491db4d7d642bed7d5ef5747952d2 /q15/src/gameboard.h
parent4fd2e55a49048dcecdf7ebd7ce7e78b822c06156 (diff)
downloadtdegames-e33e8edb80936f8dd04729d70c0c991612340d5e.tar.gz
tdegames-e33e8edb80936f8dd04729d70c0c991612340d5e.zip
Turn into a TDE application.
The game is renamed TDEFifteen (original name: q15). Add icons (Public Domaine, https://commons.wikimedia.org/wiki/File:15-puzzle.svg). Signed-off-by: gregory guy <gregory-tde@laposte.net>
Diffstat (limited to 'q15/src/gameboard.h')
-rw-r--r--q15/src/gameboard.h76
1 files changed, 0 insertions, 76 deletions
diff --git a/q15/src/gameboard.h b/q15/src/gameboard.h
deleted file mode 100644
index 8150acb6..00000000
--- a/q15/src/gameboard.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * $Id: gameboard.h,v 0.1 2005/08/14 12:10:05 denis Exp $
- *
- * Author: Denis Kozadaev (denis@tambov.ru)
- * Description:
- *
- * See also: style(9)
- *
- * Hacked by:
- */
-
-#ifndef __GAME_BOARD_H__
-#define __GAME_BOARD_H__
-
-#include <stdlib.h>
-
-#include <tqwidget.h>
-#include <tqlabel.h>
-#include <tqpixmap.h>
-#include <tqtimer.h>
-
-
-class BoardItem:public TQLabel
-{
-public:
-
- BoardItem(int, TQWidget *parent = NULL, const char *name = NULL);
- ~BoardItem();
-
- int item()const{return (num);}
-
-private:
- int num;
-
-protected:
- void paintEvent(TQPaintEvent *);
-};
-
-//------------------------------------------------------------------------------
-
-class GameBoard:public TQWidget
-{
- Q_OBJECT
-public:
-
- GameBoard(TQWidget *parent = NULL, const char *name = NULL);
- ~GameBoard();
-
- void newGame();
- void loadImage();
-
-private:
- int n, nt, xt, yt, dx, dy;
- BoardItem *map[16];
- TQTimer *tmr;
- TQPixmap origin;
-
- void initMap();
- void startMoving(int, int);
- void checkEndGame();
- void newTask();
-
- int index(int, int);
- int mayMove(int);
- int step(int, int);
- int sign(int);
-
-protected:
- void resizeEvent(TQResizeEvent *);
- void mousePressEvent(TQMouseEvent *);
-
-private slots:
- void moveItem();
-};
-
-#endif /* __GAME_BOARD_H__ */