Source

zorkish / Player.hpp

/*
 * Player.hpp
 *
 *  Created on: 25/08/2012
 *      Author: rhys
 */

#ifndef PLAYER_HPP_
#define PLAYER_HPP_

#include "Inventory.hpp"
#include "Location.hpp"

class Player {
private:
    Location* c_location = nullptr;

public:
    Inventory inv;
    int score = 0;
    bool alive = true;

    Player() {}
    Player(Location* starting_location) : c_location(starting_location) {}

    Location* current_location() const { return this->c_location; }
    void move(Location* to) { this->c_location = to; }
};


#endif /* PLAYER_HPP_ */