// File: /workspace/github_cpp_makefile_star2_O3/isimplyexcel[P]text-based-game/Game.cpp
// Function: Game::Game()
Game::Game(){
	//	create spaces train cars
	caboose = new Flick("Caboose car", "flick on the lights", "an emergency brake key");
	bar = new Fire("Bar car", "activate emergency sprinklers", "a bottle of Hennessy");
	shopping = new Fire("Shopping car", "use the fire extinguisher", "an OSU T-Shirt");
	baggage = new Flick("Baggage car", "turn on the lights", "a CS-162 syllabus");
	dining = new Fire("Dining car", "use the fire hose", "a burrito");
	engine = new Engine("Engine car", "activate the emergency brake", "a hero badge");

	//	Link all trains
	caboose->setLeftRight(nullptr, bar);
	bar->setLeftRight(caboose, shopping);
	shopping->setLeftRight(bar, baggage);
	baggage->setLeftRight(shopping, dining);
	dining->setLeftRight(baggage, engine);
	engine->setLeftRight(dining, nullptr);

	//	set starting location to caboose
	location = caboose;
	//	initialize steps to 0
	steps = 0;
	//	player is not hero yet because train has not been saved yet
	hero = false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
movq $0x0, 0x50(%rdi)
movl $0x90, %edi
callq 0x2130
movq %rax, %r15
leaq 0x238(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x24fc(%rip), %rsi      # 0x7468
leaq 0x2500(%rip), %rdx      # 0x7473
leaq 0x228(%rsp), %rdi
callq 0x31d2
leaq 0x218(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x24e1(%rip), %rsi      # 0x7474
leaq 0x24ed(%rip), %rdx      # 0x7487
leaq 0x208(%rsp), %rdi
callq 0x31d2
leaq 0x1f8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x20fe(%rip), %rsi      # 0x70b8
leaq 0x210d(%rip), %rdx      # 0x70ce
leaq 0x1e8(%rsp), %rdi
callq 0x31d2
leaq 0x228(%rsp), %rsi
leaq 0x208(%rsp), %rdx
leaq 0x1e8(%rsp), %rcx
movq %r15, %rdi
callq 0x4284
movq %r15, 0x8(%rbx)
movq 0x1e8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x500f
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x208(%rsp), %rdi
cmpq %r13, %rdi
je 0x502c
movq 0x218(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x228(%rsp), %rdi
cmpq %r12, %rdi
je 0x5049
movq 0x238(%rsp), %rsi
incq %rsi
callq 0x2140
movl $0x90, %edi
callq 0x2130
movq %rax, %r15
leaq 0x1d8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x241e(%rip), %rsi      # 0x7488
leaq 0x241e(%rip), %rdx      # 0x748f
leaq 0x1c8(%rsp), %rdi
callq 0x31d2
leaq 0x1b8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x23ff(%rip), %rsi      # 0x7490
leaq 0x2415(%rip), %rdx      # 0x74ad
leaq 0x1a8(%rsp), %rdi
callq 0x31d2
leaq 0x198(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x23f6(%rip), %rsi      # 0x74ae
leaq 0x2403(%rip), %rdx      # 0x74c2
leaq 0x188(%rsp), %rdi
callq 0x31d2
leaq 0x1c8(%rsp), %rsi
leaq 0x1a8(%rsp), %rdx
leaq 0x188(%rsp), %rcx
movq %r15, %rdi
callq 0x3600
movq %r15, 0x10(%rbx)
movq 0x188(%rsp), %rdi
cmpq %rbp, %rdi
je 0x510d
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x1a8(%rsp), %rdi
cmpq %r13, %rdi
je 0x512a
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x1c8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5147
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x2140
movl $0x90, %edi
callq 0x2130
movq %rax, %r15
leaq 0x178(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x235b(%rip), %rsi      # 0x74c3
leaq 0x2360(%rip), %rdx      # 0x74cf
leaq 0x168(%rsp), %rdi
callq 0x31d2
leaq 0x158(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x2341(%rip), %rsi      # 0x74d0
leaq 0x2353(%rip), %rdx      # 0x74e9
leaq 0x148(%rsp), %rdi
callq 0x31d2
leaq 0x138(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x2334(%rip), %rsi      # 0x74ea
leaq 0x233b(%rip), %rdx      # 0x74f8
leaq 0x128(%rsp), %rdi
callq 0x31d2
leaq 0x168(%rsp), %rsi
leaq 0x148(%rsp), %rdx
leaq 0x128(%rsp), %rcx
movq %r15, %rdi
callq 0x3600
movq %r15, 0x18(%rbx)
movq 0x128(%rsp), %rdi
cmpq %rbp, %rdi
je 0x520b
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x148(%rsp), %rdi
cmpq %r13, %rdi
je 0x5228
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x168(%rsp), %rdi
cmpq %r12, %rdi
je 0x5245
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x2140
movl $0x90, %edi
callq 0x2130
movq %rax, %r15
leaq 0x118(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2293(%rip), %rsi      # 0x74f9
leaq 0x2297(%rip), %rdx      # 0x7504
leaq 0x108(%rsp), %rdi
callq 0x31d2
leaq 0xf8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x2278(%rip), %rsi      # 0x7505
leaq 0x2283(%rip), %rdx      # 0x7517
leaq 0xe8(%rsp), %rdi
callq 0x31d2
leaq 0xd8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x2264(%rip), %rsi      # 0x7518
leaq 0x226e(%rip), %rdx      # 0x7529
leaq 0xc8(%rsp), %rdi
callq 0x31d2
leaq 0x108(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
leaq 0xc8(%rsp), %rcx
movq %r15, %rdi
callq 0x4284
movq %r15, 0x20(%rbx)
movq 0xc8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5309
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5326
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x5343
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x2140
movl $0x90, %edi
callq 0x2130
movq %rax, %r15
leaq 0xb8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x21c6(%rip), %rsi      # 0x752a
leaq 0x21c9(%rip), %rdx      # 0x7534
leaq 0xa8(%rsp), %rdi
callq 0x31d2
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x21aa(%rip), %rsi      # 0x7535
leaq 0x21b4(%rip), %rdx      # 0x7546
leaq 0x88(%rsp), %rdi
callq 0x31d2
leaq 0x78(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x2198(%rip), %rsi      # 0x7547
leaq 0x219a(%rip), %rdx      # 0x7550
leaq 0x68(%rsp), %rdi
callq 0x31d2
leaq 0xa8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %r15, %rdi
callq 0x3600
movq %r15, 0x28(%rbx)
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x53f8
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x5415
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5432
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2140
movl $0x90, %edi
callq 0x2130
movq %rax, %r15
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2101(%rip), %rsi      # 0x7551
leaq 0x2104(%rip), %rdx      # 0x755b
leaq 0x48(%rsp), %rdi
callq 0x31d2
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x20eb(%rip), %rsi      # 0x755c
leaq 0x2100(%rip), %rdx      # 0x7578
leaq 0x28(%rsp), %rdi
callq 0x31d2
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x20e7(%rip), %rsi      # 0x7579
leaq 0x20ec(%rip), %rdx      # 0x7585
leaq 0x8(%rsp), %rdi
callq 0x31d2
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
callq 0x25d8
movq %r15, 0x30(%rbx)
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x54d5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x54ec
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x5503
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rdx
xorl %esi, %esi
callq 0x65c0
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rdx
callq 0x65c0
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rdx
callq 0x65c0
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdi
movq 0x28(%rbx), %rdx
callq 0x65c0
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdi
movq 0x30(%rbx), %rdx
callq 0x65c0
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdi
xorl %edx, %edx
callq 0x65c0
movq 0x8(%rbx), %rax
movq %rax, 0x38(%rbx)
movl $0x0, (%rbx)
movb $0x0, 0x58(%rbx)
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x55a8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x55a8
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x55c4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x55c4
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x57e2
movq 0x58(%rsp), %rsi
jmp 0x57d5
jmp 0x57df
movq %rax, %r14
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5600
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x5600
movq %rax, %r14
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x5622
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x5622
movq %rax, %r14
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x57e2
movq 0xb8(%rsp), %rsi
jmp 0x57d5
jmp 0x57df
movq %rax, %r14
movq 0xc8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x566a
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x566a
movq %rax, %r14
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0x568c
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x568c
movq %rax, %r14
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x57e2
movq 0x118(%rsp), %rsi
jmp 0x57d5
jmp 0x57df
movq %rax, %r14
movq 0x128(%rsp), %rdi
cmpq %rbp, %rdi
je 0x56d4
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x56d4
movq %rax, %r14
movq 0x148(%rsp), %rdi
cmpq %r13, %rdi
je 0x56f6
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x56f6
movq %rax, %r14
movq 0x168(%rsp), %rdi
cmpq %r12, %rdi
je 0x57e2
movq 0x178(%rsp), %rsi
jmp 0x57d5
jmp 0x57df
movq %rax, %r14
movq 0x188(%rsp), %rdi
cmpq %rbp, %rdi
je 0x573e
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x573e
movq %rax, %r14
movq 0x1a8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5760
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x5760
movq %rax, %r14
movq 0x1c8(%rsp), %rdi
cmpq %r12, %rdi
je 0x57e2
movq 0x1d8(%rsp), %rsi
jmp 0x57d5
jmp 0x57df
movq %rax, %r14
movq 0x1e8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x579e
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x579e
movq %rax, %r14
movq 0x208(%rsp), %rdi
cmpq %r13, %rdi
je 0x57c0
movq 0x218(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x57c0
movq %rax, %r14
movq 0x228(%rsp), %rdi
cmpq %r12, %rdi
je 0x57e2
movq 0x238(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x57e2
movq %rax, %r14
movl $0x90, %esi
movq %r15, %rdi
callq 0x2140
jmp 0x57f4
movq %rax, %r14
addq $0x40, %rbx
movq %rbx, %rdi
callq 0x6106
movq %r14, %rdi
callq 0x21a0