PageRenderTime 93ms CodeModel.GetById 84ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/core/engine/schema.hrl

http://erlbattle.googlecode.com/
Erlang | 95 lines | 39 code | 26 blank | 30 comment | 0 complexity | 4e07e58703c264dd51ed51718cfeb6b7 MD5 | raw file
 1%% ??????????
 2-include("ebLogger.hrl").
 3
 4%% ????????? 
 5-define(MaxEBTurn, 1000).   
 6
 7%% ????
 8%% ???????
 9-define(PreDef_army, [1,2,3,4,5,6,7,8,9,10]).
10
11%% ????
12-define(RedSide, red).
13-define(BlueSide, blue).
14
15%% ??
16-define(DirEast, east).
17-define(DirSouth, south).
18-define(DirWest, west).
19-define(DirNorth, north).
20
21%% ????
22-define(ActionForward, forward).
23-define(ActionBack, back).
24-define(ActionTurnSouth, turnSouth).
25-define(ActionTurnWest, turnWest).
26-define(ActionTurnEast, turnEast).
27-define(ActionTurnNorth, turnNorth).
28-define(ActionAttack, attack).
29-define(ActionWait, wait).
30
31%% ??????????
32-define(ActionMove, move).
33
34%% ???????
35-define(EbBattleLogFile, "warfield.txt").
36
37%% ??????????
38-define(LogCmdAction, action).
39-define(LogCmdStatus, status).
40-define(LogCmdPlan, plan).
41-define(LogCmdResult, result).
42
43-record(soldier,{
44		
45		%%????, tuple??{??,????}
46		id, 
47		
48		%%??
49		position,
50		
51		%%?? 0 - 100
52		hp,
53		
54		%%????
55		%%north,west,south,east
56		facing,
57		
58		%%????
59		%% ??forward, ?? back, 
60		%% ?? turnSouth, turnNorth, turnWest,turnEast
61		%% ?? attack
62		%% ???? wait 
63		%% ??????
64		action,
65		
66		%%??????
67		act_effect_time,
68		
69		%%????,???????????????
70	    act_sequence	
71	}).
72
73%% ????
74-record(command, {
75		
76		%% ???????side
77		soldier_id, 
78		
79		%% ???????????
80		name,
81		
82		%% ??????
83		execute_time,
84		
85		%% ???? = ???????
86		execute_seq,
87		
88		%% ??????????????????????
89		%% ??????????????????????
90		seq_id
91		
92	}).
93	
94
95