// SPDX-License-Identifier: GPL-3.0-only #include #include #include "game/club_info.hpp" #include "game/random.hpp" using namespace bmh; static void check(bool ok,const char* m){if(!ok)throw std::runtime_error(m);} static GameState fixture(int n){GameState g;g.team_morale.resize(358);for(size_t i=0;i>6;} int main(){try{ auto three=fixture(3);check(set_club_info_category(three,10,2)==2 && category(three,10)==2,"three existing permits a fourth AI club"); auto four=fixture(4);auto before=four.team_morale;check(set_club_info_category(four,10,2)==0,"four existing declines new AI category2");check(four.team_morale==before,"declined AI target0 preserves whole raw pool"); auto owner=fixture(4);owner.manager_teams={10};auto old=owner.team_morale;check(set_club_info_category(owner,10,2)==2,"human request retains2");for(size_t i=0;i