Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 1.01 KB | None | 0 0
  1. procedure TUMainSurface.CheckObFertig(Sender: TObject; var Key: Char);
  2. var
  3.   iC, iR: byte;
  4.   richtiggesetzt: Boolean;
  5. begin
  6.   iC := 0;
  7.   richtiggesetzt := true;
  8.  
  9.   begin
  10.     while (iC <= high(TCol)) and richtiggesetzt do
  11.     begin // variable für nicht korrekt eingetragen einfügen (mit not)
  12.       iR := 0;
  13.       while (iR <= high(TRow)) and richtiggesetzt do
  14.       // hier auch mit not
  15.       begin
  16.         // check ob korrekt ausgefüllt
  17.         // dann booleanvariable für nein
  18.         if (SudokuInhalt(iC, iR) <> 0) and (length(settostr(iC, iR)) = 0) then
  19.           richtiggesetzt := true
  20.         else
  21.           richtiggesetzt := false;
  22.         if (iC = high(TCol)) and (iR = high(TRow)) and richtiggesetzt then
  23.           if MessageDlg('Das Sudoku ist voll! Neues Laden?', mtConfirmation,
  24.             [mbyes, mbno, mbcancel], 0) = mrYes then
  25.           begin
  26.             ResetSudokuFeld;
  27.             SudokuFeldFuellen;
  28.           end;
  29.         inc(iR);
  30.       end;
  31.       inc(iC);
  32.     end;
  33.   end;
  34. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement