Changed result type in ISolver from Cardinal to Int64 for Day 8, part 2

This commit is contained in:
Stefan Müller 2023-12-09 14:44:47 +01:00 committed by Stefan Müller
parent 269643ad2a
commit 7baf255fda
1 changed files with 9 additions and 9 deletions

View File

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