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

📄 info.hpp

📁 本程序是主要是扫雷
💻 HPP
字号:
/*     Copyright(c) Ben Bear 2003-2004  */

//  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.

#ifndef __info_hpp
#define __info_hpp

// player property
const int PLAYER_NAME_LEN = 10;

// chess type
enum
  {
    CHESS_NONE = -1,		// have no chess on the hole
    CHESS_PLY0,			// have a chess of player[0]
    CHESS_PLY1,
    CHESS_PLY2,
    CHESS_PLY3,
    CHESS_PLY4,
    CHESS_PLY5,
    CHESS_HELP,			// 
    CHESS_JUMP,			// only for show
    CHESS_INSIDE		// only for show
  };

// command keyword
enum
  {
    ALL_OK,         // every thing is ok, no errors

    GAME_OVER,      // the game is over, you should close
    GAME_START,     // ok, the game has started

    JOINED_GAME,    // you have joined the game
    NEW_PLAYER,     // a new player has joined this game
    PLAYER_QUIT,    // oh, a player has quit the game

    ORDER_MOVE,     // it's your order to move a chess
    MOVE_CHESS,     // the player has moved a chess
    MOVE_FAILED,    // the move is failed
    
    PLAYER_WIN      // the player has won
  };

// keyboard event
const int KB_UP      = 0x0100;
const int KB_LEFT    = 0x0101;
const int KB_RIGHT   = 0x0102;
const int KB_DOWN    = 0x0103;
const int KB_L_UP    = 0x0104;
const int KB_R_UP    = 0x0105;
const int KB_L_DOWN  = 0x0106;
const int KB_R_DOWN  = 0x0107;

const int KB_MODE    = 0x0200;
const int KB_FINISH  = 0x0201;
const int KB_QUIT    = 0x0202;

// network information
const int SERVER_PORT = 60264;


#endif

⌨️ 快捷键说明

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