Git Product home page Git Product logo

design-pattern-for-swift's Introduction

Design-Pattern-For-Swift

当你还是一个码农的时候,每天都要编写多少行代码每次都要创建很多类的时候,每建立一次给你一点经验值,累计到十级的时候会发现我写了这很多代码为什么不能复用呢?

这时恭喜您进入转职阶段,由码农转成会放魔法的码农。。。(多么吊炸天技能)

觉醒吧!少年。

以王者荣耀为示例题材,写代码就是打游戏! 文章介绍:https://www.jianshu.com/p/68406c6a8ab6

1.奥义第一式·简单工厂模式(我在游戏中有一个英雄库,我想买啥就买啥)

2.奥义第二式·工厂方法模式(再造一个英雄库)

3.奥义第三式·抽象工厂模式(英雄工厂、防御塔工厂、小兵工厂)

4.奥义第四式·策略模式(商店的优惠策略)

5.奥义第五式·代理模式(我将代替小兵惩罚你)

6.奥义第六式·装饰模式(给你的英雄装配超弦时装)

7.奥义第七式·模板方法模式(我有一套百战百胜铭文)

8.奥义第八式·外观模式(游戏开始前和游戏结束后)

9.奥义第九式·建造者模式(我要选择一个很强的角色)

10.奥义第十式·观察者模式(百里守约我怎么杀不死你)

11.奥义第十一式·状态模式(关羽你的秘密好多啊)

12.奥义第十二式·适配器模式(老外想玩游戏看不懂中文啊)

13.奥义第十三式·备忘录模式(血王宫的回忆!太难了,我玩不过去啊)

14.奥义第十四式·组合模式(一场游戏需要多少场景)

15.奥义第十五式·迭代器模式(英雄商店金币的排序)

16.奥义第十六式·单例模式(设置操作界面,我只要设置一次)

17.奥义第十七式·桥接模式(角色技能&位置类型)

18.奥义第十八式·命令模式(命令角色,释放1技能、释放2技能、取消2技能、释放大招)

19.奥义第十九式·职责裢模式(我用金币买英雄)

20.奥义第二十式·中介者模式(我需要一个辅助)

21.奥义第二十一式·享元模式(这个游戏的模式好多)

22.奥义第二十二式·解释器模式(这个游戏的游戏模式好多)

23.奥义第二十三式·访问者模式(每个角色都有一套动作)

24.奥义第二十四式·原型模式(玩个克隆大战?)

design-pattern-for-swift's People

Contributors

ruanch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.