2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
16 #include "agentgroup.h"
17 #include "icslistener.h"
23 class ICSEntity
: public Entity
25 , public ICSListener
{
30 boost::shared_ptr
<ICSConnection
> m_connection
;
34 AgentGroupDispatcher m_dispatcher
;
36 void updateGame(const Index
& index
, AbstractMove::Ptr icsMove
,
37 AbstractPosition::Ptr icsPos
);
48 UpdateType
getUpdate(const Index
& index
);
50 ICSEntity(const VariantPtr
&, const boost::shared_ptr
<Game
>&,
52 const boost::shared_ptr
<ICSConnection
>&, AgentGroup
*);
54 virtual void executeMove(AbstractMove::Ptr
);
55 virtual void notifyStyle12(const PositionInfo
&, bool is_starting
);
56 virtual void notifyPool(const class PoolInfo
&);
57 virtual void notifyMoveList(int, AbstractPosition::Ptr
, const PGN
&);
59 virtual AbstractPosition::Ptr
position() const;
61 virtual void notifyClockUpdate(int, int) { }
62 virtual void notifyMove(const Index
&);
63 virtual void notifyBack() { }
64 virtual void notifyForward() { }
65 virtual void notifyGotoFirst() { }
66 virtual void notifyGotoLast() { }
70 virtual bool canDetach() const;
71 virtual bool attach();
74 bool canEdit(const Index
& index
) const;
75 void setupTurnTest(TurnTest
& test
) const;
78 class ObservingEntity
: public ICSEntity
{
82 ObservingEntity(const VariantPtr
&, const boost::shared_ptr
<Game
>&,
83 int gameNumber
, const boost::shared_ptr
<ICSConnection
>&, AgentGroup
*);
86 virtual void detach();