原文地址:折腾Java设计模式之备忘录模式
备忘录模式
Without violating encapsulation, capture and externalize an object's internal state allowing the object to be restored to this state later.
在不破...
举个栗子
问题描述
打游戏存进度。
简单实现
gamerole
/**
* 游戏角色
* created by callmedevil on 2019/8/11.
*/
public class gamerole {
// 生命力
private int vit;
// 攻击力
private ...