libsgfc++ 2.0.1
A C++ library that uses SGFC to read and write SGF (Smart Game Format) data.
|
The SgfcGoMove class provides an implementation of the ISgfcGoMove interface. See the interface header file for documentation. More...
#include <SgfcGoMove.h>
Public Member Functions | |
SgfcGoMove (std::shared_ptr< ISgfcGoStone > stone) | |
Initializes a newly constructed SgfcGoMove object. The move is not a pass move. stone indicates the color and location of the stone that was placed by the move on the board. | |
SgfcGoMove (SgfcColor playerColor) | |
Initializes a newly constructed SgfcGoMove object. The move is a pass move. playerColor indicates the color of the player who made the move. | |
virtual | ~SgfcGoMove () |
Destroys and cleans up the SgfcGoMove object. | |
virtual bool | IsPassMove () const override |
Returns true if the move is a pass move. Returns false if the move is not a pass move. | |
virtual std::shared_ptr< ISgfcGoStone > | GetStone () const override |
Returns the stone that was placed on the Go board by the move. Returns nullptr if IsPassMove() returns true. | |
virtual SgfcColor | GetPlayerColor () const override |
Returns the color of the player who made the move. | |
virtual std::shared_ptr< ISgfcGoPoint > | GetStoneLocation () const override |
Returns the location of the stone that was placed by the move on the Go board. Returns nullptr if IsPassMove() returns true. | |
Public Member Functions inherited from LibSgfcPlusPlus::ISgfcGoMove | |
ISgfcGoMove () | |
Initializes a newly constructed ISgfcGoMove object. | |
virtual | ~ISgfcGoMove () |
Destroys and cleans up the ISgfcGoMove object. | |
The SgfcGoMove class provides an implementation of the ISgfcGoMove interface. See the interface header file for documentation.
LibSgfcPlusPlus::SgfcGoMove::SgfcGoMove | ( | std::shared_ptr< ISgfcGoStone > | stone | ) |
Initializes a newly constructed SgfcGoMove object. The move is not a pass move. stone indicates the color and location of the stone that was placed by the move on the board.
std::invalid_argument | Is thrown if stone is nullptr. |
|
overridevirtual |
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().
Implements LibSgfcPlusPlus::ISgfcGoMove.
|
overridevirtual |
Returns the stone that was placed on the Go board by the move. Returns nullptr if IsPassMove() returns true.
Implements LibSgfcPlusPlus::ISgfcGoMove.
|
overridevirtual |
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().
Implements LibSgfcPlusPlus::ISgfcGoMove.
|
overridevirtual |
Returns true if the move is a pass move. Returns false if the move is not a pass move.
Implements LibSgfcPlusPlus::ISgfcGoMove.