Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Doppelreiter, Markus
test
Commits
d2a53103
Commit
d2a53103
authored
Mar 26, 2020
by
Doppelreiter, Markus
Browse files
Options
Downloads
Patches
Plain Diff
added
parents
Branches
master
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CreatureCard.cpp
+56
-0
56 additions, 0 deletions
CreatureCard.cpp
CreatureCard.hpp
+94
-0
94 additions, 0 deletions
CreatureCard.hpp
with
150 additions
and
0 deletions
CreatureCard.cpp
0 → 100644
+
56
−
0
View file @
d2a53103
//------------------------------------------------------------------------------
// CratureCard.cpp
//
// Group: Group 8.7, study assistant Michael Hancianu
//
// Authors: Gerald Gattringer 01617517
// Markus Doppelreiter 01535331
// Markus Meierhofer 51800273
//------------------------------------------------------------------------------
//
#include
"CreatureCard.hpp"
using
Oop
::
CreatureCard
;
CreatureCard
::
CreatureCard
(
const
std
::
string
name
,
int
mana_cost
,
const
int
damage_points
,
const
int
life_points
,
const
bool
shield
,
bool
mana_drain
,
bool
speedy
)
:
Card
(
name
,
mana_cost
,
CREATURE
),
damage_points_
(
damage_points
),
life_points_
(
life_points
),
shield_
(
shield
),
mana_drain_
(
mana_drain
),
speedy_
(
speedy
)
{}
int
CreatureCard
::
getLifePoints
()
const
{
return
life_points_
;
}
int
CreatureCard
::
getDamagePoints
()
const
{
return
damage_points_
;
}
bool
CreatureCard
::
getManaDrain
()
const
{
return
mana_drain_
;
}
bool
CreatureCard
::
getShield
()
const
{
return
shield_
;
}
int
CreatureCard
::
getCurrentLifePoints
()
const
{
return
current_life_points_
;
}
bool
CreatureCard
::
getReadyToFight
()
const
{
return
ready_to_fight_
;
}
bool
CreatureCard
::
getAlreadyAttacked
()
const
{
return
already_attacked_
;
}
bool
CreatureCard
::
getSpeedy
()
const
{
return
speedy_
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
CreatureCard.hpp
0 → 100644
+
94
−
0
View file @
d2a53103
//------------------------------------------------------------------------------
// CreatureCard.hpp
//
// Group: Group 8.7, study assistant Michael Hancianu
//
// Authors: Gerald Gattringer 01617517
// Markus Doppelreiter 01535331
// Markus Meierhofer 51800273
//------------------------------------------------------------------------------
//
#ifndef TUCG_CREATURECARD_HPP
#define TUCG_CREATURECARD_HPP
#include
"Card.hpp"
namespace
Oop
{
class
Game
;
//------------------------------------------------------------------------
// Creature Card Class
// Class defining the creator cards in the game
//
class
CreatureCard
:
public
Card
{
public:
//------------------------------------------------------------------------
// Constructor
//
CreatureCard
(
const
std
::
string
name
,
int
mana_cost
,
const
int
damage_points
,
const
int
life_points
,
const
bool
shield
,
bool
mana_drain
,
bool
speedy
);
//------------------------------------------------------------------------
// Getter Methods
//
int
getLifePoints
()
const
;
int
getDamagePoints
()
const
;
bool
getManaDrain
()
const
;
bool
getShield
()
const
;
int
getCurrentLifePoints
()
const
;
bool
getReadyToFight
()
const
;
bool
getAlreadyAttacked
()
const
;
bool
getSpeedy
()
const
;
private:
//------------------------------------------------------------------------
// damage dealt by this creature when attacked
//
const
int
damage_points_
;
//------------------------------------------------------------------------
// total life points of the kreatur, when playing the card
//
const
int
life_points_
;
//------------------------------------------------------------------------
// current life points of the kreatur
//
int
current_life_points_
;
//------------------------------------------------------------------------
// gives information, about the shield property
//
const
bool
shield_
;
//------------------------------------------------------------------------
// gives information, about mana drain or not
//
bool
mana_drain_
;
//------------------------------------------------------------------------
// gives information, about ready to fight
//
bool
ready_to_fight_
;
//------------------------------------------------------------------------
// each creature can in one round just attack on times
//
bool
already_attacked_
;
//------------------------------------------------------------------------
// true: attack in the first round ar possible
//
bool
speedy_
;
};
}
#endif //TUCG_CREATURECARD_HPP
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment