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
a4db2dba
authored
Mar 20, 2024
by
krkane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
07ef4402
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
Library/Header.h
Library/Header.h
0 → 100644
View file @
a4db2dba
#ifndef GAME_HEADER_H
#define GAME_HEADER_H
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#define NUM_HENCHMEN 5
#define LOSE_HP -10
typedef
struct
{
int
health
;
int
attack
;
int
potionCount
;
}
Player
;
typedef
struct
{
int
health
;
int
attack
;
char
type
[
20
];
}
Enemy
;
typedef
struct
{
int
health
;
int
attack
;
char
type
[
20
];
}
FinalBoss
;
void
PrintWelcomeMessage
(
void
);
void
DisplayGameRules
(
void
);
Player
CreatePlayer
();
int
Move
(
int
defeated_enemies
);
void
handleTrap
(
Player
*
player
);
int
fight
(
Player
*
p
,
Enemy
*
e
);
int
bossFight
(
Player
*
p
,
Enemy
*
boss
);
void
usePotion
(
Player
*
p
,
int
initialHealth
,
int
currentHealth
);
void
levelUp
(
Player
*
p
);
Enemy
CreateEnemy
(
int
defeated_enemies
);
FinalBoss
CreateFinalBoss
(
int
defeated_enemies
);
#endif //GAME_HEADER_H
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