From kde-commits Tue Mar 31 23:03:05 2015 From: Minh Ngo Date: Tue, 31 Mar 2015 23:03:05 +0000 To: kde-commits Subject: [kdots] plugins/simpleai: Fixed compilation error + a bit refactoring. Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=142784299432705 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 m_capturedPoints; - }; - } + int m_parent; // Index from the vector + int m_layer; + int m_bestChildGrade; + int m_capturedPointsCount; + + Point m_point; + std::unordered_set m_capturedPoints; + }; = void Rival::findPreviousPoints(const std::vector& decisionTr= ee, int lastPointID,