Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Dungeon-Game/player.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
40 lines (32 sloc)
588 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef PLAYER | |
#define PLAYER | |
#include <string> | |
#include <iostream> | |
#include "IO.h" | |
#include <cmath> | |
#include <stdlib.h> | |
using namespace std; | |
class Player | |
{ | |
private: | |
//Attributes | |
int level; | |
string weapon_equipped; | |
int pos_x; | |
int pos_y; | |
public: | |
string name; | |
int health; | |
int attack; | |
int defense; | |
//Constructor | |
Player(); | |
Player(string player_name); | |
int get_x(); | |
int get_y(); | |
void set_position(int x, int y); | |
char player_input(); | |
void take_damage(int attack); | |
int player_attack(); | |
}; | |
#endif |