You've already forked lazarus-ccr
FPChess: Fix engine play with black
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4106 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -337,6 +337,14 @@ begin
|
||||
end;
|
||||
|
||||
Player[ComputerColor].LookAhead := spinDifficulty.Value;
|
||||
if ComputerColor = C_WHITE then
|
||||
begin
|
||||
KCChessThread := TKCChessThread.Create(True);
|
||||
KCChessThread.FreeOnTerminate := True;
|
||||
KCChessThread.PlayerColor := PlayerColor;
|
||||
KCChessThread.ComputerColor := ComputerColor;
|
||||
KCChessThread.Resume();
|
||||
end;
|
||||
end;
|
||||
|
||||
function TKCChessModule.GetSecondPlayerName: ansistring;
|
||||
|
@ -102,22 +102,12 @@ begin
|
||||
end;
|
||||
|
||||
procedure TWinboardChessModule.PrepareForGame;
|
||||
var
|
||||
CompMove: moveInCoord;
|
||||
lAnimation: TChessMoveAnimation;
|
||||
begin
|
||||
vwinboardConn.startEngine(editEnginePatch.text);
|
||||
if not vChessGame.FirstPlayerIsWhite then
|
||||
begin
|
||||
vwinboardConn.tellMove('go');
|
||||
compMove:=vwinboardConn.engineMove;
|
||||
|
||||
lAnimation := TChessMoveAnimation.Create;
|
||||
lAnimation.AFrom := CompMove[1];
|
||||
lAnimation.ATo := CompMove[2];
|
||||
vChessDrawer.AddAnimation(lAnimation);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
Reference in New Issue
Block a user