为什么要定义两个一样的变量
previous是之前的没有运行的class Shape对象的状态,current是当前要准备运行的状态 。在没有运行时current = previous = s;
当运行if (growing) {
current += growthFactor;
} else {
current -= growthFactor;
}
if (current == size || current == 0) {
growing = !growing;
}
两个就不同了,设置current = previous = s;是为了初始化程序