⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tree.h

📁 qgo-1.5.4-r3.tar.gz linux下一个很好玩的游戏
💻 H
字号:
/** tree.h*/#ifndef TREE_H#define TREE_H#include <qptrstack.h>class Move;template<class type> class QPtrStack;class Tree{public:	Tree(int board_size);	~Tree();	void init(int board_size);	bool addBrother(Move *node);	bool addSon(Move *node);	int getNumBrothers();	int getNumSons(Move *m=0);	int getBranchLength(Move *node=0);	Move* nextMove();	Move* previousMove();	Move* nextVariation();	Move* previousVariation();	bool hasSon(Move *m);	bool hasPrevBrother(Move *m=0);	bool hasNextBrother();	void clear();	static void traverseClear(Move *m);	int count();	Move* getCurrent() const { return current; }	void setCurrent(Move *m) { current = m; }	void setToFirstMove();	Move* getRoot() const { return root; }	void setRoot(Move *m) { root = m; }	int mainBranchSize();	Move* findMoveInMainBranch(int x, int y) { return findMove(root, x, y, false); }	Move* findMoveInBranch(int x, int y) { return findMove(current, x, y, true); }	Move* findLastMoveInMainBranch();   //SL added eb 9	void traverseFind(Move *m, int x, int y, QPtrStack<Move> &result);	protected:	Move* findMove(Move *start, int x, int y, bool checkmarker);	private:	Move *root, *current;};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -