// File: Worthy-Wang[P]Warcraft3-StartWar/warcraftWorld.cpp
// Function: warcraft::WarcraftWorld::init()
void WarcraftWorld::init()
{
    vector<WarriorType> initHpOrder{DRAGON, NINJA, ICEMAN, LION, WOLF}; //同时对生命值与攻击力顺序赋值
    vector<WarriorType> redCreateorder{ICEMAN, LION, WOLF, NINJA, DRAGON};
    vector<WarriorType> blueCreateorder{LION, DRAGON, NINJA, ICEMAN, WOLF};

    GameConfig::getInstance()->setInitWarriorOrder(initHpOrder.begin(), initHpOrder.end());
    GameConfig::getInstance()->readFromFile("warcraft.conf");
    GameConfig::getInstance()->print(); //进行检测

    _caseNum = GameConfig::getInstance()->currentGroupId();
    size_t baseHp = GameConfig::getInstance()->getInitBaseHp(_caseNum);
    _red = new Headquarters(RED, baseHp);
    _blue = new Headquarters(BLUE, baseHp);
    _red->setWarriorCreateOrder(redCreateorder.begin(), redCreateorder.end());
    _blue->setWarriorCreateOrder(blueCreateorder.begin(), blueCreateorder.end());

    CityPtr city(new City(0));
    _citys.push_back(city); //红方基地
    size_t i = 1;
    for (; i <= GameConfig::getInstance()->getCityNum(_caseNum); i++)
    {
        city.reset(new City(i));
        _citys.push_back(city);
    }
    city.reset(new City(i));
    _citys.push_back(city); //蓝方基地
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x190(%rbp)
movups 0x2e3f(%rip), %xmm0     # 0x1e930
movaps %xmm0, -0x50(%rbp)
movl $0x4, -0x40(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x5, -0x28(%rbp)
leaq -0x51(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x9770
movq -0x188(%rbp), %rcx
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x20(%rbp), %rdi
callq 0x17970
jmp 0x1bb36
leaq -0x51(%rbp), %rdi
callq 0x9cf0
movups 0x2dfe(%rip), %xmm0     # 0x1e944
movaps %xmm0, -0xb0(%rbp)
movl $0x0, -0xa0(%rbp)
leaq -0xb0(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x5, -0x88(%rbp)
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x9770
movq -0x198(%rbp), %rcx
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x17970
jmp 0x1bba3
leaq -0xb1(%rbp), %rdi
callq 0x9cf0
movups 0x2da2(%rip), %xmm0     # 0x1e958
movaps %xmm0, -0x100(%rbp)
movl $0x4, -0xf0(%rbp)
leaq -0x100(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq $0x5, -0xd8(%rbp)
leaq -0x101(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x9770
movq -0x1a0(%rbp), %rcx
movq -0xe0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
leaq -0xd0(%rbp), %rdi
callq 0x17970
jmp 0x1bc16
leaq -0x101(%rbp), %rdi
callq 0x9cf0
callq 0x94e0
movq %rax, -0x1a8(%rbp)
jmp 0x1bc30
leaq -0x20(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x17a50
movq -0x1b0(%rbp), %rdi
movq %rax, -0x110(%rbp)
callq 0x17a80
movq -0x1a8(%rbp), %rdi
movq %rax, -0x118(%rbp)
movq -0x110(%rbp), %rsi
movq -0x118(%rbp), %rdx
callq 0x179f0
jmp 0x1bc76
callq 0x94e0
movq %rax, -0x1b8(%rbp)
jmp 0x1bc84
leaq -0x139(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x4310
movq -0x1c0(%rbp), %rdx
leaq 0x2c37(%rip), %rsi      # 0x1e8dc
leaq -0x138(%rbp), %rdi
callq 0x66b0
jmp 0x1bcb3
movq -0x1b8(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x8fa0
jmp 0x1bcc8
leaq -0x138(%rbp), %rdi
callq 0x40f0
leaq -0x139(%rbp), %rdi
callq 0x41e0
callq 0x94e0
movq %rax, -0x1c8(%rbp)
jmp 0x1bcee
movq -0x1c8(%rbp), %rdi
callq 0x90c0
jmp 0x1bcfc
callq 0x94e0
jmp 0x1bd03
callq 0xcfb0
movq %rax, -0x1d0(%rbp)
jmp 0x1bd11
movq -0x190(%rbp), %rax
movq -0x1d0(%rbp), %rcx
movq %rcx, 0x28(%rax)
callq 0x94e0
movq %rax, -0x1d8(%rbp)
jmp 0x1bd31
movq -0x1d8(%rbp), %rdi
movq -0x190(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x1c4d0
movq %rax, -0x1e0(%rbp)
jmp 0x1bd51
movq -0x1e0(%rbp), %rax
movq %rax, -0x148(%rbp)
movl $0xa8, %edi
callq 0x4190
movq %rax, -0x1e8(%rbp)
jmp 0x1bd72
movq -0x1e8(%rbp), %rdi
movq -0x148(%rbp), %rdx
xorl %esi, %esi
callq 0x1c500
jmp 0x1bd89
movq -0x190(%rbp), %rax
movq -0x1e8(%rbp), %rcx
movq %rcx, (%rax)
movl $0xa8, %edi
callq 0x4190
movq %rax, -0x1f0(%rbp)
jmp 0x1bdad
movq -0x1f0(%rbp), %rdi
movq -0x148(%rbp), %rdx
movl $0x1, %esi
callq 0x1c500
jmp 0x1bdc7
movq -0x190(%rbp), %rax
movq -0x1f0(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq (%rax), %rax
movq %rax, -0x1f8(%rbp)
leaq -0x80(%rbp), %rdi
movq %rdi, -0x200(%rbp)
callq 0x17a50
movq -0x200(%rbp), %rdi
movq %rax, -0x150(%rbp)
callq 0x17a80
movq -0x1f8(%rbp), %rdi
movq %rax, -0x158(%rbp)
movq -0x150(%rbp), %rsi
movq -0x158(%rbp), %rdx
callq 0x1c570
jmp 0x1be29
movq -0x190(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x208(%rbp)
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x210(%rbp)
callq 0x17a50
movq -0x210(%rbp), %rdi
movq %rax, -0x160(%rbp)
callq 0x17a80
movq -0x208(%rbp), %rdi
movq %rax, -0x168(%rbp)
movq -0x160(%rbp), %rsi
movq -0x168(%rbp), %rdx
callq 0x1c570
jmp 0x1be84
movl $0x28, %edi
callq 0x4190
movq %rax, -0x218(%rbp)
jmp 0x1be97
movq -0x218(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x17d40
jmp 0x1bea9
movq -0x218(%rbp), %rsi
leaq -0x178(%rbp), %rdi
callq 0x1c5e0
jmp 0x1bebe
movq -0x190(%rbp), %rdi
addq $0x10, %rdi
leaq -0x178(%rbp), %rsi
callq 0x1c610
jmp 0x1bed7
movq $0x1, -0x180(%rbp)
movq -0x180(%rbp), %rax
movq %rax, -0x228(%rbp)
callq 0x94e0
movq %rax, -0x220(%rbp)
jmp 0x1befe
movq -0x220(%rbp), %rdi
movq -0x190(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0xe480
movq %rax, -0x230(%rbp)
jmp 0x1bf1e
movq -0x228(%rbp), %rax
movq -0x230(%rbp), %rcx
cmpq %rcx, %rax
ja 0x1c0d9
movl $0x28, %edi
callq 0x4190
movq %rax, -0x238(%rbp)
jmp 0x1bf48
movq -0x238(%rbp), %rdi
movq -0x180(%rbp), %rsi
callq 0x17d40
jmp 0x1bf5d
movq -0x238(%rbp), %rsi
leaq -0x178(%rbp), %rdi
callq 0x1c680
jmp 0x1bf72
movq -0x190(%rbp), %rdi
addq $0x10, %rdi
leaq -0x178(%rbp), %rsi
callq 0x1c610
jmp 0x1bf8b
jmp 0x1bf8d
movq -0x180(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x180(%rbp)
jmp 0x1bee2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x51(%rbp), %rdi
callq 0x9cf0
jmp 0x1c1a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xb1(%rbp), %rdi
callq 0x9cf0
jmp 0x1c1a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x101(%rbp), %rdi
callq 0x9cf0
jmp 0x1c197
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1c18b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1c02f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x40f0
leaq -0x139(%rbp), %rdi
callq 0x41e0
jmp 0x1c18b
movq -0x1e8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
movl $0xa8, %esi
callq 0x41a0
jmp 0x1c18b
movq -0x1f0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
movl $0xa8, %esi
callq 0x41a0
jmp 0x1c18b
movq -0x218(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
movl $0x28, %esi
callq 0x41a0
jmp 0x1c18b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1c17f
movq -0x238(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
movl $0x28, %esi
callq 0x41a0
jmp 0x1c17f
movl $0x28, %edi
callq 0x4190
movq %rax, -0x240(%rbp)
jmp 0x1c0ec
movq -0x240(%rbp), %rdi
movq -0x180(%rbp), %rsi
callq 0x17d40
jmp 0x1c101
movq -0x240(%rbp), %rsi
leaq -0x178(%rbp), %rdi
callq 0x1c680
jmp 0x1c116
movq -0x190(%rbp), %rdi
addq $0x10, %rdi
leaq -0x178(%rbp), %rsi
callq 0x1c610
jmp 0x1c12f
leaq -0x178(%rbp), %rdi
callq 0x18200
leaq -0xd0(%rbp), %rdi
callq 0x9910
leaq -0x80(%rbp), %rdi
callq 0x9910
leaq -0x20(%rbp), %rdi
callq 0x9910
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
movq -0x240(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
movl $0x28, %esi
callq 0x41a0
leaq -0x178(%rbp), %rdi
callq 0x18200
leaq -0xd0(%rbp), %rdi
callq 0x9910
leaq -0x80(%rbp), %rdi
callq 0x9910
leaq -0x20(%rbp), %rdi
callq 0x9910
movq -0x60(%rbp), %rdi
callq 0x4300
nopw %cs:(%rax,%rax)
nopl (%rax)