unit frmPuzzleConfig;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
  FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
  FMX.Controls.Presentation, FMX.StdCtrls, FMX.Layouts, FMX.Edit,
  FMX.Memo.Types, FMX.ScrollBox, FMX.Memo;

type
  TFormPuzzleConfig = class(TForm)
    btnOK: TCornerButton;
    btnCancel: TCornerButton;
    edtPuzzleName: TEdit;
    edtAIName: TEdit;
    edtOpponentLife: TEdit;
    edtSelfLife: TEdit;
    mmMessage: TMemo;
    mmSolution: TMemo;
    ClearEditButton1: TClearEditButton;
    ClearEditButton2: TClearEditButton;
  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

uses
  frmStyleModule;

{$R *.fmx}

{ TFormPuzzleConfig }

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

function TFormPuzzleConfig.GetP0LP: Integer;
begin
  Exit(StrToInt(edtSelfLife.Text));
end;

function TFormPuzzleConfig.GetP1LP: Integer;
begin
  Exit(StrToInt(edtOpponentLife.Text));
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
  edtSelfLife.Text := IntToStr(AValue);
end;

procedure TFormPuzzleConfig.SetP1LP(AValue: Integer);
begin
  edtOpponentLife.Text := IntToStr(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.
