libsgfc++ 2.0.1
A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
LibSgfcPlusPlus::ISgfcGoMove Class Referenceabstract

The ISgfcGoMove interface represents a move in a Go game. More...

#include <ISgfcGoMove.h>

Inheritance diagram for LibSgfcPlusPlus::ISgfcGoMove:
LibSgfcPlusPlus::SgfcGoMove

Public Member Functions

 ISgfcGoMove ()
 Initializes a newly constructed ISgfcGoMove object.
 
virtual ~ISgfcGoMove ()
 Destroys and cleans up the ISgfcGoMove object.
 
virtual bool IsPassMove () const =0
 Returns true if the move is a pass move. Returns false if the move is not a pass move.
 
virtual std::shared_ptr< ISgfcGoStoneGetStone () const =0
 Returns the stone that was placed on the Go board by the move. Returns nullptr if IsPassMove() returns true.
 
virtual SgfcColor GetPlayerColor () const =0
 Returns the color of the player who made the move.
 
virtual std::shared_ptr< ISgfcGoPointGetStoneLocation () const =0
 Returns the location of the stone that was placed by the move on the Go board. Returns nullptr if IsPassMove() returns true.
 

Detailed Description

The ISgfcGoMove interface represents a move in a Go game.

A move in a Go game is defined by the color of the player who made the move and, if it is not a pass move, by the location of the stone that was placed by the move on the Go board. ISgfcGoMove uses a reference to an ISgfcGoStone object to record the latter of these two pieces of information.

Member Function Documentation

◆ GetPlayerColor()

virtual SgfcColor LibSgfcPlusPlus::ISgfcGoMove::GetPlayerColor ( ) const
pure virtual

Returns the color of the player who made the move.

If IsPassMove() returns false, this method returns the same value as the ISgfcGoStone::GetColor() method of the ISgfcGoStone object returned by GetStone().

Implemented in LibSgfcPlusPlus::SgfcGoMove.

◆ GetStone()

virtual std::shared_ptr< ISgfcGoStone > LibSgfcPlusPlus::ISgfcGoMove::GetStone ( ) const
pure virtual

Returns the stone that was placed on the Go board by the move. Returns nullptr if IsPassMove() returns true.

Implemented in LibSgfcPlusPlus::SgfcGoMove.

◆ GetStoneLocation()

virtual std::shared_ptr< ISgfcGoPoint > LibSgfcPlusPlus::ISgfcGoMove::GetStoneLocation ( ) const
pure virtual

Returns the location of the stone that was placed by the move on the Go board. Returns nullptr if IsPassMove() returns true.

This is a convenience method that returns the same value as the ISgfcGoStone::GetLocation() method of the ISgfcGoStone object returned by GetStone().

Implemented in LibSgfcPlusPlus::SgfcGoMove.

◆ IsPassMove()

virtual bool LibSgfcPlusPlus::ISgfcGoMove::IsPassMove ( ) const
pure virtual

Returns true if the move is a pass move. Returns false if the move is not a pass move.

Implemented in LibSgfcPlusPlus::SgfcGoMove.


The documentation for this class was generated from the following files: