Ignore:
Timestamp:
May 17, 2018, 5:41:47 PM (6 years ago)
Author:
chronos
Message:
  • Modified: AI player related code moved to UClientAI unit. It is now extension of TClient class to simulate regular human client.
  • Modified: More work on client-server architecture.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormClient.pas

    r185 r202  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
    9   UGame, LCLType, Menus, ActnList, ComCtrls, dateutils, XMLConf, DOM,
    10   UGeometry, UGameClient;
     9  UGame, LCLType, Menus, ActnList, ComCtrls, dateutils, XMLConf, DOM, UCommPin,
     10  UGeometry, UGameClient, UGameProtocol;
    1111
    1212const
     
    1919
    2020  TFormClient = class(TForm)
     21    AGameEndTurn: TAction;
    2122    AStatusBarVisible: TAction;
    2223    AToolBarVisible: TAction;
     
    3738    ToolButton8: TToolButton;
    3839    ToolButton9: TToolButton;
     40    procedure AGameEndTurnExecute(Sender: TObject);
    3941    procedure AStatusBarVisibleExecute(Sender: TObject);
    4042    procedure AToolBarBigIconsExecute(Sender: TObject);
     
    196198    Caption := NewCaption;
    197199    Drawing := False;
     200    AGameEndTurn.Enabled := Core.Game.Running;
    198201  end;
    199202end;
     
    299302  AStatusBarVisible.Checked := not AStatusBarVisible.Checked;
    300303  ReloadView;
     304end;
     305
     306procedure TFormClient.AGameEndTurnExecute(Sender: TObject);
     307var
     308  P: TGameProtocolClient;
     309  P2: TCommPin;
     310begin
     311  P := Client.Protocol;
     312  P2 := P.Pin;
     313  Client.Protocol.TurnEnd;
    301314end;
    302315
Note: See TracChangeset for help on using the changeset viewer.