[Cedar]<CedarChest®>Top>MazeWar.df=>MazeWarPlayer.Mesa
Last Edited by: Spreitzer, May 9, 1985 4:31:39 pm PDT
DIRECTORY MazeWarFinder, Rope;
MazeWarPlayer: DEFINITIONS =
BEGIN
ROPE: TYPE = Rope.ROPE;
PlayerId: TYPE = MazeWarFinder.PlayerId;
BasicPlayer: TYPE = MazeWarFinder.BasicPlayer;
Angle: TYPE = [0 .. 4);
KnowPlayer: PROC [bp: BasicPlayer];
This player is in the game. Make sure you know about it.
GetState: PROC RETURNS [id: PlayerId, name, pics, maze: ROPE, row, col, score: INTEGER, angle: Angle];
This is how players inquire about new players.
RemovePlayer: PROCEDURE [id: PlayerId];
This player is leaving the game; forget it.
TakeStatus: PROCEDURE [id: PlayerId, row, col, score: INTEGER, angle: Angle, shot: BOOLEAN];
This is how players broadcast their status.
shot indicates this happened because of getting shot.
Shoot: PROCEDURE [shooterId: PlayerId, row, col, drow, dcol: INTEGER] RETURNS [shot: BOOLEAN];
Sent to players who might get shot. They should decide if they are, and acknowledge if so.
StupidFuckingWarnings: SIGNAL [atom: ATOM];
Here so the compiler won't generate warnings for some of the code generated by Lupine.
END.