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.
11 #ifndef EXAMINATIONENTITY_H
12 #define EXAMINATIONENTITY_H
14 #include "userentity.h"
16 #include "icslistener.h"
18 #include "agentgroup.h"
23 class ExaminationEntity
: public UserEntity
24 , public ICSListener
{
29 boost::shared_ptr
<ICSConnection
> m_connection
;
30 AgentGroupDispatcher m_dispatcher
;
32 ExaminationEntity(const VariantPtr
&, const boost::shared_ptr
<Game
>&,
33 int, const boost::shared_ptr
<ICSConnection
>&, AgentGroup
*);
35 virtual QString
save() const;
36 virtual void loadPGN(const PGN
&);
38 virtual AbstractMove::Ptr
testMove(const NormalUserMove
&) const;
39 virtual AbstractMove::Ptr
testMove(const DropUserMove
&) const;
40 virtual bool testPremove(const NormalUserMove
&) const;
41 virtual bool testPremove(const DropUserMove
&) const;
42 virtual void executeMove(boost::shared_ptr
<AbstractMove
>);
43 virtual void addPremove(const NormalUserMove
&);
44 virtual void addPremove(const DropUserMove
&);
45 virtual void cancelPremove();
46 virtual InteractionType
validTurn(const Point
&) const;
47 virtual InteractionType
validTurn(int) const;
48 virtual bool movable(const Point
&) const;
49 virtual bool jump(const Index
&);
50 virtual bool gotoFirst();
51 virtual bool gotoLast();
52 virtual bool goTo(const Index
&);
53 virtual bool forward();
57 virtual bool truncate();
58 virtual bool promoteVariation();
60 virtual void notifyStyle12(const PositionInfo
&, bool is_starting
);
61 virtual void notifyPool(const class PoolInfo
&);
62 virtual void notifyMoveList(int, AbstractPosition::Ptr
, const PGN
&);
64 virtual void notifyClockUpdate(int, int) { }
65 virtual void notifyMove(const Index
&);
66 virtual void notifyBack();
67 virtual void notifyForward();
68 virtual void notifyGotoFirst();
69 virtual void notifyGotoLast();
71 virtual bool attach();
74 #endif // EXAMINATIONENTITY_H