117

《魂斗罗归来》之状态模式VS策略模式 - 简书

 6 years ago
source link: http://www.jianshu.com/p/ac5b81102e9c?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
欢迎收看俗到掉渣的《小Y讲堂》节目,大家好,我是小Y,一个集性感毛发与才华于一身的程序猿。小Y的设计模式系列中的「状态模式」和「策略模式」都已经总结完成了,很多小伙伴都会凌乱在这两种模式当中,小Y曾经也被凌乱到无法自拔。。。 一、模式对战前的准备 两个类图都非常相似,都是通过Context类封装了一个具体的行为,都提供了一个封装方法,是高扩展性的设计模式。它们就像一对孪生兄弟一样,通过通用U...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK