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 28 by yamat0jp, Fri Aug 14 07:21:57 2015 UTC revision 29 by yamat0jp, Sat Aug 15 12:32:41 2015 UTC
# Line 353  begin Line 353  begin
353        inc(FTurnIndex);        inc(FTurnIndex);
354        inc(FTurnNumber);        inc(FTurnNumber);
355        FBuffer[FTurnIndex] := FStrings;        FBuffer[FTurnIndex] := FStrings;
356          if FGameOver = false then
357          begin
358            FActive:=true;
359            Form1.ChangePlayer;
360          end;
361      end;      end;
362      result := true;      result := true;
363    end;    end;
# Line 406  end; Line 411  end;
411    
412  procedure TStoneGrid.Restart;  procedure TStoneGrid.Restart;
413  begin  begin
414    FActive := true;    FActive:=true;
415    FGameOver := false;    FGameOver := false;
416    FTurnIndex := FTurnNumber;    FTurnIndex := FTurnNumber;
417  end;  end;
418    
419  procedure TStoneGrid.SetActive(const Value: Boolean);  procedure TStoneGrid.SetActive(const Value: Boolean);
420  begin  begin
421    if FGameOver = false then    if (FGameOver = false)or(Value = false) then
422      FActive := Value;      FActive := Value;
423  end;  end;
424    
# Line 436  end; Line 441  end;
441    
442  procedure TStoneGrid.Start;  procedure TStoneGrid.Start;
443  begin  begin
   FActive := true;  
444    Clear;    Clear;
445      FActive := true;
446    FGameOver := false;    FGameOver := false;
447  end;  end;
448    
# Line 481  begin Line 486  begin
486      Main;      Main;
487      if Execute = false then      if Execute = false then
488      begin      begin
       StoneGrid.Pause;  
489        m := 0;        m := 0;
490        n := 0;        n := 0;
491        for i := 0 to Count - 1 do        for i := 0 to Count - 1 do
# Line 518  begin Line 522  begin
522    StoneGrid.NextStone(Index.Stone, s);    StoneGrid.NextStone(Index.Stone, s);
523    StoneGrid.CanSetStone(Index.Stone, s.X, s.Y, true, true);    StoneGrid.CanSetStone(Index.Stone, s.X, s.Y, true, true);
524    PaintBox1.Repaint;    PaintBox1.Repaint;
   ChangePlayer;  
   StoneGrid.Active := true;  
525  end;  end;
526    
527  procedure TForm1.GameStart;  procedure TForm1.GameStart;
# Line 680  begin Line 682  begin
682      StoneGrid.Active := false;      StoneGrid.Active := false;
683      if StoneGrid.CanSetStone(Index.Stone, Floor(Point.X / Size),      if StoneGrid.CanSetStone(Index.Stone, Floor(Point.X / Size),
684        Floor(Point.Y / Size), true, true) = true then        Floor(Point.Y / Size), true, true) = true then
     begin  
685        PaintBox1.Repaint;        PaintBox1.Repaint;
       ChangePlayer;  
     end;  
686      StoneGrid.Active := true;      StoneGrid.Active := true;
687    end;    end;
688  end;  end;

Legend:
Removed from v.28  
changed lines
  Added in v.29

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