[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdots] plugins/simpleai: Fixed compilation error + a bit refactoring.
From:       Minh Ngo <nlminhtl () gmail ! com>
Date:       2015-03-31 23:03:05
Message-ID: E1Yd5BZ-0004oC-Bh () scm ! kde ! org
[Download RAW message or body]

Git commit 170ce36633b80b670c8e4e3c8b4fdd2816321a76 by Minh Ngo.
Committed on 31/03/2015 at 23:01.
Pushed by minhngo into branch 'master'.

Fixed compilation error + a bit refactoring.

M  +10   -13   plugins/simpleai/rival.cpp

http://commits.kde.org/kdots/170ce36633b80b670c8e4e3c8b4fdd2816321a76

diff --git a/plugins/simpleai/rival.cpp b/plugins/simpleai/rival.cpp
index 922e1f5..6400204 100644
--- a/plugins/simpleai/rival.cpp
+++ b/plugins/simpleai/rival.cpp
@@ -56,7 +56,7 @@ namespace KDots
       , m_board(nullptr)
       , m_human(Owner::FIRST)
       , m_ai(Owner::SECOND)
-      , m_depth(6)
+      , m_depth(DIFFICULTY_TO_DEPTH.at(KgDifficultyLevel::Medium))
       , m_k1(1)
       , m_k2(1)
     {
@@ -244,19 +244,16 @@ namespace KDots
       }
     }
 =

-    namespace
+    struct NodeInfo
     {
-      struct NodeInfo
-      {
-        int m_parent; // Index from the vector
-        int m_layer;
-        int m_bestChildGrade;
-        int m_capturedPointsCount;
-
-        Point m_point;
-        std::unordered_set<Point> m_capturedPoints;
-      };
-    }
+      int m_parent; // Index from the vector
+      int m_layer;
+      int m_bestChildGrade;
+      int m_capturedPointsCount;
+
+      Point m_point;
+      std::unordered_set<Point> m_capturedPoints;
+    };
 =

     void Rival::findPreviousPoints(const std::vector<NodeInfo>& decisionTr=
ee,
                                    int lastPointID,
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic