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
3d3fddfb
authored
May 01, 2024
by
grlabu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
741cd376
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
Library/mainwindow.h
Library/mainwindow.h
0 → 100644
View file @
3d3fddfb
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QString>
#include "Header.h"
#include "gamescreen.h"
QT_BEGIN_NAMESPACE
namespace
Ui
{
class
MainWindow
;
}
QT_END_NAMESPACE
namespace
MainWindow_NS
{
static
const
char
GAME_SAVES_FILENAME
[]
=
"GameSaves.txt"
;
}
class
MainWindow
:
public
QMainWindow
{
Q_OBJECT
public
:
MainWindow
(
QWidget
*
parent
=
nullptr
,
Player
*
player
=
nullptr
,
int
iDefeatedEnemies
=
0
);
~
MainWindow
();
void
createEnemy
();
// Declare createEnemy as public
int
getPlayerHp
()
const
;
void
setPlayerHp
(
int
newPlayerHp
);
private
slots
:
void
on_nupp_rynda_clicked
();
void
on_nupp_jook_clicked
();
// Slot for the "Use Potion" button click event
void
on_nupp_pogene_clicked
();
void
switchToGameScreen
();
// Declare the function to switch to the game screen
private
:
Ui
::
MainWindow
*
ui
;
Player
*
p
;
Enemy
enemy
;
gamescreen
*
gameScreen
;
int
defeatedEnemies
;
int
specialAttack
;
void
createPlayer
();
void
createPlayer
(
Player
*
player
);
void
levelUp
();
void
displayOutput
(
const
QString
&
output
);
void
saveGame
();
int
usePotion
(
Player
*
p
,
int
currentHealth
);
void
bossFightLastPhase
();
};
#endif // MAINWINDOW_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