Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
cptr142_group_project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aaron Sturtevant
cptr142_group_project
Commits
bc4f220f
Commit
bc4f220f
authored
Mar 19, 2018
by
Aaron Sturtevant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commiting
parent
548a44b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
main.cpp
main.cpp
+25
-2
No files found.
main.cpp
View file @
bc4f220f
...
...
@@ -45,7 +45,7 @@ int main() {
cout
<<
"How do you respond? (Fight, Talk, Or Flee): "
;
cin
>>
response
;
if
((
response
==
'
Fight
'
)
||
(
response
==
'
Talk
'
)
{
if
(
dungeon
.
compareStats
(
playerPtr
,
bossPtr
))
{
if
(
dungeon
.
compareStats
(
playerPtr
,
dungeon
.
floorNum
))
{
dungeonPtr
.
bossResponse
(
dungeonPtr
.
floorNum
,
playerWon
);
playerWon
=
true
;
dungeonPtr
.
floorNum
++
;
...
...
@@ -67,7 +67,30 @@ int main() {
}
else
{
dungeon
.
dungeonOutput
(
dungeon
.
roomEncounter
);
dungeon
.
getMonster
(
dungeon
.
roomEncounter
);
do
{
cout
<<
"How do you respond? (Fight, Talk, Or Flee): "
;
cin
>>
response
;
if
((
response
==
'
Fight
'
)
||
(
response
==
'
Talk
'
)
{
if
(
dungeon
.
compareStats
(
playerPtr
,
monsterPtr
,
dungeon
.
roomEncounter
))
{
dungeonPtr
.
monsterResponse
(
dungeonPtr
.
floorNum
,
playerWon
);
playerWon
=
true
;
dungeonPtr
.
floorNum
++
;
monsterPtr
.
giveItems
(
dungeonPtr
.
encounterNum
,
itemPtr
);
}
else
{
dungeonPtr
.
bossResponse
(
dungeonPtr
.
floorNum
,
playerWon
);
}
}
else
{
cout
<<
"You run crying out of the room. Shame haunts your footsteps"
<<
endl
;
playerWon
=
true
;
}
}
while
(
playerWon
==
false
;);
playerWon
=
false
;
dungeon
.
roomCounter
++
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment