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
Kameron Kinsey
cptr142_group_project
Commits
db0edbd5
Commit
db0edbd5
authored
Mar 02, 2018
by
Kameron Kinsey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialize repository
parent
7dd1ec5e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
24 deletions
+30
-24
Player.cpp
Player.cpp
+2
-24
Player.h
Player.h
+28
-0
No files found.
Kam_set_stats
.cpp
→
Player
.cpp
View file @
db0edbd5
// Random Stat Generator and Player Class
// Random Stat Generator and Player Class
#include "Player.h"
#include <cstring>
#include <cstring>
#include <cstdlib>
#include <cstdlib>
#include <iostream>
#include <iostream>
using
namespace
std
;
using
namespace
std
;
class
Player
{
private:
int
fight
=
10
,
flee
=
10
,
talk
=
10
,
health
=
100
;
string
playerName
;
public:
// Get Functions
int
getFight
()
{
return
fight
;
}
int
getFlee
()
{
return
flee
;
}
int
getTalk
()
{
return
talk
;
}
int
getHealth
()
{
return
health
;
}
string
getPlayerName
()
{
return
playerName
;
}
// Set Functions
void
setStats
(
int
);
int
setFight
(
int
Fight
)
{
fight
=
Fight
;
}
int
setFlee
(
int
Flee
)
{
flee
=
Flee
;
}
int
setTalk
(
int
Talk
)
{
talk
=
Talk
;
}
int
setPlayerName
(
string
name
)
{
playerName
=
name
;
}
};
int
main
()
{
int
main
()
{
...
@@ -35,8 +15,6 @@ int main() {
...
@@ -35,8 +15,6 @@ int main() {
Player
player
;
Player
player
;
string
name
=
player
.
getPlayerName
();
string
name
=
player
.
getPlayerName
();
// Enter Seed
//cin >> seed;
// Set Stats
// Set Stats
player
.
setStats
(
seed
);
player
.
setStats
(
seed
);
...
...
Player.h
0 → 100644
View file @
db0edbd5
// Header File for the Player Class
#include <cstring>
#include <iostream>
using
namespace
std
;
class
Player
{
private:
int
fight
=
10
,
flee
=
10
,
talk
=
10
,
health
=
100
;
string
playerName
;
public:
// Get Functions
int
getFight
()
{
return
fight
;
}
int
getFlee
()
{
return
flee
;
}
int
getTalk
()
{
return
talk
;
}
int
getHealth
()
{
return
health
;
}
string
getPlayerName
()
{
return
playerName
;
}
// Set Functions
void
setStats
(
int
);
int
setFight
(
int
Fight
)
{
fight
=
Fight
;
}
int
setFlee
(
int
Flee
)
{
flee
=
Flee
;
}
int
setTalk
(
int
Talk
)
{
talk
=
Talk
;
}
int
setPlayerName
(
string
name
)
{
playerName
=
name
;
}
};
\ No newline at end of file
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