-
方式2:按照宫和格定位
查看全部 -
游戏中的方格有俩种定位方式:
方式1:行列编号定位;查看全部 -
数独游戏分析
查看全部 -
游戏项目准备
查看全部 -
课程简介,主要是实现步骤,大纲
查看全部 -
<a href="https://github.com/gengwenhao/sudoku/tree/init" title="这节课可以运行的工具链配置">这节课可以运行的工具链配置</a><br />查看全部
-
项目的配置代码https://github.com/gengwenhao/sudoku/tree/init
查看全部 -
前端开发采用的技术
技术
HTML5 LESS/CSS
JavaScript jQuery
TypeScript2.0+
前端构建技术
Node.js 6+/Yarn
Gulp(构建工具)Webpack(打包工具)Babel(转译工具)
TSC(TypeScript Compiler)
查看全部 -
1、新建gulpfile.js
2. gulp.task
查看全部 -
yarn add -D xxxx
添加模块:
gulp、gulp-util、gulp-less、
webpack-stream、
babel-core、babel-loader、babel-preset-es2015
查看全部 -
本项目的构建工具
查看全部 -
Fisher-Yates 洗牌算法
解构函数等某些 ES6 语法语句后要加分号
查看全部 -
Array.from()
查看全部 -
array.fill() 初始化数组的值
查看全部 -
用npm 初始化项目
先建立项目目录结构
npm init 初始化 生成 package.json ,
npm 安装项目依赖
安装webpack打包工具,配置webpack.config.js
新webpack配置
module.exports = {
entry: {
index: "./js/index"
},
output: {
filename: "[name].js"
},
devtool: "source-map",
resolve: {
extensions: [".js"]
},
module: {
rules: [
{
test: /\.js$/,
use: {
loader: "babel-loader",
options: {
presets: ["es2015"]
}
},
exclude: /node_modules/
}
]
}
}
查看全部 -
随机洗牌算法(map版)
const shuffle = array => array.map((v, i, a) => { let index = ~~(Math.random() * (a.length - i)) + i; [a[i], a[index]] = [a[index], a[i]] return a[i]; })
查看全部 -
宫坐标转换
查看全部 -
判断是否有某个class:
1、$("#div").is(".empty")
2. $("#div").hasClass(".empty")
查看全部 -
er
查看全部 -
知识点2
查看全部 -
知识点截图
查看全部 -
http://yarnpkg.com查看全部
-
[代码](https://gitee.com/jamesfancy/sudoku)查看全部
-
宫的坐标计算查看全部
-
前端构建过程查看全部
-
ts特性查看全部
-
脚本目录结构查看全部
-
新的查看全部
-
typeScript在线资源 主页:http://www.typescriptlang.org 文档(英文):http://www.typescriptlang.org/docs/tutorial.html 文档(中文): http://www.gitbook.com/book/zhongsp/typescript-handbook/details查看全部
-
感谢大家提出疑问!这里的确不能检查最后一个元素为 0 的情况。循环变量 i 的循环条件应该改为 i < length。后面重构(忘了在哪重构的,但是最终代码是使用的 forEach() 而不是 for 循环)的时候似乎悄悄把这个问题给处理掉了,所以最终测试的时候没有发现问题。查看全部
-
请注意,这里 rowIndex 需要使用 let/var 声明。后面的 colIndex 和 boxIndex 也是;14分10秒以后的代码是添加了声明的。查看全部
-
[从 JS 到 TS 开发数独游戏(TS版)](http://www.imooc.com/learn/903) 已经上线了查看全部
-
欢迎关注我的订阅号“边城客栈”,平均大约每两周会推荐一次1~3篇原创或翻译的开发技术类文章,以 JS/TS 技术为主,也有一些后端技术(C#.NET)和算法等内容查看全部
-
文件结构查看全部
-
坐标计算查看全部
-
bucuo查看全部
-
webpack 4.0 配置: module.exports = { entry: { index: "./js/index.js" }, output: { filename: "[name].js" }, devtool: "source-map", resolve: { extensions: [".js"] }, module: { rules: [ { test: /\.js$/, use: { loader: "babel-loader", options: { presets: ["es2015"] } }, exclude: /(node_modules|bower_components)/ } ] } }查看全部
-
进击查看全部
-
进击查看全部
-
rowIndex = 3 colIndex = 6查看全部
-
数独查看全部
-
数独查看全部
-
web前段技术查看全部
-
Marked查看全部
-
webpack按照老师讲的本地没跑通,这是调好之后的配置文件,是webpack版本的问题 module.exports={ entry:{ index:"./js/index" }, output:{ filename:"[name].js" }, devtool:"source-map", resolve:{ extensions:[".js"] }, module:{ rules: [ { test: /\.js$/, use: { loader: "babel-loader", options: { presets: ["es2015"] } }, exclude: /node_modules/ } ] } }查看全部
举报