fpchess: Improves the mode description
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1880 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
18ed2ed209
commit
79e55f98bc
@ -17,7 +17,8 @@ type
|
||||
TChessModule = class
|
||||
public
|
||||
Kind: TChessModuleKind;
|
||||
Description: string;
|
||||
Name, SelectionDescription, PlayingDescription: string;
|
||||
constructor Create; virtual;
|
||||
procedure CreateUserInterface(); virtual; abstract;
|
||||
procedure ShowUserInterface(AParent: TWinControl); virtual; abstract;
|
||||
procedure HideUserInterface(); virtual; abstract;
|
||||
@ -71,7 +72,7 @@ begin
|
||||
begin
|
||||
lModule := TChessModule(gChessModules.Items[i]);
|
||||
if lModule <> nil then
|
||||
AList.Add(lModule.Description);
|
||||
AList.Add(lModule.SelectionDescription);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -94,6 +95,11 @@ end;
|
||||
|
||||
{ TChessModule }
|
||||
|
||||
constructor TChessModule.Create;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
function TChessModule.IsMovingAllowedNow: Boolean;
|
||||
begin
|
||||
Result := not (vChessGame.IsWhitePlayerTurn xor vChessGame.FirstPlayerIsWhite);
|
||||
|
@ -140,7 +140,7 @@ type
|
||||
function FPChessPieceToKCChessImage(APos: TPoint): PieceImageType;
|
||||
function FPChessPieceToKCChessColor(APos: TPoint): PieceColorType;
|
||||
public
|
||||
constructor Create();
|
||||
constructor Create(); override;
|
||||
procedure CreateUserInterface(); override;
|
||||
procedure ShowUserInterface(AParent: TWinControl); override;
|
||||
procedure HideUserInterface(); override;
|
||||
@ -217,7 +217,9 @@ constructor TKCChessModule.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
|
||||
Description := 'Play against the computer - KCChess Engine';
|
||||
Name := 'mod_kcchess.pas';
|
||||
SelectionDescription := 'Play against the computer - KCChess Engine';
|
||||
PlayingDescription := 'Playing against the computer - KCChess Engine';
|
||||
Kind := cmkAgainstComputer;
|
||||
end;
|
||||
|
||||
|
@ -4,7 +4,7 @@ object formChess: TformChess
|
||||
Top = 123
|
||||
Width = 360
|
||||
ActiveControl = notebookMain
|
||||
Caption = 'FP Chess 0.1'
|
||||
Caption = 'FP Chess 1.0'
|
||||
ClientHeight = 500
|
||||
ClientWidth = 360
|
||||
OnCreate = FormCreate
|
||||
@ -28,7 +28,7 @@ object formChess: TformChess
|
||||
Width = 360
|
||||
Alignment = taCenter
|
||||
AutoSize = False
|
||||
Caption = 'Welcome to FP Chess 0.1'
|
||||
Caption = 'Welcome to FP Chess 1.0'
|
||||
Font.Height = -19
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
@ -174,7 +174,7 @@ object formChess: TformChess
|
||||
object labelPos: TLabel
|
||||
Left = 8
|
||||
Height = 18
|
||||
Top = 392
|
||||
Top = 376
|
||||
Width = 54
|
||||
Caption = 'labelPos'
|
||||
ParentColor = False
|
||||
@ -206,7 +206,7 @@ object formChess: TformChess
|
||||
Left = 176
|
||||
Height = 30
|
||||
Top = 8
|
||||
Width = 75
|
||||
Width = 88
|
||||
Caption = 'Resign'
|
||||
TabOrder = 1
|
||||
end
|
||||
@ -223,15 +223,23 @@ object formChess: TformChess
|
||||
Left = 80
|
||||
Height = 30
|
||||
Top = 8
|
||||
Width = 75
|
||||
Width = 88
|
||||
Caption = 'New Game'
|
||||
OnClick = btnGameNewGameClick
|
||||
TabOrder = 3
|
||||
end
|
||||
object labelMode: TLabel
|
||||
Left = 8
|
||||
Height = 18
|
||||
Top = 392
|
||||
Width = 66
|
||||
Caption = 'labelMode'
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
object pageWebservice: TPage
|
||||
ClientWidth = 2880
|
||||
ClientHeight = 3464
|
||||
ClientWidth = 5760
|
||||
ClientHeight = 6928
|
||||
object Label8: TLabel
|
||||
Left = 0
|
||||
Height = 32
|
||||
|
@ -39,6 +39,7 @@ type
|
||||
editLocalIP: TLabeledEdit;
|
||||
editWebserviceURL: TLabeledEdit;
|
||||
Label1: TLabel;
|
||||
labelMode: TLabel;
|
||||
labelTime: TLabel;
|
||||
Label2: TLabel;
|
||||
Label6: TLabel;
|
||||
@ -158,6 +159,10 @@ begin
|
||||
[FormatTime(vChessGame.WhitePlayerTime), FormatTime(vChessGame.BlackPlayerTime)]);
|
||||
|
||||
formChess.labelTime.Caption := lStr;
|
||||
|
||||
lStr := GetChessModule(gSelectedModuleIndex).PlayingDescription;
|
||||
|
||||
formChess.labelMode.Caption := lStr;
|
||||
end;
|
||||
|
||||
procedure TformChess.InitializeGameModel;
|
||||
|
@ -33,7 +33,7 @@ type
|
||||
FICS_PASSWORD: string;
|
||||
// Frequency to issue commands to avoid disconnection, in miliseconds
|
||||
PROTECT_LOGOUT_FREQ: Integer;
|
||||
constructor Create();
|
||||
constructor Create(); override;
|
||||
destructor Destroy; override;
|
||||
procedure CreateUserInterface(); override;
|
||||
procedure ShowUserInterface(AParent: TWinControl); override;
|
||||
@ -59,7 +59,9 @@ begin
|
||||
Errmode => 'die',
|
||||
);*)
|
||||
|
||||
Description := 'Play online via the Free Internet Chess Server';
|
||||
Name := 'mod_fics.pas';
|
||||
SelectionDescription := 'Play online - Free Internet Chess Server';
|
||||
PlayingDescription := 'Playing online - Free Internet Chess Server';
|
||||
Kind := cmkInternet;
|
||||
|
||||
FICS_HOST := 'freechess.org';
|
||||
|
@ -19,7 +19,7 @@ type
|
||||
editSecondPlayerName: TEdit;
|
||||
public
|
||||
SecondPlayerName: string;
|
||||
constructor Create();
|
||||
constructor Create(); override;
|
||||
procedure CreateUserInterface(); override;
|
||||
procedure ShowUserInterface(AParent: TWinControl); override;
|
||||
procedure HideUserInterface(); override;
|
||||
@ -38,7 +38,9 @@ constructor TSameComputerChessModule.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
|
||||
Description := 'Play against a friend in the same computer';
|
||||
Name := 'mod_samecomputer.pas';
|
||||
SelectionDescription := 'Play against a friend in the same computer';
|
||||
PlayingDescription := 'Playing against a friend in the same computer';
|
||||
Kind := cmkSameComputer;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user