day2贪吃蛇案例
- 案例:贪吃蛇–面向对象的思想
- 原型添加方法的练习–熟练
- 私有的函数–外部不能访问,自己访问
- 陌生的方法:bind(对象)—–直接用
- 三个对象:游戏 蛇 食物
- 面向对象的编程思想:根据需求,抽象出相关的对象,总结对象的特征和行为,把特征变成属性,行为变成方法,然后定义(js)构造函数,实例化对象,通过对象调用属性和方法,完成相应的需求.—编程的思想
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true