MCPcopy Create free account
hub / github.com/Gecode/gecode / card

Method card

examples/black-hole.cpp:107–113  ·  view source on GitHub ↗

Return a string representing the card of value val

Source from the content-addressed store, hash-verified

105
106 /// Return a string representing the card of value val
107 std::string
108 card(int val) const {
109 const char* suit = "SCHD";
110 std::ostringstream o;
111 o << std::setw(2) << (1 + (val%13)) << suit[val/13];
112 return o.str();
113 }
114
115public:
116 /// Symmetry variants

Callers

nothing calls this directly

Calls 1

strMethod · 0.45

Tested by

no test coverage detected