按照成员变量定义顺序转成 JSON 样例: { "id": id, "type": type, "my_fish": my_fish, "fight_fish": fight_fish } */
| 30 | } |
| 31 | */ |
| 32 | Json::Value Player::to_json() const{ |
| 33 | Json::Value json; |
| 34 | json["id"] = id; |
| 35 | json["type"] = type; |
| 36 | json["my_fish"] = my_fish.to_json(); |
| 37 | json["fight_fish"] = fight_fish.to_json(); |
| 38 | return json; |
| 39 | } |
| 40 | |
| 41 | int Player::get_id(){ |
| 42 | return id; |
nothing calls this directly
no outgoing calls
no test coverage detected