?? board.h
字號:
// This file needs -*- c++ -*- mode
// ============================================================================
// Board interface
//
// (c) 2003 Ken Reed
//
// This is free software. You can redistribute it and/or modify it under the
// terms of the GNU General Public License version 2 as published by the Free
// Software Foundation.
// ============================================================================
#pragma once
#include "cell.h"
#include "point.h"
enum Mouse_Command {Left_Mouse, Shift_Left_Mouse, Right_Mouse};
const int board_x_size = 55; // 60;
const int board_y_size = 28; // 35;
class Board {
public:
Board();
void draw ();
Point get_size ();
void initialise (bool explore, bool hide, bool decay, bool disrupt);
void key (int player, int key, Point position);
void mouse (int player, Mouse_Command command, Point position);
void setup_player (int player, int num_bases, bool group_bases);
void update (double elapsed);
void end_of_updates();
void get_updates (Socket * socket);
void receive (Socket * socket);
void send_updates (Socket * socket);
void transmit (Socket * socket);
int player;
HWND window;
private:
Cell cells[board_y_size][board_x_size];
bool attrition;
bool disrupt;
bool exploring;
bool hidden;
Point size;
Cell * get_cell (Point p);
Cell * get_cell (int x, int y, int side);
Cell * random_cell (int i, int j);
Point get_base (int player, int bi, int bj);
void attack (int player, Cell * cell);
void fill_sea (int player, Cell * cell);
void scuttle (int player, Cell * cell);
void move_troops (int j, int i, double elapsed);
void update_march (int j, int i, double elapsed);
void new_data (Socket * socket);
void setup_terrain ();
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -