MCPcopy Create free account
hub / github.com/LARG/HFO / getPositionType

Method getPositionType

src/strategy.cpp:728–752  ·  view source on GitHub ↗

-------------------------------------------------------------------*/ ! */

Source from the content-addressed store, hash-verified

726
727 */
728PositionType
729Strategy::getPositionType( const int unum ) const
730{
731 const int number = roleNumber( unum );
732
733 if ( number < 1 || 11 < number )
734 {
735 std::cerr << __FILE__ << ' ' << __LINE__
736 << ": Illegal number : " << number
737 << std::endl;
738 return Position_Center;
739 }
740
741 try
742 {
743 return M_position_types.at( number - 1 );
744 }
745 catch ( std::exception & e )
746 {
747 std::cerr<< __FILE__ << ':' << __LINE__ << ':'
748 << " Exception caught! " << e.what()
749 << std::endl;
750 return Position_Center;
751 }
752}
753
754/*-------------------------------------------------------------------*/
755/*!

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected