neighboring8.h
Go to the documentation of this file.
00001 /* neighboring8.h
00002  */
00003 #ifndef OSL_NEIGHBORING8_H
00004 #define OSL_NEIGHBORING8_H
00005 
00006 #include "osl/boardTable.h"
00007 
00008 namespace osl
00009 {
00010   struct Neighboring8
00011   {
00012     static bool isNeighboring8(Square from,Square to)
00013     {
00014       return (from != to)
00015         && (to == from+Board_Table.getShortOffsetNotKnight(Offset32(to,from)));
00016     }
00017   };
00018 
00019 } // namespace osl
00020 
00021 #endif /* OSL_NEIGHBORING8_H */
00022 // ;;; Local Variables:
00023 // ;;; mode:c++
00024 // ;;; c-basic-offset:2
00025 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines