Changeset 231 for trunk/UGameClient.pas
- Timestamp:
- Sep 19, 2018, 2:05:52 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UGameClient.pas
r223 r231 7 7 uses 8 8 Classes, SysUtils, UGame, Forms, fgl, UGameProtocol, UGameServer, UCommThread, 9 UThreading, UCommFrame ;9 UThreading, UCommFrame, UMap, UPlayer; 10 10 11 11 type … … 32 32 procedure SetControlPlayer(AValue: TPlayer); 33 33 procedure SetForm(AValue: TForm); 34 procedure SetGame(AValue: TGame);35 34 procedure PlayerMove(CellFrom, CellTo: TPlayerCell; var CountOnce, CountRepeat: Integer; 36 35 Update: Boolean; var Confirm: Boolean); 37 36 procedure SetOnMove(AValue: TMoveEvent); 38 37 protected 38 procedure SetGame(AValue: TGame); virtual; 39 39 procedure ReceiveCmd(Command: TCommand; DataOut, DataIn: TStream); virtual; 40 40 procedure DoTurnStartHandler(Sender: TObject); virtual; … … 47 47 public 48 48 Name: string; 49 View: TView;50 49 LocalServer: TServer; 51 50 RemoteAddress: string; … … 54 53 Protocol: TGameProtocolClient; 55 54 procedure DoChange; 56 constructor Create; 55 constructor Create; virtual; 57 56 destructor Destroy; override; 58 57 property ControlPlayer: TPlayer read FControlPlayer write SetControlPlayer; … … 81 80 implementation 82 81 82 uses 83 UClientGUI; 84 83 85 { TClients } 84 86 85 87 function TClients.New(Name: string): TClient; 86 88 begin 87 Result := TClient .Create;89 Result := TClientGUI.Create; 88 90 Result.Game := Game; 89 91 Result.Name := Name; … … 115 117 if FGame = AValue then Exit; 116 118 FGame := AValue; 117 View.Game := AValue;118 119 end; 119 120 … … 233 234 CommFrame := TCommFrame.Create(nil); 234 235 FControlPlayer := nil; 235 View := TView.Create;236 236 Protocol := TGameProtocolClient.Create; 237 237 Protocol.OnTurnStart := DoTurnStartHandler; … … 245 245 Form := nil; 246 246 ControlPlayer := nil; 247 FreeAndNil(View);248 247 FreeAndNil(Protocol); 249 248 FreeAndNil(CommThread);
Note:
See TracChangeset
for help on using the changeset viewer.