File: protocol.h

package info (click to toggle)
gbatnav 1.0.2-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,716 kB
  • ctags: 2,312
  • sloc: sh: 9,127; ansic: 7,925; makefile: 394; sed: 93
file content (78 lines) | stat: -rw-r--r-- 2,139 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*	$Id: protocol.h,v 1.2 2001/04/04 21:31:00 riq Exp $	*/
/************************************************************************
	Archivo que pertenece al batalla naval 
	Definicion del protocolo
*************************************************************************/

#ifndef __BN_PROTOCOLO_H__
#define __BN_PROTOCOLO_H__

#ifdef __cplusplus
extern "C" {
#endif __cplusplus


#define PROT_VER "2"
#define PROT_PLAY_VER "2"

#define PROT_MAX_LEN 5000
#define MAXNAMELEN 18

/* MAXPLAYERS - Un valor entre 2 y un numero muy grande :) */
#define MAXPLAYER 10
#define MAXSERVERNAME 50

/* NO USAR 'enum' */
#define	DISCON	0 		/* not connected */
#define	CONNEC	1		/* connected */
#define	BOARD	2		/* Board OK */
#define	PLAY	3		/* playing */
#define	TURN	4		/* playing + turn */
#define	PERDIO	5 		/* perdio (sirve para que clientes como
				el btwin sigan monitoreando el juego
				luego de perder */

#define AGUA	'0'
#define NOBARCO	'1'
#define BARCO	'x'
#define TOCADO	'y'
#define HUNDIDO	'z'

#define BN_BOARD_NOT_OK		"board_not_ok"
#define	BN_BOARD_OK		"board_ok"
#define	BN_CANT_MODIFY_BOARD	"cant_modify_board"
#define BN_CLI_VER		"client_version"
#define BN_DISCON		"disconnect"
#define BN_EXIT			"exit"
#define BN_FIRE			"fire"
#define BN_GAME_OVER		"game_over"
#define BN_HELP			"help"
#define BN_LOST			"loser"
#define BN_MESSAGE		"message"
#define BN_NAME			"name"
#define BN_NUMJUG		"number_player"
#define BN_PROTOCOL		"protocol"
#define BN_QUMM			"quiero_un_mundo_mejor"
#define BN_READ			"read"
#define BN_READY_TO_PLAY	"ready_to_play"
#define BN_REM			"*"
#define BN_ROBOT		"quiero_jugar_con_un_robot"
#define BN_SCORES		"scores"
#define BN_SEND			"enviando_mis_barcos"
#define BN_SER_FULL		"el_servidor_esta_lleno"
#define BN_SER_VER		"server_version"
#define BN_SOL			"solo_a_ningun_lado"
#define BN_START		"empezar_a_jugar"
#define BN_STATUS		"status"
#define BN_TEST			"eva_test"
#define	BN_TURN			"es_el_turno_de"
#define	BN_WAIT			"espera_que_hay_gente_jugando"
#define	BN_WIN			"el_ganador_es"
#define BN_GGZ			"avoiding_perdig_effect"


# ifdef __cplusplus
}
# endif __cplusplus

#endif /* __BN_PROTOCOLO__ */