package com.example.sadievrenseker.myapplication;

/**
 * Created by sadievrenseker on 2/6/17.
 */

public class Pet {
    String name;
    int weight;
    int hunger_level;
    String color;
    int sleep_level;
    int happiness_level;
    int action_points;

    public Pet(int weight,int hunger_level, int sleep_level, int happiness_level, int action_points){
        this.weight=weight;
        this.hunger_level=hunger_level;
        this.sleep_level=sleep_level;
        this.happiness_level=happiness_level;
        this.action_points=action_points;
    }
    public String feed(){
        if(action_points>0) {
            hunger_level--;
            weight++;
            action_points--;
            sleep_level--;
            happiness_level--;
            return "pet feeded";
        }
        else
            return "You dont have enough action points";
    }
    public String sleep(){
        if(action_points>0) {
            sleep_level++;
            action_points--;
            happiness_level--;
            return "pet slept";
        }
        else
            return "You dont have enough action points";
    }

    public String play(){
        if(action_points>0) {
            happiness_level++;
            action_points--;
            sleep_level--;
            return "you played with the pet ";
        }
        else
            return "You dont have enough action points";
    }

    public String stats(){

        return "Name : "+ name+
                " \n weight : " + weight
                + " \n hunger level :" + hunger_level
                + " \n sleep level :"+ sleep_level
                + " \n happiness level :"+ happiness_level
                +" \n action points left :"+ action_points;
    }

}
