MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / imitate

Method imitate

AgentBench.old/src/tasks/card_game/logic/src/fish.cpp:1158–1181  ·  view source on GitHub ↗

to do

Source from the content-addressed store, hash-verified

1156
1157// to do
1158void Imitator::imitate(int id) {
1159 debug_msg("Imitator imitate id: " + std::to_string(id));
1160 if (id <= 0 || id >= 12)
1161 return;
1162 else
1163 switch(id){
1164 case 1:avatar = new Spray(); break;
1165 case 2:avatar = new Flame(); break;
1166 case 3:avatar = new Eel(); break;
1167 case 4:avatar = new Sunfish(); break;
1168 case 5:avatar = new Blind(); break;
1169 case 6:avatar = new Flyfish(); break;
1170 case 7:avatar = new Turtle(); break;
1171 case 8:avatar = new Octopus(); break;
1172 case 9:avatar = new Whiteshark(); break;
1173 case 10:avatar = new Goblinshark(); break;
1174 case 11:avatar = new Joker(); break;
1175 default:return;
1176 }
1177 avatar->pos = pos;
1178 avatar->ally = ally;
1179 avatar->hostile = hostile;
1180 avatar->original = this;
1181}
1182
1183void Imitator::sync() {
1184 hp = avatar->hp;

Callers 1

read_jsonMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected