Changed result fields to be Cardinal instead of Integer

This commit is contained in:
Stefan Müller 2023-12-05 14:41:14 +01:00 committed by Stefan Müller
parent e04577725b
commit 931b4b60f9
1 changed files with 9 additions and 9 deletions

View File

@ -36,27 +36,27 @@ type
procedure Free;
function GetDataFileName: string;
function GetPuzzleName: string;
function GetResultPart1: Integer;
function GetResultPart2: Integer;
function GetResultPart1: Cardinal;
function GetResultPart2: Cardinal;
property DataFileName: string read GetDataFileName;
property PuzzleName: string read GetPuzzleName;
property ResultPart1: Integer read GetResultPart1;
property ResultPart2: Integer read GetResultPart2;
property ResultPart1: Cardinal read GetResultPart1;
property ResultPart2: Cardinal read GetResultPart2;
end;
{ TSolver }
TSolver = class abstract(ISolver)
protected
FPart1, FPart2: Integer;
FPart1, FPart2: Cardinal;
public
procedure Init; virtual;
procedure ProcessDataLine(const ALine: string); virtual; abstract;
procedure Finish; virtual; abstract;
function GetDataFileName: string; virtual; abstract;
function GetPuzzleName: string; virtual; abstract;
function GetResultPart1: Integer; virtual;
function GetResultPart2: Integer; virtual;
function GetResultPart1: Cardinal; virtual;
function GetResultPart2: Cardinal; virtual;
end;
{ TSolverEngine }
@ -81,12 +81,12 @@ begin
FPart2 := 0;
end;
function TSolver.GetResultPart1: Integer;
function TSolver.GetResultPart1: Cardinal;
begin
Result := FPart1;
end;
function TSolver.GetResultPart2: Integer;
function TSolver.GetResultPart2: Cardinal;
begin
Result := FPart2;
end;