// File: 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
movq %rsp, %rbp
subq $0x3c0, %rsp            # imm = 0x3C0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x300(%rbp)
addq $0x40, %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x7500
movl $0x90, %edi
callq 0x21b0
movq %rax, -0x2f0(%rbp)
jmp 0x60bd
movb $0x1, -0x8a(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x308(%rbp)
callq 0x22d0
movq -0x308(%rbp), %rdx
leaq 0x3396(%rip), %rsi      # 0x9478
leaq -0x38(%rbp), %rdi
callq 0x3290
jmp 0x60ed
leaq -0x61(%rbp), %rdi
movq %rdi, -0x310(%rbp)
callq 0x22d0
movq -0x310(%rbp), %rdx
leaq 0x3379(%rip), %rsi      # 0x9484
leaq -0x60(%rbp), %rdi
callq 0x3290
jmp 0x6116
leaq -0x89(%rbp), %rdi
movq %rdi, -0x318(%rbp)
callq 0x22d0
movq -0x318(%rbp), %rdx
leaq 0x2f91(%rip), %rsi      # 0x90c8
leaq -0x88(%rbp), %rdi
callq 0x3290
jmp 0x6145
movq -0x2f0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x60(%rbp), %rdx
leaq -0x88(%rbp), %rcx
callq 0x5300
jmp 0x6162
movq -0x300(%rbp), %rax
movq -0x2f0(%rbp), %rcx
movb $0x0, -0x8a(%rbp)
movq %rcx, 0x8(%rax)
leaq -0x88(%rbp), %rdi
callq 0x2100
leaq -0x89(%rbp), %rdi
callq 0x21f0
leaq -0x60(%rbp), %rdi
callq 0x2100
leaq -0x61(%rbp), %rdi
callq 0x21f0
leaq -0x38(%rbp), %rdi
callq 0x2100
leaq -0x39(%rbp), %rdi
callq 0x21f0
movl $0x90, %edi
callq 0x21b0
movq %rax, -0x320(%rbp)
jmp 0x61ca
movb $0x1, -0x102(%rbp)
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x22d0
movq -0x328(%rbp), %rdx
leaq 0x32a6(%rip), %rsi      # 0x9498
leaq -0xb0(%rbp), %rdi
callq 0x3290
jmp 0x6200
leaq -0xd9(%rbp), %rdi
movq %rdi, -0x330(%rbp)
callq 0x22d0
movq -0x330(%rbp), %rdx
leaq 0x327f(%rip), %rsi      # 0x94a0
leaq -0xd8(%rbp), %rdi
callq 0x3290
jmp 0x622f
leaq -0x101(%rbp), %rdi
movq %rdi, -0x338(%rbp)
callq 0x22d0
movq -0x338(%rbp), %rdx
leaq 0x326e(%rip), %rsi      # 0x94be
leaq -0x100(%rbp), %rdi
callq 0x3290
jmp 0x625e
movq -0x320(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
leaq -0x100(%rbp), %rcx
callq 0x4580
jmp 0x6281
movq -0x300(%rbp), %rax
movq -0x320(%rbp), %rcx
movb $0x0, -0x102(%rbp)
movq %rcx, 0x10(%rax)
leaq -0x100(%rbp), %rdi
callq 0x2100
leaq -0x101(%rbp), %rdi
callq 0x21f0
leaq -0xd8(%rbp), %rdi
callq 0x2100
leaq -0xd9(%rbp), %rdi
callq 0x21f0
leaq -0xb0(%rbp), %rdi
callq 0x2100
leaq -0xb1(%rbp), %rdi
callq 0x21f0
movl $0x90, %edi
callq 0x21b0
movq %rax, -0x340(%rbp)
jmp 0x62f5
movb $0x1, -0x17a(%rbp)
leaq -0x129(%rbp), %rdi
movq %rdi, -0x348(%rbp)
callq 0x22d0
movq -0x348(%rbp), %rdx
leaq 0x31b6(%rip), %rsi      # 0x94d3
leaq -0x128(%rbp), %rdi
callq 0x3290
jmp 0x632b
leaq -0x151(%rbp), %rdi
movq %rdi, -0x350(%rbp)
callq 0x22d0
movq -0x350(%rbp), %rdx
leaq 0x3194(%rip), %rsi      # 0x94e0
leaq -0x150(%rbp), %rdi
callq 0x3290
jmp 0x635a
leaq -0x179(%rbp), %rdi
movq %rdi, -0x358(%rbp)
callq 0x22d0
movq -0x358(%rbp), %rdx
leaq 0x317f(%rip), %rsi      # 0x94fa
leaq -0x178(%rbp), %rdi
callq 0x3290
jmp 0x6389
movq -0x340(%rbp), %rdi
leaq -0x128(%rbp), %rsi
leaq -0x150(%rbp), %rdx
leaq -0x178(%rbp), %rcx
callq 0x4580
jmp 0x63ac
movq -0x300(%rbp), %rax
movq -0x340(%rbp), %rcx
movb $0x0, -0x17a(%rbp)
movq %rcx, 0x18(%rax)
leaq -0x178(%rbp), %rdi
callq 0x2100
leaq -0x179(%rbp), %rdi
callq 0x21f0
leaq -0x150(%rbp), %rdi
callq 0x2100
leaq -0x151(%rbp), %rdi
callq 0x21f0
leaq -0x128(%rbp), %rdi
callq 0x2100
leaq -0x129(%rbp), %rdi
callq 0x21f0
movl $0x90, %edi
callq 0x21b0
movq %rax, -0x360(%rbp)
jmp 0x6420
movb $0x1, -0x1f2(%rbp)
leaq -0x1a1(%rbp), %rdi
movq %rdi, -0x368(%rbp)
callq 0x22d0
movq -0x368(%rbp), %rdx
leaq 0x30c1(%rip), %rsi      # 0x9509
leaq -0x1a0(%rbp), %rdi
callq 0x3290
jmp 0x6456
leaq -0x1c9(%rbp), %rdi
movq %rdi, -0x370(%rbp)
callq 0x22d0
movq -0x370(%rbp), %rdx
leaq 0x309e(%rip), %rsi      # 0x9515
leaq -0x1c8(%rbp), %rdi
callq 0x3290
jmp 0x6485
leaq -0x1f1(%rbp), %rdi
movq %rdi, -0x378(%rbp)
callq 0x22d0
movq -0x378(%rbp), %rdx
leaq 0x3082(%rip), %rsi      # 0x9528
leaq -0x1f0(%rbp), %rdi
callq 0x3290
jmp 0x64b4
movq -0x360(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
leaq -0x1c8(%rbp), %rdx
leaq -0x1f0(%rbp), %rcx
callq 0x5300
jmp 0x64d7
movq -0x300(%rbp), %rax
movq -0x360(%rbp), %rcx
movb $0x0, -0x1f2(%rbp)
movq %rcx, 0x20(%rax)
leaq -0x1f0(%rbp), %rdi
callq 0x2100
leaq -0x1f1(%rbp), %rdi
callq 0x21f0
leaq -0x1c8(%rbp), %rdi
callq 0x2100
leaq -0x1c9(%rbp), %rdi
callq 0x21f0
leaq -0x1a0(%rbp), %rdi
callq 0x2100
leaq -0x1a1(%rbp), %rdi
callq 0x21f0
movl $0x90, %edi
callq 0x21b0
movq %rax, -0x380(%rbp)
jmp 0x654b
movb $0x1, -0x26a(%rbp)
leaq -0x219(%rbp), %rdi
movq %rdi, -0x388(%rbp)
callq 0x22d0
movq -0x388(%rbp), %rdx
leaq 0x2fc7(%rip), %rsi      # 0x953a
leaq -0x218(%rbp), %rdi
callq 0x3290
jmp 0x6581
leaq -0x241(%rbp), %rdi
movq %rdi, -0x390(%rbp)
callq 0x22d0
movq -0x390(%rbp), %rdx
leaq 0x2fa3(%rip), %rsi      # 0x9545
leaq -0x240(%rbp), %rdi
callq 0x3290
jmp 0x65b0
leaq -0x269(%rbp), %rdi
movq %rdi, -0x398(%rbp)
callq 0x22d0
movq -0x398(%rbp), %rdx
leaq 0x2f86(%rip), %rsi      # 0x9557
leaq -0x268(%rbp), %rdi
callq 0x3290
jmp 0x65df
movq -0x380(%rbp), %rdi
leaq -0x218(%rbp), %rsi
leaq -0x240(%rbp), %rdx
leaq -0x268(%rbp), %rcx
callq 0x4580
jmp 0x6602
movq -0x300(%rbp), %rax
movq -0x380(%rbp), %rcx
movb $0x0, -0x26a(%rbp)
movq %rcx, 0x28(%rax)
leaq -0x268(%rbp), %rdi
callq 0x2100
leaq -0x269(%rbp), %rdi
callq 0x21f0
leaq -0x240(%rbp), %rdi
callq 0x2100
leaq -0x241(%rbp), %rdi
callq 0x21f0
leaq -0x218(%rbp), %rdi
callq 0x2100
leaq -0x219(%rbp), %rdi
callq 0x21f0
movl $0x90, %edi
callq 0x21b0
movq %rax, -0x3a0(%rbp)
jmp 0x6676
movb $0x1, -0x2e2(%rbp)
leaq -0x291(%rbp), %rdi
movq %rdi, -0x3a8(%rbp)
callq 0x22d0
movq -0x3a8(%rbp), %rdx
leaq 0x2ec3(%rip), %rsi      # 0x9561
leaq -0x290(%rbp), %rdi
callq 0x3290
jmp 0x66ac
leaq -0x2b9(%rbp), %rdi
movq %rdi, -0x3b0(%rbp)
callq 0x22d0
movq -0x3b0(%rbp), %rdx
leaq 0x2e9f(%rip), %rsi      # 0x956c
leaq -0x2b8(%rbp), %rdi
callq 0x3290
jmp 0x66db
leaq -0x2e1(%rbp), %rdi
movq %rdi, -0x3b8(%rbp)
callq 0x22d0
movq -0x3b8(%rbp), %rdx
leaq 0x2e8d(%rip), %rsi      # 0x9589
leaq -0x2e0(%rbp), %rdi
callq 0x3290
jmp 0x670a
movq -0x3a0(%rbp), %rdi
leaq -0x290(%rbp), %rsi
leaq -0x2b8(%rbp), %rdx
leaq -0x2e0(%rbp), %rcx
callq 0x2770
jmp 0x672d
movq -0x300(%rbp), %rax
movq -0x3a0(%rbp), %rcx
movb $0x0, -0x2e2(%rbp)
movq %rcx, 0x30(%rax)
leaq -0x2e0(%rbp), %rdi
callq 0x2100
leaq -0x2e1(%rbp), %rdi
callq 0x21f0
leaq -0x2b8(%rbp), %rdi
callq 0x2100
leaq -0x2b9(%rbp), %rdi
callq 0x21f0
leaq -0x290(%rbp), %rdi
callq 0x2100
leaq -0x291(%rbp), %rdi
callq 0x21f0
movq -0x300(%rbp), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rax), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x7e10
jmp 0x67a8
movq -0x300(%rbp), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdi
movq 0x18(%rax), %rdx
callq 0x7e10
jmp 0x67c2
movq -0x300(%rbp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdi
movq 0x20(%rax), %rdx
callq 0x7e10
jmp 0x67dc
movq -0x300(%rbp), %rax
movq 0x18(%rax), %rsi
movq 0x20(%rax), %rdi
movq 0x28(%rax), %rdx
callq 0x7e10
jmp 0x67f6
movq -0x300(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdi
movq 0x30(%rax), %rdx
callq 0x7e10
jmp 0x6810
movq -0x300(%rbp), %rax
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x7e10
jmp 0x682a
movq -0x300(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x38(%rax)
movl $0x0, (%rax)
movb $0x0, 0x58(%rax)
addq $0x3c0, %rsp            # imm = 0x3C0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x6c08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x68c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x68b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x689f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x2100
leaq -0x89(%rbp), %rdi
callq 0x21f0
leaq -0x60(%rbp), %rdi
callq 0x2100
leaq -0x61(%rbp), %rdi
callq 0x21f0
leaq -0x38(%rbp), %rdi
callq 0x2100
leaq -0x39(%rbp), %rdi
callq 0x21f0
testb $0x1, -0x8a(%rbp)
jne 0x68da
jmp 0x68eb
movq -0x2f0(%rbp), %rdi
movl $0x90, %esi
callq 0x21c0
jmp 0x6c08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x6962
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x694a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x6932
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x2100
leaq -0x101(%rbp), %rdi
callq 0x21f0
leaq -0xd8(%rbp), %rdi
callq 0x2100
leaq -0xd9(%rbp), %rdi
callq 0x21f0
leaq -0xb0(%rbp), %rdi
callq 0x2100
leaq -0xb1(%rbp), %rdi
callq 0x21f0
testb $0x1, -0x102(%rbp)
jne 0x6979
jmp 0x698a
movq -0x320(%rbp), %rdi
movl $0x90, %esi
callq 0x21c0
jmp 0x6c08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x6a01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x69e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x69d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x2100
leaq -0x179(%rbp), %rdi
callq 0x21f0
leaq -0x150(%rbp), %rdi
callq 0x2100
leaq -0x151(%rbp), %rdi
callq 0x21f0
leaq -0x128(%rbp), %rdi
callq 0x2100
leaq -0x129(%rbp), %rdi
callq 0x21f0
testb $0x1, -0x17a(%rbp)
jne 0x6a18
jmp 0x6a29
movq -0x340(%rbp), %rdi
movl $0x90, %esi
callq 0x21c0
jmp 0x6c08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x6aa0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x6a88
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x6a70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x2100
leaq -0x1f1(%rbp), %rdi
callq 0x21f0
leaq -0x1c8(%rbp), %rdi
callq 0x2100
leaq -0x1c9(%rbp), %rdi
callq 0x21f0
leaq -0x1a0(%rbp), %rdi
callq 0x2100
leaq -0x1a1(%rbp), %rdi
callq 0x21f0
testb $0x1, -0x1f2(%rbp)
jne 0x6ab7
jmp 0x6ac8
movq -0x360(%rbp), %rdi
movl $0x90, %esi
callq 0x21c0
jmp 0x6c08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x6b3f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x6b27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x6b0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x2100
leaq -0x269(%rbp), %rdi
callq 0x21f0
leaq -0x240(%rbp), %rdi
callq 0x2100
leaq -0x241(%rbp), %rdi
callq 0x21f0
leaq -0x218(%rbp), %rdi
callq 0x2100
leaq -0x219(%rbp), %rdi
callq 0x21f0
testb $0x1, -0x26a(%rbp)
jne 0x6b56
jmp 0x6b67
movq -0x380(%rbp), %rdi
movl $0x90, %esi
callq 0x21c0
jmp 0x6c08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x6bde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x6bc6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x6bae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x2100
leaq -0x2e1(%rbp), %rdi
callq 0x21f0
leaq -0x2b8(%rbp), %rdi
callq 0x2100
leaq -0x2b9(%rbp), %rdi
callq 0x21f0
leaq -0x290(%rbp), %rdi
callq 0x2100
leaq -0x291(%rbp), %rdi
callq 0x21f0
testb $0x1, -0x2e2(%rbp)
jne 0x6bf5
jmp 0x6c06
movq -0x3a0(%rbp), %rdi
movl $0x90, %esi
callq 0x21c0
jmp 0x6c08
movq -0x2f8(%rbp), %rdi
callq 0x7520
movq -0x10(%rbp), %rdi
callq 0x22c0
nopl (%rax)