Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure TUMainSurface.CheckObFertig(Sender: TObject; var Key: Char);
- var
- iC, iR: byte;
- richtiggesetzt: Boolean;
- begin
- iC := 0;
- richtiggesetzt := true;
- begin
- while (iC <= high(TCol)) and richtiggesetzt do
- begin // variable für nicht korrekt eingetragen einfügen (mit not)
- iR := 0;
- while (iR <= high(TRow)) and richtiggesetzt do
- // hier auch mit not
- begin
- // check ob korrekt ausgefüllt
- // dann booleanvariable für nein
- if (SudokuInhalt(iC, iR) <> 0) and (length(settostr(iC, iR)) = 0) then
- richtiggesetzt := true
- else
- richtiggesetzt := false;
- if (iC = high(TCol)) and (iR = high(TRow)) and richtiggesetzt then
- if MessageDlg('Das Sudoku ist voll! Neues Laden?', mtConfirmation,
- [mbyes, mbno, mbcancel], 0) = mrYes then
- begin
- ResetSudokuFeld;
- SudokuFeldFuellen;
- end;
- inc(iR);
- end;
- inc(iC);
- end;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement