Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoBoardUpdater.h

Go to the documentation of this file.
00001 //----------------------------------------------------------------------------
00002 /** @file GoBoardUpdater.h */
00003 //----------------------------------------------------------------------------
00004 
00005 #ifndef GO_BOARDUPDATER_H
00006 #define GO_BOARDUPDATER_H
00007 
00008 #include <vector>
00009 
00010 class GoBoard;
00011 class SgNode;
00012 
00013 //----------------------------------------------------------------------------
00014 
00015 /** Updates a board to a node in a game tree.
00016     This could be a function, but is a class to reuse a locally used list for
00017     efficiency. The update is always done from scratch (initializing the board
00018     and applying all changes from the root node to the current node).
00019 */
00020 class GoBoardUpdater
00021 {
00022 public:
00023     void Update(const SgNode* node, GoBoard& bd);
00024 
00025 private:
00026     /** Local variable used in Update().
00027         Member variable for avoiding frequent new memory allocations.
00028     */
00029     std::vector<const SgNode*> m_nodes;
00030 };
00031 
00032 //----------------------------------------------------------------------------
00033 
00034 #endif // GO_BOARDUPDATER_H


17 Jun 2010 Doxygen 1.4.7