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 34 by yamat0jp, Sun Aug 23 05:26:29 2015 UTC revision 36 by yamat0jp, Sat Aug 29 19:48:45 2015 UTC
# Line 160  const Line 160  const
160    worth: array [1 .. 4] of TPoint = ((X: 0; Y: 0), (X: 7; Y: 0), (X: 0; Y: 7),    worth: array [1 .. 4] of TPoint = ((X: 0; Y: 0), (X: 7; Y: 0), (X: 0; Y: 7),
161      (X: 7; Y: 7));      (X: 7; Y: 7));
162  label Last;  label Last;
163      procedure Easy;
164      var
165        m, n: integer;
166      begin
167        for m := 0 to bmp_count - 1 do
168          for n := 0 to bmp_count - 1 do
169            if CanSetStone(Stone, m, n, false) = true then
170            begin
171              inc(Score);
172              inc(Score, AddScore(m, n, worth));
173            end;
174      end;
175    procedure Hard;    procedure Hard;
176    var    var
177      m, n: integer;      m, n: integer;
178    begin    begin
179      if loop > 2 then      if loop > 1 then
180        Exit;        Exit;
181      inc(loop);      inc(loop);
182      for m := 0 to bmp_count - 1 do      for m := 0 to bmp_count - 1 do
# Line 172  label Last; Line 184  label Last;
184        begin        begin
185          if CanSetStone(Stone, m, n, true) = true then          if CanSetStone(Stone, m, n, true) = true then
186          begin          begin
187            inc(Score, AddScore(m, n, worth));            if (loop mod 2) > 0 then
188            if FTurnIndex + 1 < 50 then            begin
189              dec(Score, AddScore(m, n, waste));              inc(Score, AddScore(m, n, worth));
190                if FTurnIndex + loop < 50 then
191                  dec(Score, AddScore(m, n, waste));
192              end
193              else
194              begin
195                dec(Score, AddScore(m, n, worth));
196                if FTurnIndex + loop < 50 then
197                  inc(Score, AddScore(m, n, waste));
198              end;
199            case Stone of            case Stone of
200              stBlack:              stBlack:
201                Stone := stWhite;                Stone := stWhite;
# Line 182  label Last; Line 203  label Last;
203                Stone := stBlack;                Stone := stBlack;
204            end;            end;
205            Hard;            Hard;
206              if loop > 1 then
207              begin
208                Easy;
209                FStrings := FBuffer[FTurnIndex + loop];
210              end else
211                FBuffer[FTurnIndex + loop] := FStrings;
212          end;          end;
         FStrings := FBuffer[FTurnIndex + 1];  
213        end;        end;
214        dec(loop);
215    end;    end;
216    
217  begin  begin
# Line 201  begin Line 228  begin
228        stWhite:        stWhite:
229          Stone := stBlack;          Stone := stBlack;
230      end;      end;
231      if (Form1.MenuItem14.IsChecked = true) and (FTurnIndex + 1 >= 60) then      if (Form1.MenuItem14.IsChecked = true) and (FTurnIndex + 2 <= 60) then
232      begin      begin
       FBuffer[FTurnIndex + 1] := FStrings;  
233        loop := 0;        loop := 0;
234        Hard;        Hard;
235      end;      end
236      for i := 0 to bmp_count - 1 do      else
237        for j := 0 to bmp_count - 1 do        Easy;
         if CanSetStone(Stone, i, j, false) = true then  
         begin  
           inc(Score);  
           inc(Score, AddScore(i, j, worth));  
         end;  
238    end    end
239    else    else
240      result := false;      result := false;

Legend:
Removed from v.34  
changed lines
  Added in v.36

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