additionalEffect.h
Go to the documentation of this file.
00001 #ifndef OSL_ADDITIONAL_EFFECT_H
00002 #define OSL_ADDITIONAL_EFFECT_H
00003 #include "osl/state/numEffectState.h"
00004 namespace osl
00005 {
00006   namespace container
00007   {
00008     class PieceVector;
00009   }
00010   namespace effect_util
00011   {
00012     using container::PieceVector;
00016     struct AdditionalEffect
00017     {
00018     private:
00019       static void find(const NumEffectState&, Square target, 
00020                        const PieceVector& direct_effects,
00021                        PieceVector& black, PieceVector& white);
00022       template <int count_max>
00023       static int count(const NumEffectState&, Square target, 
00024                        Player attack);
00025     public:
00030       static bool hasEffect(const NumEffectState&, Square target, 
00031                             Player attack);
00032       static bool hasEffectStable(const NumEffectState&, Square target, 
00033                                   Player attack);
00038       static int count2(const NumEffectState&, Square target, 
00039                               Player attack);
00044       static void find(const NumEffectState&, Square target, 
00045                        PieceVector& black, PieceVector& white);
00046       static void count(const NumEffectState&, Square target,
00047                         int& black, int& white);
00048       static int count(const NumEffectState& state, Player pl, Square target)
00049       {
00050         int black, white;
00051         count(state, target, black, white);
00052         return (pl == BLACK) ? black : white;
00053       }
00054     };
00055   } // namespace effect_util
00056   using effect_util::AdditionalEffect;
00057 } // namespace osl
00058 
00059 #endif /* OSL_ADDITIONAL_EFFECT_H */
00060 // ;;; Local Variables:
00061 // ;;; mode:c++
00062 // ;;; c-basic-offset:2
00063 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines