unit frmPuzzleConfig;

{$mode ObjFPC}{$H+}

interface

uses
  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, orca_scene2d;

type

  { TFormPuzzleConfig }

  TFormPuzzleConfig = class(TForm)
    CornerButton1: TD2CornerButton;
    CornerButton2: TD2CornerButton;
    D2Resources1: TD2Resources;
    Label1: TD2Label;
    Label2: TD2Label;
    Label3: TD2Label;
    Label4: TD2Label;
    Label5: TD2Label;
    Label6: TD2Label;
    Layout1: TD2Layout;
    Layout2: TD2Layout;
    Layout3: TD2Layout;
    Layout4: TD2Layout;
    Layout5: TD2Layout;
    edtSelfLP: TD2NumberBox;
    edtOpponentLP: TD2NumberBox;
    Layout6: TD2Layout;
    Layout7: TD2Layout;
    mmMessage: TD2Memo;
    mmSolution: TD2Memo;
    Root: TD2Background;
    Scene: TD2Scene;
    edtAIName: TD2TextBox;
    edtPuzzleName: TD2TextBox;
  private
    function GetAIName: string;
    function GetP0LP: Integer;
    function GetP1LP: Integer;
    function GetPMessage: string;
    function GetPPuzzleName: string;
    function GetPSolution: string;
    procedure SetAIName(AValue: string);
    procedure SetP0LP(AValue: Integer);
    procedure SetP1LP(AValue: Integer);
    procedure SetPMessage(AValue: string);
    procedure SetPPuzzleName(AValue: string);
    procedure SetPSolution(AValue: string);

  public

  published
    property PPuzzleName: string read GetPPuzzleName write SetPPuzzleName;
    property PAIName: string read GetAIName write SetAIName;
    property P0LP: Integer read GetP0LP write SetP0LP;
    property P1LP: Integer read GetP1LP write SetP1LP;
    property PMessage: string read GetPMessage write SetPMessage;
    property PSolution: string read GetPSolution write SetPSolution;
  end;

var
  FormPuzzleConfig: TFormPuzzleConfig;

implementation

{$R *.lfm}

{ TFormPuzzleConfig }

function TFormPuzzleConfig.GetAIName: string;
begin
  Exit(edtAIName.Text);
end;

function TFormPuzzleConfig.GetP0LP: Integer;
begin
  Exit(Trunc(edtSelfLP.Value));
end;

function TFormPuzzleConfig.GetP1LP: Integer;
begin
  Exit(Trunc(edtOpponentLP.Value));
end;

function TFormPuzzleConfig.GetPMessage: string;
begin
  Exit(mmMessage.Lines.Text);
end;

function TFormPuzzleConfig.GetPPuzzleName: string;
begin
  Exit(edtPuzzleName.Text);
end;

function TFormPuzzleConfig.GetPSolution: string;
begin
  Exit(mmSolution.Lines.Text);
end;

procedure TFormPuzzleConfig.SetAIName(AValue: string);
begin
  edtAIName.Text:= AValue;
end;

procedure TFormPuzzleConfig.SetP0LP(AValue: Integer);
begin
  edtSelfLP.Value:= AValue;
end;

procedure TFormPuzzleConfig.SetP1LP(AValue: Integer);
begin
  edtOpponentLP.Value:= AValue;
end;

procedure TFormPuzzleConfig.SetPMessage(AValue: string);
begin
  mmMessage.Lines.Text:= AValue;
end;

procedure TFormPuzzleConfig.SetPPuzzleName(AValue: string);
begin
  edtPuzzleName.Text:= AValue;
end;

procedure TFormPuzzleConfig.SetPSolution(AValue: string);
begin
  mmSolution.Lines.Text:= AValue;
end;

end.

