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

📄 gun.cpp

📁 实现了汉诺塔的程序设计
💻 CPP
字号:
// gun.cpp: implementation of the gun class.
//////
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "hanot.h"
#include "gun.h"
#include "hanotDlg.h"
#include "iostream.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////


gun::~gun()
{

}
gun::gunshow(int zuobiao_x,int zuobiao_y,CImageList* I_list,CDC* XX)
{
	int i;
    CPoint pt(zuobiao_x,zuobiao_y);
	for(i=1;i<17;i++)
	{
		(*I_list).Draw(XX,pan_bianhao[i],pt,ILD_NORMAL);
		pt.y-=8;
	}
}
gun::get_ceng()
{
	return ceng;
}
gun::set_pan_bianhao(int x,int y)
{
	pan_bianhao[x]=y;
}
gun::set_ceng(int input_ceng)
{
	ceng=input_ceng;
}
gun::get_pan_bianhao(int y)
{
	return pan_bianhao[y];
}
gun::SET_gun(int x,int temp_ceng)
{
	int i;
	ceng=temp_ceng;
	pan_bianhao[0]=17;
	if(x==0)
	{
		for(i=1;i<temp_ceng+1;i++)
		{
			pan_bianhao[i]=temp_ceng+1-i;
		}
		for(i=temp_ceng+1;i<17;i++)
		{
			pan_bianhao[i]=0;
		}
	}
	else
	{
		for(i=1;i<17;i++)
		{
			pan_bianhao[i]=0;
		}
	}
}

⌨️ 快捷键说明

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