g=4 then Form4. Label1. Caption:= Hard raquo ;;. StrGrid. Cells [0,0]:= The Name: raquo ;;. StrGrid. Cells [1,0]:= Steps: raquo ;;. StrGrid. Cells [2,0]:= Time: raquo ;; (Fileb, Best. Res ); (FileB); (FileB, g - 2); (FileB, BestForLevel); i:=1 to 10 do begin. StrGrid. Cells [0, i]:=BestForLevel [i]. Name;////// //. StrGrid. Cells [1, i]:=IntToStr (BestForLevel [i]. Step) ;. StrGrid. Cells [2, i]:=IntToStr (BestForLevel [i]. Time) ;; (FileB) ;. Form4. ShowModal;
end;
{створення нової гри з мінімальною складністю}
procedure TMainF. Easy1Click (Sender: TObject) ;:=2; (g) ;;
{створення нової гри з середньою складністю}
procedure TMainF. Normal1Click (Sender: TObject) ;:=3; (g) ;;
{створення нової гри з максимальною складністю}
procedure TMainF. Hard1Click (Sender: TObject) ;:=4; (g) ;;
{підміняє курсор при русі по ігровому полю під час гри}
procedure TMainF. DrawGrid1MouseMove (Sender: TObject; Shift: TShiftState; X ,: Integer) ;. Cursor:=crHandPoint;
end;
{скидає ігрове поле в стан при початку гри}
procedure Restartf;, j: integer; rest then begin:=0; (step: 3, ster) ;. StatusBar1. Panels [0]. Text:=st0 + ster ;:=false ;:=false; MainF. DrawGrid1. Canvas doi:=0 to 3 doj:=0 to 3 do [i, j]:=fi [i, j] ;;;. DrawGrid1. Repaint;
end ;;;
{скидає ігрове поле в стан при початку гри}
procedure TMainF. SpeedButton4Click (Sender: TObject);
begin ;;
{скидає ігрове поле в стан при початку гри}
procedure TMainF. Restart1Click (Sender: TObject);
begin ;;
{повертає скасований із допомогою undo хід}
procedure RedoN;, j: integer ;:=true ;:=step - 1 ;:=step; (step: 3, ster) ;. StatusBar1. Panels [0]. Text:=st0 + ster; i:=0 to 3 do beginj:=0 to 3 do begin [i, j]:=fi [i, j] ;;; i:=0 to 3 do beginj:=0 to 3 do begin [i, j]:=un [i, j] ;;;; i:=0 to 3 do beginj:=0 to 3 do begin [i, j]:=re [i, j] ;; ;:=true ;:=tep; (step: 3, ster) ;. StatusBar1. Panels [0]. Text:=st0 + ster;
end;
{скасовує останній хід} UndoF;
var, j: integer ;:=step + 1 ;:=step; (step: 3, ster) ;. StatusBar1. Panels [0]. Text:=st0 + ster; i:=0 to 3 do beginj:=0 to 3 do begin [i, j]:=fi [i, j] ;;; i:=0 to 3 do beginj:=0 to 3 do begin [i, j]:=ka [i, j] ;;;; i:=0 to 3 do beginj:=0 to 3 do begin [i, j]:=re [i, j] ;; ;:=true ;:=tep; (step: 3, ster) ;. StatusBar1. Panels [0]. Text:=st0 + ster;
end;
{повертає скасований із допомогою undo хід}
procedure TMainF. SpeedButton7Click (Sender: TObject); moz then;
end;
{повертає скасований із допомогою undo хід}
procedure TMainF. Redo1Click (Sender: TObject); moz then ;;
{скасовує останній хід} TMainF. SpeedButton6Click (Sender: TObject); mog then ;;
{скасовує останній хід} TMainF. Undo1Click (Sender: TObject); mog then ;; TMainF. FormCreate (Sender: TObject) ;: integer ;:=2 ;:=false; not FileExists ( best. Res ) then begin (FileB, best. Res ); (FileB); i:=1 to 10 do begin [i]. name:= UnKnown raquo ;; [i]. time:=0; [i]. step:=+9999 ;; i:=1 to 3 do (FileB, Bestforlevel); (FileB) ;; not FileExists ( saving. sav ) then begin (Fild, saving. sav ); (Fild) ; (FilD) ;;;;
{починає нову гру} TMainF. SpeedButton11Click (Sender: TObject);
begin (g) ;;
{показивет кращі результати}
procedure TMainF. Results1Click (Sender: TObject); i: integer; g=0 then g:=2; g=2 then Form4. Label1. Caption:= Easy raquo ;; g=3 then Form4. Label1. Caption:= Normal raquo ;; g=4 then Form4. Label1. Caption:= Hard raquo ;;. StrGrid. Cells [0,0]:= The Name: raquo ;;. StrGrid. Cells [1,0]:= Steps: raquo ;;. StrGrid. Cells [2,0]:= Time: raquo ;; (Fileb, Best. Res ); (FileB); (FileB, g - 2); (FileB, BestForLevel); i:=1 to 10 do begin. StrGrid. Cells [0, i]:=BestForLevel [i]. Name;////// //. StrGrid. Cells [1, i]:=IntToStr (BestForLevel [i]. Step) ;. StrGrid. Cells [2, i]:=IntToStr (BestForLevel [i]. Time) ;; (FileB) ;. Form4. ShowModal;
end;
{ставить гру на паузу - т. е перекривет ігрове поле картинкою і зупиняє час}
procedure Pause; MainF. SpeedButton8. ParentFont then begin. ...