• 大小: 1.81MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-31
  • 语言: C/C++
  • 标签: 象棋源码  

资源简介

本代码为C语言编写的象棋源码范例,可提供给大家作为简单C程序工程参考

资源截图

代码片段和文件信息

/***************************************************************
  MantisChess.cpp : 程序入口

  版权所有(C)  陈成涛

  这一程序是自由软件,你可以遵照自由软件基金会出版的GNU通用公共
  许可证条款来修改和重新发布这一程序。或者用许可证的第二版,或者
  (根据你的选择)用任何更新的版本。

  发布这一程序的目的是希望它有用,但没有任何担保。甚至没有适合特
  定目的的隐含的担保。更详细的情况请参阅GNU通用公共许可证。
  
  你应该已经和程序一起收到一份GNU通用公共许可证的副本。
  如果还没有,写信给:

  The Free Software Foundation,Inc,,675 Mass Ave, Cambridge,
  MAO2139,USA

  如果你在使用本软件时有什么问题或建议,用以下地址可以与我取得联
  系:

              http://thecct.51.net

  或发Email到:

              stove@eyou.com
              thecct@163.com

------------------------------------------------------------------
  MantisChess.cpp : program entrance

  Copyright (C)  Chen Chengtao China
  
  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. 59 Temple Place - Suite 330 Boston MA  02111-1307 USA.
  
  If you have any question about this software please visit my hompage:

              http://thecct.51.net

  or E_mail to:

              stove@eyou.com
              thecct@163.com

******************************************************************/


#include “StdAfx.h“
#include “resource.h“
#include “MantisChessDef.h“
#include “MantisChessDraw.h“
#include “MantisChessStd.h“
#include “MantisChessThink.h“

#define MAX_LOADSTRING 100

// Global Variables:
HINSTANCE hInst; // current instance
TCHAR sztitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text

// Foward declarations of functions included in this code module:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE int);
LRESULT CALLBACK WndProc(HWND UINT WPARAM LPARAM);
LRESULT CALLBACK About(HWND UINT WPARAM LPARAM);

//----------------------------
void OnCreate(HWND hWnd);
void Reset();
void ShowRect(HDC hdcLPRECT prect);
void ShowPoint(HDC hdcPOINT point);
void Think(HWND hWnd);
BOOL Go(HWND hWndint manPOINT targetpoint);
void onmousemove(POINT point);
void OnLButtonDown(HWND hWndPOINT point);
BOOL FaceToPoint(POINT &point);
void OnBack(HWND hWnd);

//--------------------------------------
static  POINT g_pointChessman[32]; //棋子坐标
static  int g_iChessmanMap[11][12]; //棋位状态
static  int g_iSide; //轮到哪放走
static  HCURSOR g_hCurCantGo; //不可以点击时显示的鼠标
static  HCURSOR g_hCurHand; //可以点击时显示的鼠标
static  HCURSOR g_hCurThinking;

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     303157  2010-03-15 17:32  象棋\src\Debug\MantisChess.exe

     文件     259248  2010-03-15 17:32  象棋\src\Debug\MantisChess.ilk

     文件      28328  2010-01-05 16:23  象棋\src\Debug\MantisChess.obj

     文件      19752  2010-03-15 13:23  象棋\src\Debug\MantisChess.res

     文件      12487  2010-01-05 16:23  象棋\src\Debug\MantisChessDraw.obj

     文件      11384  2010-01-05 16:23  象棋\src\Debug\MantisChessStd.obj

     文件      73460  2010-01-06 09:47  象棋\src\Debug\MantisChessThink.obj

     文件      54957  2010-01-05 16:23  象棋\src\Debug\StdAfx.obj

     文件     115712  2010-03-15 17:32  象棋\src\Debug\vc60.idb

     文件     176128  2010-01-05 16:23  象棋\src\Debug\vc60.pdb

     文件       1063  2005-08-18 17:55  象棋\src\downcode.com.txt

     文件        365  2009-12-14 09:47  象棋\src\Logiscope\application.dat

     文件      16147  2009-12-14 09:47  象棋\src\Logiscope\browser.dat

     文件        463  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChess.cpp.adt_cpp

     文件     228216  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChess.cpp.adt_cpp.dmp

     文件        459  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChess.h.adt_cpp

     文件       3767  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChess.h.adt_cpp.dmp

     文件        465  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChessDef.h.adt_cpp

     文件      34878  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChessDef.h.adt_cpp.dmp

     文件        471  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChessDraw.cpp.adt_cpp

     文件      98160  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChessDraw.cpp.adt_cpp.dmp

     文件        467  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChessDraw.h.adt_cpp

     文件       9363  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChessDraw.h.adt_cpp.dmp

     文件        469  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChessStd.cpp.adt_cpp

     文件     104362  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChessStd.cpp.adt_cpp.dmp

     文件        465  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChessStd.h.adt_cpp

     文件       7256  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChessStd.h.adt_cpp.dmp

     文件        473  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChessThink.cpp.adt_cpp

     文件     359368  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChessThink.cpp.adt_cpp.dmp

     文件        469  2009-12-14 09:46  象棋\src\Logiscope\cache\MantisChessThink.h.adt_cpp

............此处省略87个文件信息

评论

共有 条评论