Develop and Download Open Source Software

Browse Subversion Repository

Diff of /Unit1.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 22 by yamat0jp, Sat Jul 18 22:44:20 2015 UTC revision 23 by yamat0jp, Sat Jul 18 23:47:44 2015 UTC
# Line 136  begin Line 136  begin
136    if CanSetStone(Stone, X, Y, true) = true then    if CanSetStone(Stone, X, Y, true) = true then
137    begin    begin
138      case Stone of      case Stone of
139      stBlack:        stBlack:
140        Stone := stWhite;          Stone := stWhite;
141      stWhite:        stWhite:
142        Stone := stBlack;          Stone := stBlack;
143      stEffect:        stEffect:
144        Stone := FEffectStone;          Stone := FEffectStone;
145      end;      end;
146      result := 0;      result := 0;
147      for i := 0 to Count - 1 do      for i := 0 to Count - 1 do
# Line 175  var Line 175  var
175      begin      begin
176        s := GetStrings(X + m * i, Y + n * i);        s := GetStrings(X + m * i, Y + n * i);
177        if s = stEffect then        if s = stEffect then
178          s:=FEffectStone;          s := FEffectStone;
179        if (s = stNone) or (s = stError) then        if (s = stNone) or (s = stError) then
180          break          break
181        else if s = Stone then        else if s = Stone then
# Line 191  var Line 191  var
191                Form1.PaintBox1.Repaint;                Form1.PaintBox1.Repaint;
192                if Visible = true then                if Visible = true then
193                begin                begin
194                  FEffectStone:=Stone;                  FEffectStone := Stone;
195                  New(q);                  New(q);
196                  q^.Left := X + m * j;                  q^.Left := X + m * j;
197                  q^.Top := Y + n * j;                  q^.Top := Y + n * j;
# Line 323  begin Line 323  begin
323      if List.Count = 0 then      if List.Count = 0 then
324      begin      begin
325        if FTerminated = true then        if FTerminated = true then
326          FActive:=false          FActive := false
327        else        else
328          FActive := FBool;          FActive := FBool;
329        inc(FTurnIndex);        inc(FTurnIndex);
# Line 378  end; Line 378  end;
378    
379  procedure TStoneGrid.Pause;  procedure TStoneGrid.Pause;
380  begin  begin
381    FTerminated:=true;    if FActive = true then
382        FActive := false;
383      FTerminated := true;
384  end;  end;
385    
386  procedure TStoneGrid.Restart;  procedure TStoneGrid.Restart;
# Line 387  begin Line 389  begin
389    begin    begin
390      FActive := true;      FActive := true;
391      FTurnIndex := FTurnNumber;      FTurnIndex := FTurnNumber;
392      FTerminated:=false;      FTerminated := false;
393    end;    end;
394  end;  end;
395    
# Line 410  end; Line 412  end;
412    
413  procedure TStoneGrid.Start;  procedure TStoneGrid.Start;
414  begin  begin
415    FActive:=false;    FActive := false;
416    Clear;    Clear;
417    FTerminated:=false;    FTerminated := false;
418    FActive := true;    FActive := true;
419  end;  end;
420    
# Line 452  var Line 454  var
454    end;    end;
455    
456  begin  begin
457      Timer1.Enabled := false;
458    Main;    Main;
459    if Execute = false then    if Execute = false then
460    begin    begin
# Line 484  begin Line 487  begin
487    end    end
488    else    else
489      Caption := s;      Caption := s;
490      Timer1.Enabled := true;
491  end;  end;
492    
493  procedure TForm1.CompStone;  procedure TForm1.CompStone;
# Line 632  end; Line 636  end;
636    
637  procedure TForm1.Timer2Timer(Sender: TObject);  procedure TForm1.Timer2Timer(Sender: TObject);
638  begin  begin
639    if (StoneGrid.Active = false)and(StoneGrid.ListExecute = true) then    if (StoneGrid.Active = false) and (StoneGrid.ListExecute = true) then
640      PaintBox1.Repaint;      PaintBox1.Repaint;
641  end;  end;
642    

Legend:
Removed from v.22  
changed lines
  Added in v.23

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26