Index: trunk/MagicSoft/Mars/mtools/MagicReversi.cc
===================================================================
--- trunk/MagicSoft/Mars/mtools/MagicReversi.cc	(revision 8755)
+++ trunk/MagicSoft/Mars/mtools/MagicReversi.cc	(revision 8756)
@@ -481,40 +481,4 @@
 }
 
-Int_t MagicReversi::GetDirection(Int_t src, Int_t dst) const
-{
-    const MGeomPix &pix1=(*fGeomCam)[dst];
-    const MGeomPix &pix2=(*fGeomCam)[src];
-
-    const Double_t x1 = pix1.GetX();
-    const Double_t y1 = pix1.GetY();
-
-    const Double_t x2 = pix2.GetX();
-    const Double_t y2 = pix2.GetY();
-
-    if (x1>=x2 && y1>y2) return kRightTop;
-    if (x1>=x2 && y1<y2) return kRightBottom;
-    if (x1<=x2 && y1>y2) return kLeftTop;
-    if (x1<=x2 && y1<y2) return kLeftBottom;
-    if (x1>x2)           return kRight;
-    if (x1<x2)           return kLeft;
-
-    return -1;
-}
-
-Int_t MagicReversi::GetNeighbor(Int_t idx, Int_t dir) const
-{
-    MGeomPix &pix=(*fGeomCam)[idx];
-
-    //
-    // search for the neighbor in the given direction
-    //
-    int i;
-    for (i=0; i<pix.GetNumNeighbors(); i++)
-        if (GetDirection(idx, pix.GetNeighbor(i))==dir)
-            return pix.GetNeighbor(i);
-
-    return -1;
-}
-
 Bool_t MagicReversi::Flip(Int_t origidx, Bool_t flip)
 {
@@ -523,5 +487,5 @@
     int test[6] = {0,0,0,0,0,0};
 
-    for (int dir=kRightTop; dir<=kLeftTop; dir++)
+    for (int dir=MGeomPix::kRightTop; dir<=MGeomPix::kLeftTop; dir++)
     {
         Int_t idx = origidx;
@@ -530,5 +494,5 @@
         while (1)
         {
-            idx = GetNeighbor(idx, dir);
+            idx = fGeomCam->GetNeighbor(idx, dir);
             if (idx<0 || (*this)[idx].GetFillColor()==kEmpty)
                 break;
@@ -547,5 +511,5 @@
     int cnt = 0;
 
-    for (int dir=kRightTop; dir<=kLeftTop; dir++)
+    for (int dir=MGeomPix::kRightTop; dir<=MGeomPix::kLeftTop; dir++)
     {
         Int_t idx = origidx;
@@ -557,5 +521,5 @@
             for (int i=0; i<test[dir]; i++)
             {
-                idx = GetNeighbor(idx, dir);
+                idx = fGeomCam->GetNeighbor(idx, dir);
 
                 fUsrPts[(*this)[idx].GetFillColor()-kRed]--;
Index: trunk/MagicSoft/Mars/mtools/MagicReversi.h
===================================================================
--- trunk/MagicSoft/Mars/mtools/MagicReversi.h	(revision 8755)
+++ trunk/MagicSoft/Mars/mtools/MagicReversi.h	(revision 8756)
@@ -19,14 +19,4 @@
 {
 private:
-    enum {
-        kRightTop,
-        kRight,
-        kRightBottom,
-        kLeftBottom,
-        kLeft,
-        kLeftTop
-    };
-//    static const Int_t fColorBombs[7]; // colors for the hexagons
-
     MGeomCam      *fGeomCam;       // pointer to camera geometry
 
@@ -73,6 +63,4 @@
 
     Bool_t Flip(Int_t idx, Bool_t flip);
-    Int_t  GetDirection(Int_t src, Int_t dst) const;
-    Int_t  GetNeighbor(Int_t idx, Int_t dir) const;
     Bool_t CheckMoves();
 
