FootballInternal.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Maxwell, January 28, 1983 11:03 am
Russ Atkinson (RRA) August 13, 1985 12:52:50 pm PDT
Swinehar, December 5, 1990 9:29 am PST
Doug Terry, November 3, 1992 2:43 pm PST
DIRECTORY
FootballMaster,
Rope USING [ROPE],
ViewerClasses USING [Viewer];
FootballInternal: DEFINITIONS = BEGIN OPEN FootballMaster;
ROPE: TYPE ~ Rope.ROPE;
Play: TYPE = REF PlayRec;
PlayRec: TYPE = RECORD[
name: Rope.ROPE,
setUp: BOOLTRUE,
side: Side ← offense,
ball: Command ← [stop, [null[]]],
commands: Commands ← ALL[[stop, [null[]]]]];
Pattern: TYPE = RECORD[x1, y1, x2, y2: REAL𡤀, command: Command←[]];
T: TYPE ~ REF TeamRec;
TeamRec: TYPE ~ RECORD [
game: Game,
myTeam: Team←home,
planned: Play ← NIL,
current: Play ← NIL,
carrier: Position ← ball,
state: State ← offField,
displayLine: INTEGER ← 20,
viewer: ViewerClasses.Viewer,
shadow: ARRAY Position OF RECORD[oldX, oldY: REAL, char: CHAR] ← ALL[[0,0,'a]],
imported: BOOLFALSE,
selected: Position ← none,
setUp: BOOLFALSE,
deltaX: REAL← 0,
deltaY: REAL ← 50,
lastState: State ← offField,
lastPaintedHeight: INTEGER ← 0,
lastTime: INTEGER ← 0,
penaltyState: PenaltyState ← none,
timeouts: ARRAY Team OF INTEGER ← [4,4],
penalties: ARRAY Team OF Penalty ← [none, none],
oldScore: ARRAY Team OF INTEGER ← [0, 0],
timer: CONDITION,
playTimer: CONDITION,
old: ARRAY [0..6] OF Pattern ← ALL[[]],
dummy: INT𡤀
];
Control: PROC[t: T];
StartServer: PROC [name: Rope.ROPE];
StopServer: PROC;
SetCommand: PROC [t: T, player: Position, command: Command, playSetUp: BOOLFALSE];
SetCommandUp: PROC [t: T, player: Position, command: Command, playSetUp: BOOLTRUE];
SavePlay: PROC [t: T, side: Side, name: Rope.ROPE, playSetUp: BOOLFALSE];
ReadPlayBook: PROC [t: T, name: Rope.ROPE];
WritePlayBook: PROC [t: T, name: Rope.ROPE];
InitPlays: PROC [t: T];
GetTFromViewer: PROC [v: ViewerClasses.Viewer] RETURNS [t: T];
GetTFromTeam: PROC [team: Team] RETURNS [t: T];
END . . .