package virtualpet;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.util.Scanner;
/**
* 虚拟宠物类
* @author liuhu
*
*/
public class VirPet {
//前三个为全局变量
public static VirPet p = new VirPet(100, 0, 100, "我在睡觉..."); // 数据初始化4r0/
public static int count = 0;
public static boolean judgeStop = false;
public String name = "Tommy";
public int Happiness;
public int Hungry;
public int Health;
public String status;
// 构造方法
public VirPet(int Happiness,int Hungry,int Health,String status) {
this.Happiness = Happiness;
this.Hungry = Hungry;
this.Health = Health;
this.status = status;
}
private void printInfo(int data) {
for(int i = 1;i <= (data / 2);i++) {
System.out.print("*");
}
for(int i = (data / 2 + 1);i <= 50;i++) {
System.out.print("-");
}
}
public void sleep() {
this.status = "我在睡觉...";
// System.out.println(this.status);
}
public void wake() {
this.status = "我醒着但我很无聊...";
// System.out.println(this.status);
}
public void walk() {
this.status = "我在散步...";
System.out.println(this.status);
}
public void play() {
this.status = "我在玩耍...";
System.out.println(this.status);
}
public void feed() {
this.status = "我在吃饭...";
System.out.println(this.status);
}
public void seeDoctor() {
this.status = "我在看医生...";
System.out.println(this.status);
}
public void curStatus() {
System.out.println("\n当前时间:" + count);
System.out.println("我当前的