// File: /workspace/github_cpp_makefile_star2_O1/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 0x2504(%rip), %rsi      # 0x7468
leaq 0x2508(%rip), %rdx      # 0x7473
leaq 0x228(%rsp), %rdi
callq 0x31cc
leaq 0x218(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x24e9(%rip), %rsi      # 0x7474
leaq 0x24f5(%rip), %rdx      # 0x7487
leaq 0x208(%rsp), %rdi
callq 0x31cc
leaq 0x1f8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x2106(%rip), %rsi      # 0x70b8
leaq 0x2115(%rip), %rdx      # 0x70ce
leaq 0x1e8(%rsp), %rdi
callq 0x31cc
leaq 0x228(%rsp), %rsi
leaq 0x208(%rsp), %rdx
leaq 0x1e8(%rsp), %rcx
movq %r15, %rdi
callq 0x427c
movq %r15, 0x8(%rbx)
movq 0x1e8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5007
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x208(%rsp), %rdi
cmpq %r13, %rdi
je 0x5024
movq 0x218(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x228(%rsp), %rdi
cmpq %r12, %rdi
je 0x5041
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 0x2426(%rip), %rsi      # 0x7488
leaq 0x2426(%rip), %rdx      # 0x748f
leaq 0x1c8(%rsp), %rdi
callq 0x31cc
leaq 0x1b8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x2407(%rip), %rsi      # 0x7490
leaq 0x241d(%rip), %rdx      # 0x74ad
leaq 0x1a8(%rsp), %rdi
callq 0x31cc
leaq 0x198(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x23fe(%rip), %rsi      # 0x74ae
leaq 0x240b(%rip), %rdx      # 0x74c2
leaq 0x188(%rsp), %rdi
callq 0x31cc
leaq 0x1c8(%rsp), %rsi
leaq 0x1a8(%rsp), %rdx
leaq 0x188(%rsp), %rcx
movq %r15, %rdi
callq 0x35f8
movq %r15, 0x10(%rbx)
movq 0x188(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5105
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x1a8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5122
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x1c8(%rsp), %rdi
cmpq %r12, %rdi
je 0x513f
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 0x2363(%rip), %rsi      # 0x74c3
leaq 0x2368(%rip), %rdx      # 0x74cf
leaq 0x168(%rsp), %rdi
callq 0x31cc
leaq 0x158(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x2349(%rip), %rsi      # 0x74d0
leaq 0x235b(%rip), %rdx      # 0x74e9
leaq 0x148(%rsp), %rdi
callq 0x31cc
leaq 0x138(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x233c(%rip), %rsi      # 0x74ea
leaq 0x2343(%rip), %rdx      # 0x74f8
leaq 0x128(%rsp), %rdi
callq 0x31cc
leaq 0x168(%rsp), %rsi
leaq 0x148(%rsp), %rdx
leaq 0x128(%rsp), %rcx
movq %r15, %rdi
callq 0x35f8
movq %r15, 0x18(%rbx)
movq 0x128(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5203
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x148(%rsp), %rdi
cmpq %r13, %rdi
je 0x5220
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x168(%rsp), %rdi
cmpq %r12, %rdi
je 0x523d
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 0x229b(%rip), %rsi      # 0x74f9
leaq 0x229f(%rip), %rdx      # 0x7504
leaq 0x108(%rsp), %rdi
callq 0x31cc
leaq 0xf8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x2280(%rip), %rsi      # 0x7505
leaq 0x228b(%rip), %rdx      # 0x7517
leaq 0xe8(%rsp), %rdi
callq 0x31cc
leaq 0xd8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x226c(%rip), %rsi      # 0x7518
leaq 0x2276(%rip), %rdx      # 0x7529
leaq 0xc8(%rsp), %rdi
callq 0x31cc
leaq 0x108(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
leaq 0xc8(%rsp), %rcx
movq %r15, %rdi
callq 0x427c
movq %r15, 0x20(%rbx)
movq 0xc8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5301
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0x531e
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x533b
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 0x21ce(%rip), %rsi      # 0x752a
leaq 0x21d1(%rip), %rdx      # 0x7534
leaq 0xa8(%rsp), %rdi
callq 0x31cc
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x21b2(%rip), %rsi      # 0x7535
leaq 0x21bc(%rip), %rdx      # 0x7546
leaq 0x88(%rsp), %rdi
callq 0x31cc
leaq 0x78(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x21a0(%rip), %rsi      # 0x7547
leaq 0x21a2(%rip), %rdx      # 0x7550
leaq 0x68(%rsp), %rdi
callq 0x31cc
leaq 0xa8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %r15, %rdi
callq 0x35f8
movq %r15, 0x28(%rbx)
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x53f0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x540d
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x542a
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 0x2109(%rip), %rsi      # 0x7551
leaq 0x210c(%rip), %rdx      # 0x755b
leaq 0x48(%rsp), %rdi
callq 0x31cc
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x20f3(%rip), %rsi      # 0x755c
leaq 0x2108(%rip), %rdx      # 0x7578
leaq 0x28(%rsp), %rdi
callq 0x31cc
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x20ef(%rip), %rsi      # 0x7579
leaq 0x20f4(%rip), %rdx      # 0x7585
leaq 0x8(%rsp), %rdi
callq 0x31cc
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 0x54cd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x54e4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x54fb
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rdx
xorl %esi, %esi
callq 0x65a8
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rdx
callq 0x65a8
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rdx
callq 0x65a8
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdi
movq 0x28(%rbx), %rdx
callq 0x65a8
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdi
movq 0x30(%rbx), %rdx
callq 0x65a8
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdi
xorl %edx, %edx
callq 0x65a8
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 0x55a0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x55a0
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x55bc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x55bc
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x57da
movq 0x58(%rsp), %rsi
jmp 0x57cd
jmp 0x57d7
movq %rax, %r14
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x55f8
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x55f8
movq %rax, %r14
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x561a
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x561a
movq %rax, %r14
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x57da
movq 0xb8(%rsp), %rsi
jmp 0x57cd
jmp 0x57d7
movq %rax, %r14
movq 0xc8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5662
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x5662
movq %rax, %r14
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5684
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x5684
movq %rax, %r14
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x57da
movq 0x118(%rsp), %rsi
jmp 0x57cd
jmp 0x57d7
movq %rax, %r14
movq 0x128(%rsp), %rdi
cmpq %rbp, %rdi
je 0x56cc
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x56cc
movq %rax, %r14
movq 0x148(%rsp), %rdi
cmpq %r13, %rdi
je 0x56ee
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x56ee
movq %rax, %r14
movq 0x168(%rsp), %rdi
cmpq %r12, %rdi
je 0x57da
movq 0x178(%rsp), %rsi
jmp 0x57cd
jmp 0x57d7
movq %rax, %r14
movq 0x188(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5736
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x5736
movq %rax, %r14
movq 0x1a8(%rsp), %rdi
cmpq %r13, %rdi
je 0x5758
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x5758
movq %rax, %r14
movq 0x1c8(%rsp), %rdi
cmpq %r12, %rdi
je 0x57da
movq 0x1d8(%rsp), %rsi
jmp 0x57cd
jmp 0x57d7
movq %rax, %r14
movq 0x1e8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5796
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x5796
movq %rax, %r14
movq 0x208(%rsp), %rdi
cmpq %r13, %rdi
je 0x57b8
movq 0x218(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x57b8
movq %rax, %r14
movq 0x228(%rsp), %rdi
cmpq %r12, %rdi
je 0x57da
movq 0x238(%rsp), %rsi
incq %rsi
callq 0x2140
jmp 0x57da
movq %rax, %r14
movl $0x90, %esi
movq %r15, %rdi
callq 0x2140
jmp 0x57ec
movq %rax, %r14
addq $0x40, %rbx
movq %rbx, %rdi
callq 0x610e
movq %r14, %rdi
callq 0x21a0