| 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 |
| 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 |
| 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; |
| 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); |
| 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; |
| 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 |
|
|
| 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 |
|
|
| 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 |
| 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; |
| 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 |
|
|