switch文を使って牌とIDを紐付ける。
とりあえずデバックのためにstringで返すようにした。
std::string getPaiStr(int ID) {
switch(ID){
case 1: return "萬1";
case 2: return "萬2";
case 3: return "萬3";
case 4: return "萬4";
case 5: return "萬5";
case 6: return "萬6";
case 7: return "萬7";
case 8: return "萬8";
case 9: return "萬9";
case 10: return "筒1";
case 11: return "筒2";
case 12: return "筒3";
case 13: return "筒4";
case 14: return "筒5";
case 15: return "筒6";
case 16: return "筒7";
case 17: return "筒8";
case 18: return "筒9";
case 19: return "索1";
case 20: return "索2";
case 21: return "索3";
case 22: return "索4";
case 23: return "索5";
case 24: return "索6";
case 25: return "索7";
case 26: return "索8";
case 27: return "索9";
case 28: return "東";
case 29: return "南";
case 30: return "西";
case 31: return "北";
case 32: return "白";
case 33: return "発";
case 34: return "中";
default: break;
}
コメント