class Player1 {
public int hp;
public int place;
public Player1() {
hp = 100;
place = 0;
}
public void work() {
hp--;
place++;
}
public void print() {
System.
out.
println("HP: " + hp
+ ", Place: " + place
); // hp と place を表示 }
}
class Game1 {
public static void main
(String[] args
) {
Player1 p = new Player1();
p.print();
p.work();
p.print();
}
}
Y2xhc3MgUGxheWVyMSB7CgogICAgcHVibGljIGludCBocDsKICAgIHB1YmxpYyBpbnQgcGxhY2U7CgogICAgcHVibGljIFBsYXllcjEoKSB7CiAgICAgICAgaHAgPSAxMDA7ICAKICAgICAgICBwbGFjZSA9IDA7IAogICAgfQogICAgcHVibGljIHZvaWQgd29yaygpIHsKICAgICAgICBocC0tOwogICAgICAgIHBsYWNlKys7CiAgICB9CgogICAgcHVibGljIHZvaWQgcHJpbnQoKSB7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJIUDogIiArIGhwICsgIiwgUGxhY2U6ICIgKyBwbGFjZSk7IC8vIGhwIOOBqCBwbGFjZSDjgpLooajnpLoKICAgIH0KfQoKIGNsYXNzIEdhbWUxIHsKICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKCiAgICAgICAgUGxheWVyMSBwID0gbmV3IFBsYXllcjEoKTsKCiAgICAgICAgcC5wcmludCgpOwoKICAgICAgICBwLndvcmsoKTsKCiAgICAgICAgcC5wcmludCgpOwogICAgfQp9Cg==