Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
krkane
/
Rüütli Vaev
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
070c9a9d
authored
Mar 20, 2024
by
krkane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Baaskood.c
parent
fa1fb5bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
Source/Baaskood.c
Source/Baaskood.c
View file @
070c9a9d
...
@@ -92,6 +92,16 @@ int Move(int defeated_enemies)
...
@@ -92,6 +92,16 @@ int Move(int defeated_enemies)
}
}
}
}
void
handleTrap
(
Player
*
player
)
{
player
->
health
-=
10
;
// Subtract 10 from player's max health
if
(
player
->
health
<=
0
)
{
printf
(
"Kahjuks, sa kaotasid.
\n
"
);
exit
(
0
);
// Player lost the game
}
else
{
printf
(
"Sul on alles %d elu.
\n
"
,
player
->
health
);
}
}
int
fight
(
Player
*
p
,
Enemy
*
e
)
{
int
fight
(
Player
*
p
,
Enemy
*
e
)
{
int
playerHp
=
p
->
health
;
int
playerHp
=
p
->
health
;
int
enemyHp
=
e
->
health
;
int
enemyHp
=
e
->
health
;
...
...
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