├── src
├── pack-user
│ ├── static
│ │ └── logo.png
│ └── pages
│ │ └── index.vue
├── static
│ ├── styles
│ │ ├── var.scss
│ │ ├── index.scss
│ │ └── theme.scss
│ └── js
│ │ ├── level
│ │ ├── README.md
│ │ └── index.js
│ │ └── map-el
│ │ └── index.js
├── pack-game
│ └── pages
│ │ ├── components
│ │ ├── game-top-bar
│ │ │ ├── config
│ │ │ │ └── player-status-text.js
│ │ │ └── game-top-bar.vue
│ │ ├── analog-handle
│ │ │ └── analog-handle.vue
│ │ ├── game-result
│ │ │ └── game-result.vue
│ │ └── game-menu
│ │ │ └── game-menu.vue
│ │ ├── config
│ │ └── data.js
│ │ ├── utils
│ │ └── move.js
│ │ └── index.vue
├── utils
│ ├── music.js
│ ├── index.js
│ ├── appback.js
│ └── api.js
├── App.vue
├── pack-workshop
│ └── pages
│ │ ├── config
│ │ └── data.js
│ │ └── index.vue
├── components
│ ├── game-content
│ │ ├── config
│ │ │ └── render.js
│ │ ├── styles
│ │ │ └── index.scss
│ │ ├── create-content.vue
│ │ ├── components
│ │ │ └── game-cell.vue
│ │ └── game-content.vue
│ ├── top-bar.vue
│ ├── ar-tabs.vue
│ ├── ar-popup.vue
│ ├── ar-form.vue
│ └── help-info.vue
├── main.js
├── pack-create
│ └── pages
│ │ ├── config
│ │ └── data.js
│ │ ├── utils
│ │ └── check-map.js
│ │ ├── components
│ │ └── map-el
│ │ │ └── map-el.vue
│ │ └── index.vue
├── pages.json
├── store
│ └── index.js
├── pages
│ └── index
│ │ ├── components
│ │ ├── choice-level
│ │ │ └── choice-level.vue
│ │ └── index-top-bar
│ │ │ └── index-top-bar.vue
│ │ └── index.vue
├── uni.scss
└── manifest.json
├── .prettierrc
├── tsconfig.json
├── vue.config.js
├── deploy.sh
├── .gitignore
├── docs
├── map-elements.md
└── Demand.md
├── postcss.config.js
├── README.md
├── commitlint.config.js
├── public
└── index.html
├── babel.config.js
├── package.json
└── LICENSE
/src/pack-user/static/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aring1998/sokoban/HEAD/src/pack-user/static/logo.png
--------------------------------------------------------------------------------
/src/static/styles/var.scss:
--------------------------------------------------------------------------------
1 | $main-color: #5ac725;
2 | $main-span-color: #f7f431;
3 | $light-main-color: #5ac7254d;
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "arrowParens": "avoid",
3 | "printWidth": 160,
4 | "tabWidth": 2,
5 | "singleQuote": true,
6 | "semi": false,
7 | "trailingComma": "none"
8 | }
9 |
--------------------------------------------------------------------------------
/src/static/js/level/README.md:
--------------------------------------------------------------------------------
1 | # 说明
2 | 0: 墙
3 | 1: 空地
4 | 2: 玩家
5 | 3: 箱子
6 | 4: 终点
7 | 5: 地刺
8 | 6: 火
9 | 7: 冰箱子
10 | 8: 毒蘑菇
11 | 9: 弹簧
12 | 10: 传送门入口
13 | 11: 传送门出口
14 | 12: 啤酒
15 | 13: 解药
--------------------------------------------------------------------------------
/src/pack-game/pages/components/game-top-bar/config/player-status-text.js:
--------------------------------------------------------------------------------
1 | export const playerStatusText = {
2 | poisoning: {
3 | name: '中毒',
4 | desc: '误食毒蘑菇,所有按键都变反了!'
5 | },
6 | drunk: {
7 | name: '酗酒',
8 | desc: '喝多意识模糊,会不小心多走一两步!'
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/pack-game/pages/config/data.js:
--------------------------------------------------------------------------------
1 | import store from '@/store/index'
2 | export const formOptions = [
3 | {
4 | label: '地图名',
5 | prop: 'mapName'
6 | },
7 | {
8 | label: '作者',
9 | prop: 'creator',
10 | initValue: store.state.userInfo.username
11 | }
12 | ]
13 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": "./",
4 | "paths": {
5 | "@/*": ["./src/*"]
6 | },
7 | "types": [
8 | "@dcloudio/types",
9 | "miniprogram-api-typings",
10 | "mini-types"
11 | ]
12 | },
13 | "exclude": ["node_modules", "dist"]
14 | }
15 |
--------------------------------------------------------------------------------
/src/utils/music.js:
--------------------------------------------------------------------------------
1 | const bgm = uni.createInnerAudioContext()
2 | bgm.src = 'https://source.aring.cc/assets/project/sokoban/audio/bgm.mp3'
3 | bgm.loop = true
4 |
5 | export const music = {
6 | bgmPlay(isPlay) {
7 | if (!bgm) return
8 | if (isPlay) bgm.play()
9 | else bgm.pause()
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/vue.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | publicPath: './',
3 | transpileDependencies: ['uview-ui'],
4 | chainWebpack: config => {
5 | config.module
6 | .rule('images')
7 | .use('url-loader')
8 | .loader('url-loader')
9 | .tap(options => Object.assign(options, { limit: 999999 }))
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/deploy.sh:
--------------------------------------------------------------------------------
1 | # 执行部署: Bash -> sh deploy.sh
2 |
3 | rm -rf dist &&
4 | yarn build &&
5 | cd dist &&
6 | cd build &&
7 | cd h5 &&
8 | git init &&
9 | git add . &&
10 | git commit -m "webpack" &&
11 | git branch -M master &&
12 | git remote add origin https://gitee.com/aring1998/sokoban-online.git
13 | git push -f -u origin master &&
14 | cd ..
15 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | unpackage/
4 | dist/
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 |
15 | # Editor directories and files
16 | .project
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw*
24 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
15 |
16 |
19 |
--------------------------------------------------------------------------------
/src/utils/index.js:
--------------------------------------------------------------------------------
1 | // 深拷贝对象数组
2 | export const deepCloneObjArr = data => {
3 | const res = data instanceof Array ? [] : {}
4 | for (let item in data) {
5 | res[item] = typeof data[item] === 'object' ? deepCloneObjArr(data[item]) : data[item]
6 | }
7 | return res
8 | }
9 |
10 | // 复制内容到剪切板
11 | export const copyToClipboard = text => navigator.clipboard.writeText(text)
--------------------------------------------------------------------------------
/src/pack-workshop/pages/config/data.js:
--------------------------------------------------------------------------------
1 | export const tabList = [
2 | {
3 | id: 0,
4 | name: '最新'
5 | },
6 | {
7 | id: 1,
8 | name: '热门'
9 | },
10 | {
11 | id: 2,
12 | name: '收藏'
13 | },
14 | {
15 | id: 3,
16 | name: '自创'
17 | },
18 | {
19 | id: 4,
20 | name: '本地'
21 | }
22 | ]
23 |
24 | export const formOptions = [
25 | {
26 | label: '地图名',
27 | prop: 'mapName'
28 | },
29 | {
30 | label: '作者',
31 | prop: 'creator'
32 | }
33 | ]
--------------------------------------------------------------------------------
/src/components/game-content/config/render.js:
--------------------------------------------------------------------------------
1 | export const staticMapRander = {
2 | 0: 'wall',
3 | 4: 'end',
4 | 5: 'spikeweed',
5 | 6: 'fire',
6 | 8: 'toadstool',
7 | 9: 'spring',
8 | 10: 'portal-entry',
9 | 11: 'portal-exit',
10 | 12: 'beer',
11 | 13: 'nectar',
12 | 14: 'slider'
13 | }
14 |
15 | export const acitveMapRander = {
16 | 2: ' player',
17 | 3: ' box',
18 | 7: ' ice-box'
19 | }
20 |
21 | export const direction = {
22 | 0: 'move-up',
23 | 1: 'move-right',
24 | 2: 'move-down',
25 | 3: 'move-left'
26 | }
27 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App'
3 | import store from './store'
4 | Vue.config.productionTip = false
5 |
6 | import uView from 'uview-ui'
7 | Vue.use(uView)
8 |
9 | import 'ant-design-icons/dist/anticons.min.css'
10 |
11 | import { api } from './utils/api'
12 | Vue.prototype.$api = api
13 |
14 | import { music } from './utils/music'
15 | Vue.prototype.$music = music
16 |
17 | import './utils/appback'
18 |
19 | App.mpType = 'app'
20 |
21 | const app = new Vue({
22 | ...App,
23 | store
24 | })
25 | app.$mount()
26 |
--------------------------------------------------------------------------------
/docs/map-elements.md:
--------------------------------------------------------------------------------
1 | # 地图元素设计
2 |
3 | 1. 地刺:(1)人物经过时,扣 1 点生命 **已完成**
4 | 2. 火:(1)人物经过时,扣 1 点生命;(2)当普通箱子触碰时,会损毁 **已完成**
5 | 3. 冰箱子:(1)抵达终点不记入抵达终点箱子数;(2)触碰火焰时,会变为普通箱子,并灭火 **已完成**
6 | 4. 毒蘑菇: (1)触碰时消失:(2)触碰后,整局按键皆为反向 **已完成**
7 | 5. 弹簧: (1)触碰时无视面前第一格障碍物移动到目标方向两格位置;(2)若目标点为障碍物,则不触发 **已完成**
8 | 6. 单向传送门入口: (1)与传送门出口联调;(2)随机前往传送门出口位置 **已完成**
9 | 7. 单向传送门出口: (1)与传送门入口联调;(2)触碰时不会传送 **已完成**
10 | 8. 啤酒:(1)触碰时消失;(2)触碰后,每次移动的步数在3步中随机 **已完成**
11 | 9. 甘露: (1)触碰时消失;(2)触碰后,清除所有人物状态 **已完成**
12 | 10. 滑块: (1)触碰后朝目标方向一直移动,直到撞到障碍物为止;(2)途中碰触的地图元素皆会触发 **已完成**
13 | 11. 双向传送门: (1)触碰后传送到对应颜色的传送门;(2)可重复触碰
14 | *. 守卫: (1)可设定其要求,包括生命值、达标箱子个数;(2)不满足要求时不可通行,并在触碰后提示要求信息;(3)达要求时,触碰后消失
--------------------------------------------------------------------------------
/src/pack-create/pages/config/data.js:
--------------------------------------------------------------------------------
1 | export const advancedFormOptions = [
2 | {
3 | type: 'digit',
4 | label: '人物生命',
5 | prop: 'life'
6 | },
7 | {
8 | type: 'radio',
9 | label: '禁用撤回',
10 | prop: 'regretDisabled',
11 | initValue: 0,
12 | options: [
13 | {
14 | label: '是',
15 | name: 1
16 | },
17 | {
18 | label: '否',
19 | name: 0
20 | }
21 | ]
22 | },
23 | {
24 | type: 'radio',
25 | label: '黑夜模式',
26 | prop: 'nightMode',
27 | initValue: 0,
28 | options: [
29 | {
30 | label: '是',
31 | name: 1
32 | },
33 | {
34 | label: '否',
35 | name: 0
36 | }
37 | ]
38 | }
39 | ]
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path')
2 | module.exports = {
3 | parser: require('postcss-comment'),
4 | plugins: [
5 | require('postcss-import')({
6 | resolve (id, basedir, importOptions) {
7 | if (id.startsWith('~@/')) {
8 | return path.resolve(process.env.UNI_INPUT_DIR, id.substr(3))
9 | } else if (id.startsWith('@/')) {
10 | return path.resolve(process.env.UNI_INPUT_DIR, id.substr(2))
11 | } else if (id.startsWith('/') && !id.startsWith('//')) {
12 | return path.resolve(process.env.UNI_INPUT_DIR, id.substr(1))
13 | }
14 | return id
15 | }
16 | }),
17 | require('autoprefixer')({
18 | remove: process.env.UNI_PLATFORM !== 'h5'
19 | }),
20 | require('@dcloudio/vue-cli-plugin-uni/packages/postcss')
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/src/utils/appback.js:
--------------------------------------------------------------------------------
1 | // 处理hbuilder打包app之后点击手机返回键直接退出app的问题
2 | // #ifndef MP
3 | let first = null
4 | document.addEventListener('plusready', function () {
5 | const webview = plus.webview.currentWebview()
6 | plus.key.addEventListener('backbutton', function () {
7 | // 获取当前路由
8 | const routes = getCurrentPages()
9 | const currentPath = routes[routes.length - 1].route
10 | if (currentPath === '/' || currentPath === 'pages/index/index') {
11 | // 首页返回键处理,1秒内,连续两次按返回键,则退出应用
12 | if (!first) {
13 | first = new Date().getTime()
14 | uni.showToast({ title: '😫再按一次退出游戏', icon: 'none' })
15 | setTimeout(function () {
16 | first = null
17 | }, 1000)
18 | } else {
19 | if (new Date().getTime() - first < 1500) {
20 | plus.runtime.quit()
21 | }
22 | }
23 | } else webview.back()
24 | })
25 | })
26 | // #endif
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 🎃魔改推箱子
2 |
3 | ## [在线试玩 (PC端请切换手机调试模式)](https://aring.cc/sokoban)
4 |
5 | ## 📖介绍
6 | 基于**uni-app**框架开发的三端(H5, APP, 小程序)通配应用,由推箱子的游戏玩法拓展
7 | * 带来RPG式体验的生命系统
8 | * 更多独具匠心的地图元素
9 | * 允许玩家天马行空的创意工坊
10 | ```
11 | 如您觉得该项目有趣,烦请右上角"Star"一下,感激不尽!
12 | ```
13 |
14 | ## 🔨应用框架
15 | 1. uni-app
16 | 2. uView
17 |
18 | ## 📦常用操作
19 | 1. 安装依赖 `yarn install`
20 | 2. 运行项目至浏览器 `yarn dev`
21 | 3. 运行项目至微信开发者工具 `yarn dev-wx`
22 | 4. 打包项目 `yarn build`
23 |
24 | ## 🧨注意事项
25 | 1. 需求概述可查阅[Demand](/docs/Demand.md)
26 | 2. git提交日志请务必遵守[commitlint.config](/commitlint.config.js)内约定
27 | 3. 了解接口及服务请访问[后台仓库](https://gitee.com/funzeros/box-man)
28 | 4. 目前master分支为uni的开发版本,Vue2版本请切换至[version-vue2分支](https://gitee.com/aring1998/sokoban/tree/version-vue2/)
29 |
30 | ## ✨游戏版本
31 | - [在线试玩Uni版本 (PC端请切换手机调试模式)](https://aring.cc/sokoban)
32 |
33 | - [点击下载Uni版本 (APP)](https://source.aring.cc/assets/sokoban.apk)
34 |
35 | - [游戏已上架!点击了解详情](https://www.taptap.com/app/224432/)
36 |
--------------------------------------------------------------------------------
/src/components/game-content/styles/index.scss:
--------------------------------------------------------------------------------
1 | .game-container {
2 | text-align: center;
3 | margin: 0 auto;
4 | overflow: auto;
5 | max-height: 734rpx;
6 | max-width: 734rpx;
7 | white-space: nowrap;
8 | &::-webkit-scrollbar {
9 | width: 0 !important;
10 | }
11 | .game-table {
12 | position: relative;
13 | background-size: 60rpx 60rpx;
14 | background-repeat: repeat;
15 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/floor.png');
16 | display: inline-block;
17 | text-align: center;
18 | border: 4rpx #e8eaeda6 solid;
19 | .game-row {
20 | display: flex;
21 | .game-cell {
22 | height: 60rpx;
23 | width: 60rpx;
24 | background-size: 100% 100%;
25 | background-repeat: no-repeat;
26 | }
27 | }
28 | .night {
29 | position: absolute;
30 | height: 100%;
31 | width: 100%;
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/commitlint.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * git提交规范:
3 | *
4 | * build:主要目的是修改项目构建系统(例如 glup,webpack,rollup 的配置等)的提交
5 | * ci:主要目的是修改项目继续集成流程(例如 Travis,Jenkins,GitLab CI,Circle等)的提交
6 | * docs:文档更新
7 | * feat:新增功能
8 | * fix:bug 修复
9 | * perf:性能优化
10 | * refactor:重构代码(既没有新增功能,也没有修复 bug)
11 | * style:不影响程序逻辑的代码修改(修改空白字符,补全缺失的分号等)
12 | * test:新增测试用例或是更新现有测试
13 | * revert:回滚某个更早之前的提交
14 | * chore:不属于以上类型的其他类型
15 | * wip:移除文件或者代码
16 | */
17 |
18 | module.exports = {
19 | extends: ['@commitlint/config-conventional'],
20 | rules: {
21 | 'type-enum': [
22 | 2,
23 | 'always',
24 | [
25 | 'init',
26 | 'build',
27 | 'ci',
28 | 'docs',
29 | 'fix',
30 | 'perf',
31 | 'feat',
32 | 'style',
33 | 'refactor',
34 | 'test',
35 | 'revert',
36 | 'chore',
37 | 'wip'
38 | ]
39 | ],
40 | 'subject-full-stop': [0, 'never'],
41 | 'subject-case': [0, 'never']
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/pack-create/pages/utils/check-map.js:
--------------------------------------------------------------------------------
1 | export const checkMap = (gameMap, form) => {
2 | let player = 0, box = 0,end = 0, portalEntry = 0, portalExit = 0
3 | const attackEvent = () => {
4 | if (form.life < 1) {
5 | return '有攻击性元素时,人物生命值不得为零!'
6 | }
7 | }
8 | const event = {
9 | 2: () => {
10 | player++
11 | if (player > 1) return '人物不能超过一个'
12 | },
13 | 3: () => { box++ },
14 | 7: () => { box++ },
15 | 4: () => { end++ },
16 | 5: () => attackEvent(),
17 | 6: () => attackEvent(),
18 | 10: () => { portalEntry++ },
19 | 11: () => { portalExit++ }
20 | }
21 |
22 | for (let y in gameMap) {
23 | for (let x in gameMap[y]) {
24 | if (event[gameMap[y][x]]) {
25 | const flag = event[gameMap[y][x]]()
26 | if (flag) return flag
27 | }
28 | }
29 | }
30 | if (!player) return '不能没有人物!'
31 | if (end < box) return '终点数量不应小于箱子数量!'
32 | if ((portalEntry > 0 && portalExit === 0) || (portalEntry === 0 && portalExit > 0)) {
33 | return '传送门入口和传送门出口必须同时存在!'
34 | }
35 | }
--------------------------------------------------------------------------------
/src/components/game-content/create-content.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
13 |
14 |
15 |
16 |
17 |
18 |
34 |
35 |
38 |
--------------------------------------------------------------------------------
/src/pages.json:
--------------------------------------------------------------------------------
1 | {
2 | "easycom": {
3 | "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
4 | },
5 | "pages": [
6 | {
7 | "path": "pages/index/index"
8 | }
9 | ],
10 | "subpackages": [
11 | {
12 | "root": "pack-game",
13 | "pages": [
14 | {
15 | "path": "pages/index"
16 | }
17 | ],
18 | "independent": false
19 | },
20 | {
21 | "root": "pack-create",
22 | "pages": [
23 | {
24 | "path": "pages/index"
25 | }
26 | ],
27 | "independent": false
28 | },
29 | {
30 | "root": "pack-workshop",
31 | "pages": [
32 | {
33 | "path": "pages/index"
34 | }
35 | ],
36 | "independent": false
37 | },
38 | {
39 | "root": "pack-user",
40 | "pages": [
41 | {
42 | "path": "pages/index"
43 | }
44 | ],
45 | "independent": false
46 | }
47 | ],
48 | "globalStyle": {
49 | "app-plus": {
50 | "titleNView": false,
51 | "navigationBarTitleText": "魔改推箱子"
52 | },
53 | "backgroundColor": "#F8F8F8"
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/static/styles/index.scss:
--------------------------------------------------------------------------------
1 | @import './theme.scss';
2 |
3 | html {
4 | color: #333;
5 | }
6 |
7 | :not(not) {
8 | margin: 0;
9 | padding: 0;
10 | box-sizing: border-box;
11 | background-repeat: no-repeat;
12 | background-size: 100% 100%;
13 | font-family: 'Segoe WPC,Segoe UI,Microsoft YaHei,sans-serif';
14 | }
15 |
16 | .common-btn {
17 | height: 80rpx;
18 | padding: 10rpx;
19 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/common/common-btn.png');
20 | display: flex;
21 | align-items: center;
22 | font-weight: bold;
23 | font-size: 48rpx;
24 | img {
25 | height: 50rpx;
26 | margin-right: 8rpx;
27 | }
28 | }
29 |
30 | .common-bottom-form {
31 | border-top: 4rpx #e8eaed solid;
32 | padding-top: 40rpx;
33 | display: flex;
34 | justify-content: space-around;
35 | .common-bottom-form-item {
36 | display: flex;
37 | flex-flow: column nowrap;
38 | i {
39 | margin-bottom: 4rpx;
40 | font-size: 50rpx;
41 | }
42 | span {
43 | font-size: 32rpx;
44 | }
45 | }
46 | }
47 |
48 | .u-icon__icon {
49 | span {
50 | font-family: uicon-iconfont !important;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | Vue.use(Vuex)
4 | import { api } from '@/utils/api'
5 |
6 | const store = new Vuex.Store({
7 | state: {
8 | userInfo: {
9 | id: '',
10 | name: '',
11 | email: '',
12 | coin: '',
13 | nickname: ''
14 | },
15 | token: uni.getStorageSync('token'),
16 | bgmPlay: JSON.parse(uni.getStorageSync('bgmPlay') || true)
17 | },
18 | mutations: {
19 | setUserInfo(_, res) {
20 | if (res.code === 0) {
21 | this.state.userInfo = res.data
22 | uni.showToast({ title: `欢迎回来,${res.data.username}` })
23 | } else uni.removeStorageSync('token')
24 | }
25 | },
26 | getters: {
27 | checkLogin(state) {
28 | if (!state.userInfo.username) {
29 | uni.showToast({ title: '您需要先登录', icon: 'none' })
30 | return false
31 | }
32 | return true
33 | }
34 | },
35 | actions: {
36 | async token() {
37 | const res = await api.post('user/token')
38 | if (res.code === 0) {
39 | this.commit('setUserInfo', res)
40 | } else {
41 | uni.removeStorageSync('token')
42 | for (let key in store.state.userInfo) {
43 | store.state.userInfo[key] = ''
44 | }
45 | }
46 | }
47 | },
48 | mudules: {}
49 | })
50 |
51 | export default store
52 |
--------------------------------------------------------------------------------
/src/components/top-bar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{ title }}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
29 |
30 |
55 |
--------------------------------------------------------------------------------
/src/pack-create/pages/components/map-el/map-el.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{ item.name }}
6 |
7 |
8 |
9 |
10 |
27 |
28 |
56 |
--------------------------------------------------------------------------------
/src/components/ar-tabs.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 | {{ item.name }}
12 |
13 |
14 |
15 |
16 |
17 |
39 |
40 |
65 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <%= htmlWebpackPlugin.options.title %>
7 |
18 |
27 |
28 |
29 |
30 |
31 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | const plugins = []
2 |
3 | if (process.env.UNI_OPT_TREESHAKINGNG) {
4 | plugins.push(require('@dcloudio/vue-cli-plugin-uni-optimize/packages/babel-plugin-uni-api/index.js'))
5 | }
6 |
7 | if (
8 | (
9 | process.env.UNI_PLATFORM === 'app-plus' &&
10 | process.env.UNI_USING_V8
11 | ) ||
12 | (
13 | process.env.UNI_PLATFORM === 'h5' &&
14 | process.env.UNI_H5_BROWSER === 'builtin'
15 | )
16 | ) {
17 | const path = require('path')
18 |
19 | const isWin = /^win/.test(process.platform)
20 |
21 | const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path)
22 |
23 | const input = normalizePath(process.env.UNI_INPUT_DIR)
24 | try {
25 | plugins.push([
26 | require('@dcloudio/vue-cli-plugin-hbuilderx/packages/babel-plugin-console'),
27 | {
28 | file (file) {
29 | file = normalizePath(file)
30 | if (file.indexOf(input) === 0) {
31 | return path.relative(input, file)
32 | }
33 | return false
34 | }
35 | }
36 | ])
37 | } catch (e) {}
38 | }
39 |
40 | process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui']
41 | process.UNI_LIBRARIES.forEach(libraryName => {
42 | plugins.push([
43 | 'import',
44 | {
45 | 'libraryName': libraryName,
46 | 'customName': (name) => {
47 | return `${libraryName}/lib/${name}/${name}`
48 | }
49 | }
50 | ])
51 | })
52 | module.exports = {
53 | presets: [
54 | [
55 | '@vue/app',
56 | {
57 | modules: 'commonjs',
58 | useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry'
59 | }
60 | ]
61 | ],
62 | plugins
63 | }
64 |
--------------------------------------------------------------------------------
/docs/Demand.md:
--------------------------------------------------------------------------------
1 | # 需求概述
2 |
3 | ## All
4 | 1. 切换主题 **已完成**
5 | 2. *用户登录 **已完成**
6 | 3. *开发后台管理项目,审核上传的地图数据,操纵玩家数据等
7 | 4. 菜单功能(返回主菜单,选关) **已完成**
8 | 5. 官方关卡中新元素应有对应的教学关卡
9 | 6. 金币功能,每日登录,创建地图奖励
10 | 7. 切关Loading组件
11 | 8. 关卡控制,未通过关卡不能进入下一关
12 | 9. 上传地图功能需登录 **已完成**
13 | 10. 同一单元格有多个元素时展示对应多个元素
14 |
15 | ## Index.vue
16 | 1. 首页添加说明(游戏规则,地图元素手册,关于项目) **已完成**
17 |
18 | ## Game.vue
19 | 1. 添加地刺、火等地图元素, 详见[地图元素设计](./MapElements.md)
20 | 2. 人物生命值 **已完成**
21 | 3. 地图重置 **已完成**
22 | 4. 撤回一步功能 **已完成**
23 | 5. *跟踪视角功能(拓展大图制作) **已完成**
24 | 6. 虚拟手柄长按时,间隔一秒再次触发点击事件 **已完成**
25 | 7. 测试地图记录通关操作,传数组(数字0123代表上下左右) **已完成**
26 | 8. 游戏页面增加提示功能 **已完成**
27 | 9. 游戏页面过关提交步数,若高于最优步数,则提交至服务器 **已完成**
28 | 10. 新增状态栏,显示人物当前状态(如中毒) **已完成**
29 | 11. 新增跳关功能
30 | 12. 人物移动动画 **已完成**
31 | 13. 记录过关时间
32 | 14. *黑夜模式,玩家有可见区域,可见区域外全为黑 **已完成**
33 | 15. *重构GameContent.vue,阻止每次更新数据导致所有单元格触发randerClass **已完成**
34 |
35 | ## Create.vue
36 | 1. 创建地图高级选项,包括:设定人物生命值;设定地图大小 **已完成**
37 | 2. 添加地图数据存储本地功能 **已完成**
38 | 3. 新增高级状态,100起头,例:100: 人物在终点上
39 | 4. 本地地图上传云端功能 **已完成**
40 | 5. 新增暂存地图功能,后续可打开继续编辑
41 |
42 | ## Workshop.vue
43 | 1. 创意工坊缩略图(以2px渲染地图数据)**已完成**
44 | 2. 创意工坊列表分页 **已完成**
45 | 3. 创意工坊搜索功能 **已完成**
46 | 4. 新增分享、点赞,收藏功能 **已完成**
47 | 5. 创意工坊做tab分页,排序(最新,最热门,我的收藏,本地地图) **已完成**
48 | 6. 创意工坊列表记录最优步数 **已完成**
49 | 7. 新增本地地图列表 **已完成**
50 | 8. 本地地图删除功能 **已完成**
51 |
52 | ## Back-End
53 | 1. 创意工坊列表新增点赞数量字段 **已完成**
54 | 2. 创意工坊列表排序 **已完成**
55 | 3. *用户登录 **已完成**
56 | 4. 地图数据新增生命值字段,最优步数,提示解法(数字0123代表上下左右) **已完成**
57 | 5. 修改密码功能 **已完成**
58 | 6. 用户表新增用户昵称、金币、邮箱、是否禁用字段 **已完成**
59 | 7. 修改昵称功能 **已完成**
60 | 8. 版本检测功能 **已完成**
61 | 9. 删除地图功能指定token,仅指定token可调用 **已完成**
62 | 10. 增加/减少金币接口 **已完成**
63 | 11. 创意工坊列表新增我创建的地图选项
64 | 12. 创意工坊列表新增当日最热门、本周最热门、本月最热门排序
65 | 13. 新增忘记密码功能
66 | 14. 地图表新增作者id字段 **已完成**
--------------------------------------------------------------------------------
/src/utils/api.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 | import axiosAdapterUniapp from 'axios-adapter-uniapp'
3 | import store from '../store'
4 | // 创建axios实例
5 | const instance = axios.create({
6 | // baseURL: 'http://localhost:3006/api',
7 | baseURL: 'https://api.aring.cc/sokoban/api',
8 | timeout: 30000,
9 | // 允许返回所有状态码,不会遇到错误就停止
10 | validateStatus: status => status >= 200 && status <= 600,
11 | adapter: axiosAdapterUniapp
12 | })
13 |
14 | // 请求拦截
15 | instance.interceptors.request.use(config => {
16 | uni.showLoading({ title: '加载中...' })
17 | config.headers.token = store.state.token
18 | return config
19 | }),
20 | err => {
21 | console.log(err)
22 | }
23 | // 响应拦截
24 | instance.interceptors.response.use(res => {
25 | uni.hideLoading()
26 | if (res.status < 200 || res.status > 400) return uni.showToast({ title: '网络请求错误', icon: 'none' })
27 | if (res.data.code !== 0) uni.showToast({ title: res.data.message || '网络请求错误', icon: 'none' })
28 | return res.data // 配置只返回data
29 | }),
30 | err => {
31 | console.log(err)
32 | }
33 |
34 | // 封装get/post方法
35 | export const api = {
36 | async get(url, params) {
37 | try {
38 | const res = await instance.get(url, { params })
39 | return new Promise(resolve => {
40 | resolve(res)
41 | })
42 | } catch (err) {
43 | uni.showToast({ title: '网络请求错误', icon: 'none' })
44 | console.log(err)
45 | }
46 | },
47 | async post(url, data) {
48 | try {
49 | const res = await instance.post(url, data)
50 | return new Promise(resolve => {
51 | resolve(res)
52 | })
53 | } catch (err) {
54 | uni.showToast({ title: '网络请求错误', icon: 'none' })
55 | console.log(err)
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/pages/index/components/choice-level/choice-level.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{ index + 1 }}
7 |
8 |
9 |
10 |
11 |
12 |
47 |
48 |
72 |
--------------------------------------------------------------------------------
/src/pages/index/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 魔改推箱子
5 |
6 | 开始游戏
7 | 创意工坊
8 | 创建地图
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
31 |
32 |
64 |
--------------------------------------------------------------------------------
/src/uni.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * 这里是uni-app内置的常用样式变量
3 | *
4 | * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
5 | * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
6 | *
7 | */
8 |
9 | /**
10 | * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
11 | *
12 | * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
13 | */
14 |
15 | /* 颜色变量 */
16 | @import 'uview-ui/theme.scss';
17 | @import './static/styles/var.scss';
18 |
19 | /* 行为相关颜色 */
20 | $uni-color-primary: #007aff;
21 | $uni-color-success: #4cd964;
22 | $uni-color-warning: #f0ad4e;
23 | $uni-color-error: #dd524d;
24 |
25 | /* 文字基本颜色 */
26 | $uni-text-color:#333;//基本色
27 | $uni-text-color-inverse:#fff;//反色
28 | $uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
29 | $uni-text-color-placeholder: #808080;
30 | $uni-text-color-disable:#c0c0c0;
31 |
32 | /* 背景颜色 */
33 | $uni-bg-color:#ffffff;
34 | $uni-bg-color-grey:#f8f8f8;
35 | $uni-bg-color-hover:#f1f1f1;//点击状态颜色
36 | $uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
37 |
38 | /* 边框颜色 */
39 | $uni-border-color:#c8c7cc;
40 |
41 | /* 尺寸变量 */
42 |
43 | /* 文字尺寸 */
44 | $uni-font-size-sm:24rpx;
45 | $uni-font-size-base:28rpx;
46 | $uni-font-size-lg:32rpx;
47 |
48 | /* 图片尺寸 */
49 | $uni-img-size-sm:40rpx;
50 | $uni-img-size-base:52rpx;
51 | $uni-img-size-lg:80rpx;
52 |
53 | /* Border Radius */
54 | $uni-border-radius-sm: 4rpx;
55 | $uni-border-radius-base: 6rpx;
56 | $uni-border-radius-lg: 12rpx;
57 | $uni-border-radius-circle: 50%;
58 |
59 | /* 水平间距 */
60 | $uni-spacing-row-sm: 10px;
61 | $uni-spacing-row-base: 20rpx;
62 | $uni-spacing-row-lg: 30rpx;
63 |
64 | /* 垂直间距 */
65 | $uni-spacing-col-sm: 8rpx;
66 | $uni-spacing-col-base: 16rpx;
67 | $uni-spacing-col-lg: 24rpx;
68 |
69 | /* 透明度 */
70 | $uni-opacity-disabled: 0.3; // 组件禁用态的透明度
71 |
72 | /* 文章场景相关 */
73 | $uni-color-title: #2C405A; // 文章标题颜色
74 | $uni-font-size-title:40rpx;
75 | $uni-color-subtitle: #555555; // 二级标题颜色
76 | $uni-font-size-subtitle:36rpx;
77 | $uni-color-paragraph: #3F536E; // 文章段落颜色
78 | $uni-font-size-paragraph:30rpx;
--------------------------------------------------------------------------------
/src/pack-game/pages/components/analog-handle/analog-handle.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
46 |
47 |
80 |
--------------------------------------------------------------------------------
/src/static/js/map-el/index.js:
--------------------------------------------------------------------------------
1 | // 地图元素
2 | export const mapEl = [
3 | {
4 | name: '墙',
5 | value: 0,
6 | class: 'wall',
7 | intro: ['顾名思义,此路不通']
8 | },
9 | {
10 | name: '空地',
11 | value: 1,
12 | class: 'floor',
13 | intro: ['您脚下的大地母亲']
14 | },
15 | {
16 | name: '人物',
17 | value: 2,
18 | class: 'player',
19 | intro: ['您', '可通过虚拟手柄操纵移动']
20 | },
21 | {
22 | name: '箱子',
23 | value: 3,
24 | class: 'box',
25 | intro: ['碰撞后会朝对应碰撞方向移动', '全部推入终点即可获得胜利']
26 | },
27 | {
28 | name: '终点',
29 | value: 4,
30 | class: 'end',
31 | intro: ['所有箱子的目标点', '填满后即可获得胜利']
32 | },
33 | {
34 | name: '地刺',
35 | value: 5,
36 | class: 'spikeweed',
37 | intro: ['人物经过时,扣1点生命']
38 | },
39 | {
40 | name: '火',
41 | value: 6,
42 | class: 'fire',
43 | intro: ['人物经过时,扣1点生命', '当普通箱子触碰时,会损毁']
44 | },
45 | {
46 | name: '冰箱子',
47 | value: 7,
48 | class: 'ice-box',
49 | intro: ['抵达终点不记入抵达终点箱子数', '触碰火焰时,会变为普通箱子,并灭火']
50 | },
51 | {
52 | name: '毒蘑菇',
53 | value: 8,
54 | class: 'toadstool',
55 | intro: ['触碰时消失', '触碰后,进入中毒状态', '中毒状态下,移动按键为反向']
56 | },
57 | {
58 | name: '弹簧',
59 | value: 9,
60 | class: 'spring',
61 | intro: ['触碰时无视面前第一格障碍物移动到目标方向两格位置', '若目标点为障碍物,则不触发']
62 | },
63 | {
64 | name: '传送门入口',
65 | value: 10,
66 | class: 'portal-entry',
67 | intro: ['与单向传送门出口联调', '触碰后随机前往传送门出口位置']
68 | },
69 | {
70 | name: '传送门出口',
71 | value: 11,
72 | class: 'portal-exit',
73 | intro: ['与单向传送门入口联调', '触碰时不会传送']
74 | },
75 | {
76 | name: '啤酒',
77 | value: 12,
78 | class: 'beer',
79 | intro: ['触碰时消失', '触碰后,进入醉酒状态', '醉酒状态下,每次移动随机移动1~3步']
80 | },
81 | {
82 | name: '解药',
83 | value: 13,
84 | class: 'nectar',
85 | intro: ['触碰时消失', '触碰后,清除所有异常状态']
86 | },
87 | {
88 | name: '滑块',
89 | value: 14,
90 | class: 'slider',
91 | intro: ['触碰后朝移动方向一直移动,直到撞到障碍物为止', '途中碰触的地图元素皆会触发']
92 | }
93 | ]
94 |
95 | export const mapElClass = (value) => {
96 | for (let i of mapEl) {
97 | if (i.value === value) return i.class
98 | }
99 | }
--------------------------------------------------------------------------------
/src/pack-game/pages/components/game-result/game-result.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 你赢了
4 |
5 |
6 |
7 | 首页
8 |
9 |
10 |
11 | 重玩
12 |
13 |
14 |
15 | 下一关
16 |
17 |
18 |
19 | 返回
20 |
21 |
22 |
23 | 上传云端
24 |
25 |
26 |
27 | 保存本地
28 |
29 |
30 |
31 |
32 |
33 |
58 |
59 |
74 |
--------------------------------------------------------------------------------
/src/components/game-content/components/game-cell.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
40 |
41 |
--------------------------------------------------------------------------------
/src/components/game-content/game-content.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
13 |
14 |
15 |
16 |
17 |
18 |
74 |
75 |
78 |
--------------------------------------------------------------------------------
/src/pack-game/pages/components/game-menu/game-menu.vue:
--------------------------------------------------------------------------------
1 |
2 |
29 |
30 |
31 |
64 |
65 |
82 |
--------------------------------------------------------------------------------
/src/static/styles/theme.scss:
--------------------------------------------------------------------------------
1 | .game-container .game-table {
2 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/floor.png');
3 | }
4 |
5 | page {
6 | .floor {
7 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/floor.png');
8 | }
9 | .spikeweed {
10 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/spikeweed.png');
11 | }
12 | .wall {
13 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/wall.png');
14 | }
15 | .end {
16 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/end.png');
17 | }
18 | .fire {
19 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/fire.png');
20 | }
21 | .toadstool {
22 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/toadstool.png');
23 | }
24 | .spring {
25 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/spring.png');
26 | }
27 | .portal-entry {
28 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/portal-entry.png');
29 | }
30 | .portal-exit {
31 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/portal-exit.png');
32 | }
33 | .beer {
34 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/beer.png');
35 | }
36 | .nectar {
37 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/nectar.png');
38 | }
39 | .slider {
40 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/slider.png');
41 | }
42 | .player {
43 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/player.png');
44 | }
45 | .box {
46 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/box.png');
47 | }
48 | .ice-box {
49 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/ice-box.png');
50 | }
51 | .box.end {
52 | background-image: url('https://source.aring.cc/assets/project/sokoban/imgs/game-content/forest/end-box.png');
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "魔改推箱子",
3 | "appid": "__UNI__23AD07D",
4 | "description": "",
5 | "versionName": "1.0.0",
6 | "versionCode": "100",
7 | "transformPx": false,
8 | "app-plus": {
9 | "usingComponents": true,
10 | "splashscreen": {
11 | "alwaysShowBeforeRender": true,
12 | "waiting": true,
13 | "autoclose": true,
14 | "delay": 0
15 | },
16 | "modules": {},
17 | "distribute": {
18 | "android": {
19 | "permissions": []
20 | },
21 | "ios": {},
22 | "sdkConfigs": {
23 | "ad": {}
24 | },
25 | "icons": {
26 | "android": {
27 | "hdpi": "unpackage/res/icons/72x72.png",
28 | "xhdpi": "unpackage/res/icons/96x96.png",
29 | "xxhdpi": "unpackage/res/icons/144x144.png",
30 | "xxxhdpi": "unpackage/res/icons/192x192.png"
31 | },
32 | "ios": {
33 | "appstore": "unpackage/res/icons/1024x1024.png",
34 | "ipad": {
35 | "app": "unpackage/res/icons/76x76.png",
36 | "app@2x": "unpackage/res/icons/152x152.png",
37 | "notification": "unpackage/res/icons/20x20.png",
38 | "notification@2x": "unpackage/res/icons/40x40.png",
39 | "proapp@2x": "unpackage/res/icons/167x167.png",
40 | "settings": "unpackage/res/icons/29x29.png",
41 | "settings@2x": "unpackage/res/icons/58x58.png",
42 | "spotlight": "unpackage/res/icons/40x40.png",
43 | "spotlight@2x": "unpackage/res/icons/80x80.png"
44 | },
45 | "iphone": {
46 | "app@2x": "unpackage/res/icons/120x120.png",
47 | "app@3x": "unpackage/res/icons/180x180.png",
48 | "notification@2x": "unpackage/res/icons/40x40.png",
49 | "notification@3x": "unpackage/res/icons/60x60.png",
50 | "settings@2x": "unpackage/res/icons/58x58.png",
51 | "settings@3x": "unpackage/res/icons/87x87.png",
52 | "spotlight@2x": "unpackage/res/icons/80x80.png",
53 | "spotlight@3x": "unpackage/res/icons/120x120.png"
54 | }
55 | }
56 | }
57 | }
58 | },
59 | "quickapp": {},
60 | "mp-weixin": {
61 | "appid": "wx4218d5a9414eb0b2",
62 | "setting": {
63 | "urlCheck": false
64 | },
65 | "usingComponents": true
66 | },
67 | "mp-alipay": {
68 | "usingComponents": true
69 | },
70 | "mp-baidu": {
71 | "usingComponents": true
72 | },
73 | "mp-toutiao": {
74 | "usingComponents": true
75 | },
76 | "mp-qq": {
77 | "usingComponents": true
78 | },
79 | "h5": {
80 | "router": {
81 | "base": "./",
82 | "mode": "hash"
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/src/components/ar-popup.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
13 |
45 |
46 |
116 |
--------------------------------------------------------------------------------
/src/pages/index/components/index-top-bar/index-top-bar.vue:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 |
26 |
52 |
53 |
102 |
--------------------------------------------------------------------------------
/src/components/ar-form.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{ okText }}
31 |
32 |
33 |
34 |
35 |
74 |
75 |
120 |
--------------------------------------------------------------------------------
/src/components/help-info.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | (currentTab = item.id)">
4 |
5 |
6 | 通过虚拟手柄
控制人物移动,将所有箱子
7 |
8 | 推入终点
9 |
10 | 即可获得胜利!
11 |
12 | ● 请留意您无法同时推动两个箱子
14 |
16 | ● 务必小心地图中各种各样的陷阱
18 |
19 | 它们将夺走您的生命
21 |
22 | ● 如果您想了解更多地图元素
23 |
24 | 的作用,请点击上方
25 |
地图手册
28 |
29 |
30 |
31 |
32 |
33 | {{ item.name }}:
34 | {{ index + 1 }}){{ item }};
35 |
36 |
37 |
38 | 作者邮箱: 1303340995@qq.com
39 |
40 |
41 | 这是作者在学习前端一年后创建的第一个开源项目,目前项目仍在优化推进阶段,真挚地恳请您提出宝贵意见。
42 | 项目开源,欢迎开发者参考学习,并且无比期盼您的参与,项目地址如下:
43 | gitee.com/aring1998/sokoban
44 | 同时也欢迎您前来为我们点一个star
45 | 开发过程十分感谢以下小伙伴(按首字母排序):
46 | dzz, funzeros, lyl, wangz, yuanyuanna
47 |
48 | 祝您游戏愉快!
49 |
50 | aring
51 |
52 |
53 |
54 |
55 |
86 |
87 |
111 |
--------------------------------------------------------------------------------
/src/pack-create/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | 提示
36 | 使用该功能建议您先登录,是否前往登录?
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
152 |
153 |
176 |
--------------------------------------------------------------------------------
/src/pack-game/pages/components/game-top-bar/game-top-bar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 步数
7 | {{ step }}
8 |
9 |
10 |
11 | 生命
12 | {{ life }}
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | {{ gameMap.mapName || '(未命名)' }}
28 |
29 |
30 |
31 | {{ gameMap.stepsPas || '**' }}
32 |
33 |
34 | {{ item.name }}
35 |
36 |
37 |
38 |
39 |
116 |
117 |
217 |
--------------------------------------------------------------------------------
/src/pack-user/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 魔改推箱子
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | 注册
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | 登录
49 |
50 |
51 |
52 |
53 |
54 |
131 |
132 |
210 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sokoban",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "npm run dev:h5",
7 | "dev-wx": "npm run dev:mp-weixin",
8 | "build": "npm run build:h5",
9 | "build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
10 | "build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
11 | "build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
12 | "build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
13 | "build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
14 | "build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
15 | "build:mp-kuaishou": "cross-env NODE_ENV=production UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build",
16 | "build:mp-lark": "cross-env NODE_ENV=production UNI_PLATFORM=mp-lark vue-cli-service uni-build",
17 | "build:mp-qq": "cross-env NODE_ENV=production UNI_PLATFORM=mp-qq vue-cli-service uni-build",
18 | "build:mp-toutiao": "cross-env NODE_ENV=production UNI_PLATFORM=mp-toutiao vue-cli-service uni-build",
19 | "build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
20 | "build:quickapp-native": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-native vue-cli-service uni-build",
21 | "build:quickapp-webview": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview vue-cli-service uni-build",
22 | "build:quickapp-webview-huawei": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build",
23 | "build:quickapp-webview-union": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build",
24 | "dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
25 | "dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
26 | "dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
27 | "dev:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch",
28 | "dev:mp-alipay": "cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch",
29 | "dev:mp-baidu": "cross-env NODE_ENV=development UNI_PLATFORM=mp-baidu vue-cli-service uni-build --watch",
30 | "dev:mp-kuaishou": "cross-env NODE_ENV=development UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build --watch",
31 | "dev:mp-lark": "cross-env NODE_ENV=development UNI_PLATFORM=mp-lark vue-cli-service uni-build --watch",
32 | "dev:mp-qq": "cross-env NODE_ENV=development UNI_PLATFORM=mp-qq vue-cli-service uni-build --watch",
33 | "dev:mp-toutiao": "cross-env NODE_ENV=development UNI_PLATFORM=mp-toutiao vue-cli-service uni-build --watch",
34 | "dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch --minimize",
35 | "dev:quickapp-native": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-native vue-cli-service uni-build --watch",
36 | "dev:quickapp-webview": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview vue-cli-service uni-build --watch",
37 | "dev:quickapp-webview-huawei": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build --watch",
38 | "dev:quickapp-webview-union": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build --watch",
39 | "info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js",
40 | "serve:quickapp-native": "node node_modules/@dcloudio/uni-quickapp-native/bin/serve.js",
41 | "test:android": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=android jest -i",
42 | "test:h5": "cross-env UNI_PLATFORM=h5 jest -i",
43 | "test:ios": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=ios jest -i",
44 | "test:mp-baidu": "cross-env UNI_PLATFORM=mp-baidu jest -i",
45 | "test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i"
46 | },
47 | "dependencies": {
48 | "@dcloudio/uni-app-plus": "^2.0.1-32920211122003",
49 | "@dcloudio/uni-h5": "^2.0.1-32920211122003",
50 | "@dcloudio/uni-helper-json": "*",
51 | "@dcloudio/uni-i18n": "^2.0.1-32920211122003",
52 | "@dcloudio/uni-mp-360": "^2.0.1-32920211122003",
53 | "@dcloudio/uni-mp-alipay": "^2.0.1-32920211122003",
54 | "@dcloudio/uni-mp-baidu": "^2.0.1-32920211122003",
55 | "@dcloudio/uni-mp-kuaishou": "^2.0.1-32920211122003",
56 | "@dcloudio/uni-mp-lark": "^2.0.1-32920211122003",
57 | "@dcloudio/uni-mp-qq": "^2.0.1-32920211122003",
58 | "@dcloudio/uni-mp-toutiao": "^2.0.1-32920211122003",
59 | "@dcloudio/uni-mp-vue": "^2.0.1-32920211122003",
60 | "@dcloudio/uni-mp-weixin": "^2.0.1-32920211122003",
61 | "@dcloudio/uni-quickapp-native": "^2.0.1-32920211122003",
62 | "@dcloudio/uni-quickapp-webview": "^2.0.1-32920211122003",
63 | "@dcloudio/uni-stat": "^2.0.1-32920211122003",
64 | "@vue/shared": "^3.0.0",
65 | "ant-design-icons": "^1.3.3",
66 | "axios": "^0.24.0",
67 | "axios-adapter-uniapp": "^0.1.3",
68 | "core-js": "^3.6.5",
69 | "flyio": "^0.6.2",
70 | "md5": "^2.3.0",
71 | "regenerator-runtime": "^0.12.1",
72 | "uview-ui": "^2.0.14",
73 | "vue": "^2.6.11",
74 | "vuex": "^3.2.0"
75 | },
76 | "devDependencies": {
77 | "@babel/runtime": "~7.12.0",
78 | "@dcloudio/types": "*",
79 | "@dcloudio/uni-automator": "^2.0.1-32920211122003",
80 | "@dcloudio/uni-cli-i18n": "^2.0.1-32920211122003",
81 | "@dcloudio/uni-cli-shared": "^2.0.1-32920211122003",
82 | "@dcloudio/uni-migration": "^2.0.1-32920211122003",
83 | "@dcloudio/uni-template-compiler": "^2.0.1-32920211122003",
84 | "@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.1-32920211122003",
85 | "@dcloudio/vue-cli-plugin-uni": "^2.0.1-32920211122003",
86 | "@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.1-32920211122003",
87 | "@dcloudio/webpack-uni-mp-loader": "^2.0.1-32920211122003",
88 | "@dcloudio/webpack-uni-pages-loader": "^2.0.1-32920211122003",
89 | "@vue/cli-plugin-babel": "~4.5.0",
90 | "@vue/cli-service": "~4.5.0",
91 | "babel-plugin-import": "^1.11.0",
92 | "cross-env": "^7.0.2",
93 | "jest": "^25.4.0",
94 | "mini-types": "*",
95 | "miniprogram-api-typings": "*",
96 | "postcss-comment": "^2.0.0",
97 | "sass": "^1.45.0",
98 | "sass-loader": "^8.0.2",
99 | "vue-template-compiler": "^2.6.11"
100 | },
101 | "browserslist": [
102 | "Android >= 4.4",
103 | "ios >= 9"
104 | ],
105 | "uni-app": {
106 | "scripts": {}
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/src/pack-workshop/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | (currentTab = item.id)">
9 |
10 |
11 |
12 |
13 | {{ item.mapName }}
14 |
15 |
16 |
17 |
18 |
19 | {{ item.creator || '(匿名)' }}
20 |
21 |
22 |
23 | {{ item.praiseNumber || '0' }}
24 |
25 |
26 |
27 |
28 | {{ item.mapKingName }}
29 |
30 |
31 |
32 |
36 |
37 |
38 |
39 |
136 |
137 |
236 |
--------------------------------------------------------------------------------
/src/pack-game/pages/utils/move.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import { deepCloneObjArr } from '@/utils/index'
3 |
4 | export class Move {
5 | gameCore = {
6 | staticMap: [[]], // 静止层地图
7 | activeMap: [[]], // 活动层地图
8 | playerX: 0, // 玩家x轴坐标
9 | playerY: 0, // 玩家y轴坐标
10 | setX: 0, //目标点x轴坐标
11 | setY: 0, // 目标点y轴坐标
12 | setBoxX: 0, // 箱子移动点x轴坐标
13 | setBoxY: 0, // 箱子移动点y轴坐标
14 | staticTarget: 0, // 静止层目标点
15 | activeTarget: 0, // 活动层目标点
16 | staticBoxTarget: 0, // 静止层箱子目标点
17 | activeBoxTarget: 0, // 活动层箱子目标点
18 | life: 0, // 生命值
19 | endCounter: 0, // 终点个数
20 | // 状态
21 | status: {
22 | poisoning: false,
23 | drunk: false
24 | },
25 | portalExit: [], // 传送门出口坐标
26 | step: 0, // 步数
27 | suc: 0, // 获胜标识
28 | direction: -1, // 方向
29 | moveDirection: -1, // 移动方向(动画用)
30 | processData: [], // 流程记录
31 | disabledHandle: false, // 禁用虚拟手柄
32 | onSlid: false // 滑行状态
33 | }
34 | gameRecord = []
35 | moveFunc = null
36 |
37 | constructor(gameCore, direction, gameRecord, moveFunc) {
38 | this.gameCore = gameCore
39 | // 超出表格
40 | if (
41 | this.gameCore.setY < 0 ||
42 | this.gameCore.setY >= this.gameCore.staticMap.length ||
43 | this.gameCore.setX < 0 ||
44 | this.gameCore.setX >= this.gameCore.staticMap[0].length
45 | )
46 | return
47 | this.getTarget()
48 | this.gameRecord = gameRecord
49 | this.moveFunc = moveFunc
50 | // 静止层人物目标点事件
51 | let staticEventFlag = true
52 | if (staticEvent[this.gameCore.staticTarget]) {
53 | staticEventFlag = staticEvent[this.gameCore.staticTarget](this.gameCore, this.moveFunc, this.gameRecord)
54 | }
55 | if (!staticEventFlag) return
56 | // 活动层人物目标点事件
57 | let activeEventFlag = true
58 | if (activeEvent[this.gameCore.activeTarget]) {
59 | activeEventFlag = activeEvent[this.gameCore.activeTarget](this.gameCore)
60 | }
61 | if (!activeEventFlag) return
62 | this.commonMove()
63 | return true
64 | }
65 |
66 | // 常规移动
67 | commonMove() {
68 | Vue.set(this.gameCore.activeMap[this.gameCore.playerY], this.gameCore.playerX, 1)
69 | Vue.set(this.gameCore.activeMap[this.gameCore.setY], this.gameCore.setX, 2)
70 | this.gameCore.playerX = this.gameCore.setX
71 | this.gameCore.playerY = this.gameCore.setY
72 | this.gameCore.moveDirection = this.gameCore.direction
73 | this.gameCore.step++
74 | // 记录游戏记录
75 | this.gameRecord.push({
76 | ...deepCloneObjArr(this.gameCore),
77 | disabledHandle: false,
78 | onSlid: false
79 | })
80 | this.gameCore.processData.push(this.gameCore.direction)
81 | }
82 |
83 | static moveIndex(gameCore) {
84 | gameCore.setX = gameCore.playerX
85 | gameCore.setY = gameCore.playerY
86 | gameCore.setBoxX = gameCore.setX
87 | gameCore.setBoxY = gameCore.setY
88 | }
89 | getTarget() {
90 | this.gameCore.staticTarget = this.gameCore.staticMap[this.gameCore.setY][this.gameCore.setX] // 获取静止层目标点的值
91 | this.gameCore.activeTarget = this.gameCore.activeMap[this.gameCore.setY][this.gameCore.setX] // 获取活动层目标点的值
92 | if (this.gameCore.setBoxY < 0 || this.gameCore.setBoxY >= this.gameCore.staticMap.length) return
93 | this.gameCore.staticBoxTarget = this.gameCore.staticMap[this.gameCore.setBoxY][this.gameCore.setBoxX] // 获取静止层箱子目标点
94 | this.gameCore.activeBoxTarget = this.gameCore.activeMap[this.gameCore.setBoxY][this.gameCore.setBoxX] // 获取活动层箱子目标点
95 | }
96 | }
97 |
98 | const staticEvent = {
99 | // 墙
100 | 0: () => false,
101 | // 地刺
102 | 5: gameCore => commonUtils.loseLife(gameCore),
103 | // 火
104 | 6: gameCore => commonUtils.loseLife(gameCore),
105 | // 毒蘑菇
106 | 8: gameCore => {
107 | commonUtils.clearSelf(gameCore)
108 | gameCore.status.poisoning = true
109 | return true
110 | },
111 | // 弹簧
112 | 9: (gameCore, _moveFunc, gameRecord) => {
113 | setTimeout(() => {
114 | if (gameCore.direction === 0) gameCore.setY = gameCore.playerY - 2
115 | else if (gameCore.direction === 1) gameCore.setX = gameCore.playerX + 2
116 | else if (gameCore.direction === 2) gameCore.setY = gameCore.playerY + 2
117 | else if (gameCore.direction === 3) gameCore.setX = gameCore.playerX - 2
118 | gameRecord.splice(gameRecord.length - 1, 1)
119 | gameCore.step--
120 | new Move(gameCore, gameCore.direction, gameRecord)
121 | }, 0)
122 | return true
123 | },
124 | // 传送门入口
125 | 10: (gameCore, direction, gameRecord) => {
126 | // 随机指定传送出口
127 | const exit = gameCore.portalExit[Math.floor(Math.random() * gameCore.portalExit.length)]
128 | // 修改目标点
129 | gameCore.setY = Number(exit.y)
130 | gameCore.setX = Number(exit.x)
131 | // 打断滑行
132 | gameCore.onSlid = false
133 | new Move(gameCore, direction, gameRecord)
134 | },
135 | // 啤酒
136 | 12: gameCore => {
137 | commonUtils.clearSelf(gameCore)
138 | gameCore.status.drunk = true
139 | return true
140 | },
141 | // 解药
142 | 13: gameCore => {
143 | commonUtils.clearSelf(gameCore)
144 | for (let key in gameCore.status) {
145 | gameCore.status[key] = false
146 | }
147 | return true
148 | },
149 | // 滑块
150 | 14: (gameCore, moveFunc, gameRecord) => {
151 | gameCore.disabledHandle = true
152 | gameCore.onSlid = true
153 | let gameCoreStep = gameCore.step
154 | const startRecordLength = gameRecord.length
155 | const interval = setInterval(() => {
156 | moveFunc(gameCore.direction, true)
157 | gameCoreStep++
158 | // 通过上一次移动的步数是否与此次相同以判断移动被阻止
159 | if (gameCoreStep === gameCore.step || !gameCore.onSlid) {
160 | clearInterval(interval)
161 | // 清理滑行移动途中的记录
162 | setTimeout(() => {
163 | const endRecordLength = gameRecord.length
164 | const totalStep = endRecordLength - startRecordLength
165 | gameRecord.splice(startRecordLength, totalStep - 1)
166 | gameCore.disabledHandle = false
167 | gameCore.onSlid = false
168 | }, 50)
169 | }
170 | }, 300)
171 | return true
172 | }
173 | }
174 |
175 | const activeEvent = {
176 | // 普通箱子
177 | 3: gameCore => commonUtils.checkBoxEvent(gameCore),
178 | // 冰箱子
179 | 7: gameCore => commonUtils.checkBoxEvent(gameCore)
180 | }
181 |
182 | const staticBoxEvent = {
183 | // 墙
184 | 0: () => false,
185 | // 终点
186 | 4: gameCore => {
187 | let onEnd = 0
188 | Vue.nextTick(() => {
189 | for (let y in gameCore.activeMap) {
190 | for (let x in gameCore.activeMap[y]) {
191 | if (gameCore.activeMap[y][x] === 3 && gameCore.staticMap[y][x] === 4) {
192 | onEnd++
193 | }
194 | }
195 | }
196 | if (onEnd !== gameCore.endCounter) return
197 | gameCore.suc = 1
198 | })
199 | return true
200 | },
201 | // 火
202 | 6: gameCore => {
203 | if (gameCore.activeTarget === 7) {
204 | gameCore.activeTarget = 3 // 变为普通箱子
205 | Vue.set(gameCore.staticMap[gameCore.setBoxY], gameCore.setBoxX, 1) // 灭火
206 | } else {
207 | gameCore.activeTarget = 1 // 销毁普通箱子
208 | }
209 | return true
210 | },
211 | // 弹簧
212 | 9: () => false,
213 | // 传送门
214 | 10: () => false,
215 | 11: () => false
216 | }
217 |
218 | const activeBoxEvent = {
219 | 3: () => false,
220 | 7: () => false
221 | }
222 |
223 | const commonUtils = {
224 | loseLife: gameCore => {
225 | gameCore.life--
226 | return true
227 | },
228 | checkBoxEvent: gameCore => {
229 | let flag = true
230 | if (staticBoxEvent[gameCore.staticBoxTarget]) {
231 | flag = staticBoxEvent[gameCore.staticBoxTarget](gameCore)
232 | }
233 | if (activeBoxEvent[gameCore.activeBoxTarget]) {
234 | flag = activeBoxEvent[gameCore.activeBoxTarget](gameCore)
235 | }
236 | if (flag) Vue.set(gameCore.activeMap[gameCore.setBoxY], gameCore.setBoxX, gameCore.activeTarget)
237 | return flag
238 | },
239 | clearSelf: gameCore => {
240 | Vue.set(gameCore.staticMap[gameCore.setY], gameCore.setX, 1)
241 | }
242 | }
243 |
--------------------------------------------------------------------------------
/src/pack-game/pages/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
20 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
353 |
354 |
370 |
--------------------------------------------------------------------------------
/src/static/js/level/index.js:
--------------------------------------------------------------------------------
1 | // 关卡地图数据
2 |
3 | // 基础关
4 | export const basic = [
5 | [
6 | [0, 0, 0, 0, 0, 0, 0],
7 | [0, 1, 1, 1, 1, 1, 0],
8 | [0, 2, 3, 1, 1, 4, 0],
9 | [0, 1, 1, 1, 1, 1, 0],
10 | [0, 0, 0, 0, 0, 0, 0]
11 | ],
12 | [
13 | [0, 0, 0, 0, 0, 0, 0, 0, 0],
14 | [0, 2, 1, 0, 0, 0, 0, 1, 0],
15 | [0, 0, 3, 1, 1, 1, 1, 1, 0],
16 | [0, 1, 1, 1, 1, 1, 1, 1, 0],
17 | [0, 1, 1, 1, 0, 1, 1, 1, 0],
18 | [0, 0, 1, 1, 0, 1, 1, 4, 0],
19 | [0, 0, 0, 0, 0, 0, 0, 0, 0]
20 | ],
21 | [
22 | [1, 0, 0, 0, 0, 0, 1],
23 | [1, 0, 1, 4, 1, 0, 1],
24 | [0, 1, 1, 3, 1, 0, 0],
25 | [0, 1, 1, 3, 1, 2, 0],
26 | [0, 0, 1, 4, 1, 0, 0],
27 | [1, 0, 0, 0, 0, 0, 1]
28 | ],
29 | [
30 | [0, 0, 0, 0, 0, 0],
31 | [0, 1, 1, 1, 1, 0],
32 | [0, 2, 3, 3, 4, 0],
33 | [0, 1, 3, 1, 4, 0],
34 | [0, 1, 1, 4, 1, 0],
35 | [0, 0, 0, 0, 0, 0]
36 | ],
37 | [
38 | [0, 0, 0, 0, 0, 0],
39 | [0, 4, 4, 2, 1, 0],
40 | [0, 1, 3, 0, 1, 0],
41 | [0, 1, 3, 1, 1, 0],
42 | [0, 1, 1, 1, 1, 0],
43 | [0, 0, 0, 0, 0, 0]
44 | ],
45 | [
46 | [0, 0, 0, 0, 0, 0],
47 | [0, 1, 1, 1, 4, 0],
48 | [0, 1, 3, 3, 2, 0],
49 | [0, 1, 4, 1, 1, 0],
50 | [0, 0, 0, 0, 0, 0]
51 | ],
52 | [
53 | [0, 0, 0, 0, 0, 0],
54 | [0, 1, 1, 1, 4, 0],
55 | [0, 1, 3, 3, 1, 0],
56 | [0, 1, 2, 4, 1, 0],
57 | [0, 0, 0, 0, 0, 0]
58 | ],
59 | [
60 | [0, 0, 0, 0, 0, 0],
61 | [0, 1, 1, 4, 4, 0],
62 | [0, 4, 3, 1, 1, 0],
63 | [0, 1, 0, 3, 3, 0],
64 | [0, 4, 3, 1, 2, 0],
65 | [0, 0, 0, 0, 0, 0]
66 | ],
67 | [
68 | [0, 0, 0, 0, 1],
69 | [0, 4, 1, 0, 0],
70 | [0, 1, 3, 4, 0],
71 | [0, 1, 3, 2, 0],
72 | [0, 0, 1, 1, 0],
73 | [1, 0, 0, 0, 0]
74 | ],
75 | [
76 | [0, 0, 0, 0, 0, 1],
77 | [0, 1, 4, 1, 0, 0],
78 | [0, 1, 1, 3, 2, 0],
79 | [0, 1, 1, 3, 4, 0],
80 | [0, 0, 0, 1, 1, 0],
81 | [1, 1, 0, 0, 0, 0]
82 | ],
83 | [
84 | [0, 0, 0, 0, 0, 0, 0],
85 | [0, 1, 1, 1, 1, 1, 0],
86 | [0, 1, 3, 2, 1, 4, 0],
87 | [0, 1, 0, 3, 1, 4, 0],
88 | [0, 1, 3, 1, 1, 4, 0],
89 | [0, 0, 0, 0, 0, 0, 0]
90 | ],
91 | [
92 | [1, 0, 0, 0, 0, 0, 0],
93 | [1, 0, 1, 1, 1, 1, 0],
94 | [0, 0, 1, 3, 3, 2, 0],
95 | [0, 0, 1, 0, 1, 0, 0],
96 | [0, 1, 1, 4, 1, 0, 1],
97 | [0, 1, 1, 4, 0, 0, 1],
98 | [0, 0, 1, 1, 0, 1, 1],
99 | [1, 0, 0, 0, 0, 1, 1]
100 | ],
101 | [
102 | [0, 0, 0, 0, 1, 1, 1],
103 | [0, 1, 1, 0, 0, 0, 0],
104 | [0, 1, 1, 1, 1, 1, 0],
105 | [0, 1, 1, 1, 1, 1, 0],
106 | [0, 0, 0, 3, 0, 0, 0],
107 | [1, 1, 0, 4, 3, 2, 0],
108 | [1, 1, 0, 4, 1, 1, 0],
109 | [1, 1, 0, 0, 0, 0, 0]
110 | ],
111 | [
112 | [1, 0, 0, 0, 0, 0],
113 | [1, 0, 1, 1, 1, 0],
114 | [1, 0, 3, 3, 2, 0],
115 | [0, 0, 1, 0, 0, 0],
116 | [0, 1, 1, 1, 4, 0],
117 | [0, 1, 1, 1, 1, 0],
118 | [0, 0, 1, 0, 4, 0],
119 | [1, 0, 1, 1, 1, 0],
120 | [1, 0, 0, 0, 0, 0]
121 | ],
122 | [
123 | [1, 0, 0, 0, 0, 0, 1],
124 | [0, 0, 1, 1, 4, 0, 1],
125 | [0, 1, 3, 0, 4, 0, 1],
126 | [0, 1, 1, 1, 2, 0, 0],
127 | [0, 0, 1, 0, 1, 1, 0],
128 | [1, 0, 3, 1, 1, 1, 0],
129 | [1, 0, 1, 1, 1, 0, 0],
130 | [1, 0, 0, 0, 0, 0, 1]
131 | ],
132 | [
133 | [1, 1, 0, 0, 0, 0, 0],
134 | [0, 0, 0, 2, 1, 1, 0],
135 | [0, 4, 4, 1, 0, 1, 0],
136 | [0, 1, 3, 1, 0, 1, 0],
137 | [0, 0, 3, 1, 1, 1, 0],
138 | [0, 1, 1, 0, 0, 0, 0],
139 | [0, 1, 1, 0, 1, 1, 1],
140 | [0, 1, 1, 0, 1, 1, 1],
141 | [0, 0, 0, 0, 1, 1, 1]
142 | ],
143 | [
144 | [1, 1, 1, 0, 0, 0, 0, 0],
145 | [1, 1, 1, 0, 1, 1, 1, 0],
146 | [0, 0, 0, 0, 3, 0, 1, 0],
147 | [0, 1, 1, 1, 1, 1, 1, 0],
148 | [0, 1, 3, 1, 1, 1, 0, 0],
149 | [0, 0, 4, 0, 0, 0, 0, 1],
150 | [1, 0, 4, 1, 0, 1, 1, 1],
151 | [1, 0, 2, 1, 0, 1, 1, 1],
152 | [1, 0, 0, 0, 0, 1, 1, 1]
153 | ],
154 | [
155 | [0, 0, 0, 0, 0, 1, 1],
156 | [0, 1, 1, 1, 0, 0, 1],
157 | [0, 1, 0, 1, 1, 0, 0],
158 | [0, 4, 1, 0, 3, 1, 0],
159 | [0, 1, 1, 2, 1, 1, 0],
160 | [0, 4, 0, 0, 3, 0, 0],
161 | [0, 1, 1, 1, 1, 0, 1],
162 | [0, 0, 0, 0, 0, 0, 1]
163 | ],
164 | [
165 | [0, 0, 0, 0, 1, 1, 1, 1, 1],
166 | [0, 1, 4, 0, 1, 0, 0, 0, 0],
167 | [0, 1, 4, 0, 1, 0, 2, 1, 0],
168 | [0, 1, 1, 0, 0, 0, 3, 1, 0],
169 | [0, 1, 1, 1, 4, 4, 3, 1, 0],
170 | [0, 0, 3, 0, 1, 0, 0, 0, 0],
171 | [0, 1, 1, 0, 1, 0, 1, 1, 1],
172 | [0, 1, 3, 0, 1, 0, 1, 1, 1],
173 | [0, 1, 1, 1, 1, 0, 1, 1, 1],
174 | [0, 0, 0, 0, 0, 0, 1, 1, 1]
175 | ],
176 | [
177 | [1, 0, 0, 0, 0, 1, 1, 1],
178 | [1, 0, 1, 1, 0, 0, 0, 1],
179 | [0, 0, 1, 3, 3, 1, 0, 0],
180 | [0, 1, 1, 1, 0, 2, 1, 0],
181 | [0, 1, 1, 1, 0, 0, 1, 0],
182 | [0, 4, 0, 3, 3, 1, 1, 0],
183 | [0, 4, 0, 1, 0, 1, 0, 0],
184 | [0, 4, 1, 1, 4, 1, 0, 1],
185 | [0, 0, 0, 0, 0, 0, 0, 1]
186 | ],
187 | [
188 | [1, 0, 0, 0, 0, 1, 1, 1, 1, 1],
189 | [1, 0, 1, 1, 0, 0, 0, 0, 0, 0],
190 | [1, 0, 1, 1, 1, 1, 1, 1, 1, 0],
191 | [1, 0, 1, 0, 0, 0, 0, 1, 1, 0],
192 | [1, 0, 1, 0, 2, 1, 3, 1, 0, 0],
193 | [1, 0, 1, 0, 1, 1, 0, 1, 0, 1],
194 | [0, 0, 1, 0, 1, 3, 0, 1, 0, 1],
195 | [0, 1, 1, 0, 0, 4, 0, 1, 0, 1],
196 | [0, 1, 1, 1, 1, 4, 0, 1, 0, 1],
197 | [0, 0, 0, 0, 1, 1, 1, 1, 0, 1],
198 | [1, 1, 1, 0, 0, 0, 1, 1, 0, 1],
199 | [1, 1, 1, 1, 1, 0, 0, 0, 0, 1]
200 | ],
201 | [
202 | [0, 0, 0, 0, 0, 0],
203 | [0, 4, 0, 1, 1, 0],
204 | [0, 2, 3, 3, 1, 0],
205 | [0, 4, 4, 3, 1, 0],
206 | [0, 0, 1, 1, 1, 0],
207 | [1, 0, 0, 0, 0, 0]
208 | ],
209 | [
210 | [0, 0, 0, 0, 0, 1],
211 | [0, 2, 1, 1, 0, 0],
212 | [0, 1, 3, 3, 1, 0],
213 | [0, 0, 3, 1, 4, 0],
214 | [1, 0, 1, 4, 4, 0],
215 | [1, 0, 1, 1, 0, 0],
216 | [1, 0, 0, 0, 0, 1]
217 | ],
218 | [
219 | [1, 0, 0, 0, 0, 0],
220 | [1, 0, 1, 1, 1, 0],
221 | [1, 0, 1, 0, 1, 0],
222 | [0, 0, 1, 1, 4, 0],
223 | [0, 4, 3, 3, 1, 0],
224 | [0, 2, 3, 4, 1, 0],
225 | [0, 0, 0, 0, 0, 0]
226 | ],
227 | [
228 | [0, 0, 0, 0, 1, 1],
229 | [0, 1, 1, 0, 0, 1],
230 | [0, 2, 4, 1, 0, 1],
231 | [0, 4, 4, 3, 0, 0],
232 | [0, 1, 3, 3, 1, 0],
233 | [0, 1, 1, 1, 1, 0],
234 | [0, 0, 0, 0, 0, 0]
235 | ],
236 | [
237 | [1, 0, 0, 0, 0, 1, 1],
238 | [1, 0, 1, 1, 0, 0, 0],
239 | [1, 0, 1, 3, 3, 1, 0],
240 | [0, 0, 4, 4, 4, 1, 0],
241 | [0, 1, 1, 2, 3, 1, 0],
242 | [0, 1, 1, 1, 0, 0, 0],
243 | [0, 0, 0, 0, 0, 1, 1]
244 | ],
245 | [
246 | [1, 1, 0, 0, 0, 0],
247 | [1, 0, 0, 2, 4, 0],
248 | [1, 0, 1, 3, 4, 0],
249 | [0, 0, 1, 3, 3, 0],
250 | [0, 1, 1, 0, 4, 0],
251 | [0, 1, 1, 1, 1, 0],
252 | [0, 0, 1, 1, 1, 0],
253 | [1, 0, 0, 0, 0, 0]
254 | ],
255 | [
256 | [1, 1, 1, 1, 0, 0, 0],
257 | [0, 0, 0, 0, 0, 2, 0],
258 | [0, 1, 1, 3, 4, 4, 0],
259 | [0, 1, 0, 3, 3, 4, 0],
260 | [0, 1, 1, 1, 0, 0, 0],
261 | [0, 1, 1, 1, 0, 1, 1],
262 | [0, 1, 1, 1, 0, 1, 1],
263 | [0, 0, 0, 0, 0, 1, 1]
264 | ],
265 | [
266 | [0, 0, 0, 0, 0, 1, 1],
267 | [0, 4, 1, 4, 0, 0, 0],
268 | [0, 4, 0, 3, 3, 1, 0],
269 | [0, 1, 1, 1, 2, 1, 0],
270 | [0, 1, 3, 0, 1, 1, 0],
271 | [0, 0, 1, 1, 1, 0, 0],
272 | [1, 0, 0, 0, 0, 0, 1]
273 | ],
274 | [
275 | [1, 0, 0, 0, 0, 0],
276 | [1, 0, 1, 1, 1, 0],
277 | [1, 0, 1, 0, 3, 0],
278 | [0, 0, 1, 3, 4, 0],
279 | [0, 4, 1, 0, 1, 0],
280 | [0, 4, 3, 1, 2, 0],
281 | [0, 1, 1, 1, 1, 0],
282 | [0, 0, 0, 0, 0, 0]
283 | ],
284 | [
285 | [1, 1, 0, 0, 0, 0, 1],
286 | [1, 1, 0, 1, 4, 0, 1],
287 | [0, 0, 0, 1, 1, 0, 0],
288 | [0, 1, 3, 3, 1, 1, 0],
289 | [0, 1, 1, 1, 1, 1, 0],
290 | [0, 0, 3, 0, 1, 0, 0],
291 | [1, 0, 4, 2, 4, 0, 1],
292 | [1, 0, 0, 0, 0, 0, 1]
293 | ],
294 | [
295 | [1, 0, 0, 0, 0, 0],
296 | [0, 0, 1, 3, 4, 0],
297 | [0, 1, 1, 3, 2, 0],
298 | [0, 1, 1, 3, 0, 0],
299 | [0, 1, 4, 1, 1, 0],
300 | [0, 1, 4, 0, 1, 0],
301 | [0, 0, 1, 1, 1, 0],
302 | [1, 0, 0, 0, 0, 0]
303 | ],
304 | [
305 | [1, 1, 0, 0, 0, 0, 0],
306 | [1, 1, 0, 1, 1, 1, 0],
307 | [0, 0, 0, 2, 0, 1, 0],
308 | [0, 1, 1, 3, 4, 4, 0],
309 | [0, 1, 1, 3, 3, 4, 0],
310 | [0, 0, 0, 1, 0, 1, 0],
311 | [1, 1, 0, 1, 1, 1, 0],
312 | [1, 1, 0, 0, 0, 0, 0]
313 | ],
314 | [
315 | [0, 0, 0, 0, 1, 1],
316 | [0, 1, 1, 0, 1, 1],
317 | [0, 1, 1, 0, 1, 1],
318 | [0, 4, 3, 0, 0, 0],
319 | [0, 4, 3, 2, 1, 0],
320 | [0, 4, 3, 0, 1, 0],
321 | [0, 1, 1, 0, 1, 0],
322 | [0, 1, 1, 1, 1, 0],
323 | [0, 0, 0, 0, 0, 0]
324 | ],
325 | [
326 | [1, 0, 0, 0, 0, 0, 1],
327 | [1, 0, 1, 1, 4, 0, 1],
328 | [1, 0, 1, 0, 4, 0, 1],
329 | [0, 0, 1, 1, 4, 0, 0],
330 | [0, 1, 3, 3, 1, 1, 0],
331 | [0, 2, 3, 1, 0, 1, 0],
332 | [0, 0, 0, 1, 1, 1, 0],
333 | [1, 1, 0, 0, 0, 0, 0]
334 | ],
335 | [
336 | [1, 1, 0, 0, 0, 0, 1],
337 | [1, 1, 0, 1, 1, 0, 1],
338 | [0, 0, 0, 1, 3, 0, 0],
339 | [0, 1, 3, 4, 1, 1, 0],
340 | [0, 1, 0, 1, 1, 4, 0],
341 | [0, 2, 3, 4, 0, 1, 0],
342 | [0, 0, 0, 1, 1, 1, 0],
343 | [1, 1, 0, 0, 0, 0, 0]
344 | ],
345 | [
346 | [0, 0, 0, 0, 0],
347 | [0, 1, 1, 1, 0],
348 | [0, 1, 3, 1, 0],
349 | [0, 1, 1, 4, 0],
350 | [0, 0, 0, 1, 0],
351 | [1, 1, 0, 1, 0],
352 | [0, 0, 0, 1, 0],
353 | [0, 2, 3, 4, 0],
354 | [0, 1, 3, 4, 0],
355 | [0, 1, 1, 1, 0],
356 | [0, 0, 0, 0, 0]
357 | ],
358 | [
359 | [1, 1, 0, 0, 0, 0, 1, 1],
360 | [1, 1, 0, 1, 1, 0, 0, 0],
361 | [1, 0, 0, 1, 4, 1, 1, 0],
362 | [0, 0, 2, 3, 3, 3, 1, 0],
363 | [0, 1, 4, 1, 4, 1, 0, 0],
364 | [0, 1, 1, 1, 0, 0, 0, 1],
365 | [0, 1, 1, 0, 0, 1, 1, 1],
366 | [0, 0, 0, 0, 1, 1, 1, 1]
367 | ],
368 | [
369 | [0, 0, 0, 0, 0, 0, 0],
370 | [0, 1, 1, 1, 4, 1, 0],
371 | [0, 1, 0, 3, 0, 1, 0],
372 | [0, 1, 3, 2, 3, 1, 0],
373 | [0, 1, 0, 1, 0, 4, 0],
374 | [0, 1, 4, 1, 1, 1, 0],
375 | [0, 0, 0, 0, 0, 0, 0]
376 | ],
377 | [
378 | [1, 1, 0, 0, 0, 0, 1],
379 | [0, 0, 0, 1, 1, 0, 1],
380 | [0, 1, 1, 3, 2, 0, 0],
381 | [0, 1, 0, 1, 3, 1, 0],
382 | [0, 1, 3, 1, 0, 1, 0],
383 | [0, 0, 1, 4, 4, 4, 0],
384 | [1, 0, 1, 1, 1, 0, 0],
385 | [1, 0, 0, 0, 0, 0, 1]
386 | ],
387 | [
388 | [1, 1, 0, 0, 0, 0, 0],
389 | [0, 0, 0, 1, 1, 1, 0],
390 | [0, 1, 1, 1, 0, 1, 0],
391 | [0, 1, 0, 3, 4, 1, 0],
392 | [0, 1, 1, 4, 3, 2, 0],
393 | [0, 0, 0, 3, 4, 0, 0],
394 | [1, 1, 0, 1, 1, 0, 1],
395 | [1, 1, 0, 1, 1, 0, 1],
396 | [1, 1, 0, 0, 0, 0, 1]
397 | ],
398 | [
399 | [1, 0, 0, 0, 0, 0, 1, 1],
400 | [1, 0, 1, 1, 1, 0, 1, 1],
401 | [0, 0, 3, 0, 1, 0, 0, 0],
402 | [0, 1, 1, 4, 3, 2, 1, 0],
403 | [0, 1, 0, 1, 1, 0, 1, 0],
404 | [0, 1, 0, 4, 4, 3, 1, 0],
405 | [0, 1, 1, 1, 0, 0, 0, 0],
406 | [0, 0, 0, 0, 0, 1, 1, 1]
407 | ],
408 | [
409 | [1, 1, 1, 0, 0, 0, 0, 1],
410 | [1, 1, 0, 0, 2, 1, 0, 0],
411 | [1, 0, 0, 1, 1, 4, 4, 0],
412 | [0, 0, 1, 3, 0, 3, 0, 0],
413 | [0, 1, 1, 1, 3, 4, 1, 0],
414 | [0, 1, 1, 0, 1, 1, 1, 0],
415 | [0, 1, 1, 1, 1, 0, 0, 0],
416 | [0, 0, 0, 0, 0, 0, 1, 1]
417 | ],
418 | [
419 | [0, 0, 0, 0, 0, 0, 0, 0],
420 | [0, 1, 2, 4, 0, 1, 1, 0],
421 | [0, 1, 4, 3, 1, 4, 1, 0],
422 | [0, 1, 1, 0, 3, 1, 1, 0],
423 | [0, 1, 1, 3, 1, 1, 0, 0],
424 | [0, 0, 0, 1, 1, 0, 0, 1],
425 | [1, 1, 0, 1, 1, 0, 1, 1],
426 | [1, 1, 0, 0, 0, 0, 1, 1]
427 | ],
428 | [
429 | [0, 0, 0, 0, 0, 0, 1, 1],
430 | [0, 1, 1, 1, 2, 0, 1, 1],
431 | [0, 1, 0, 4, 3, 0, 0, 0],
432 | [0, 1, 0, 4, 3, 1, 1, 0],
433 | [0, 1, 1, 4, 3, 0, 1, 0],
434 | [0, 1, 0, 0, 1, 0, 1, 0],
435 | [0, 1, 1, 1, 1, 1, 1, 0],
436 | [0, 0, 0, 0, 0, 0, 0, 0]
437 | ],
438 | [
439 | [0, 0, 0, 0, 0, 0, 1, 1],
440 | [0, 2, 1, 1, 1, 0, 1, 1],
441 | [0, 1, 3, 0, 1, 0, 1, 1],
442 | [0, 1, 3, 1, 1, 0, 1, 1],
443 | [0, 1, 3, 1, 0, 0, 1, 1],
444 | [0, 0, 0, 1, 0, 0, 0, 0],
445 | [1, 0, 1, 1, 0, 1, 1, 0],
446 | [1, 0, 4, 4, 4, 1, 1, 0],
447 | [1, 0, 1, 1, 1, 1, 1, 0],
448 | [1, 0, 0, 0, 0, 0, 0, 0]
449 | ],
450 | [
451 | [1, 1, 1, 1, 0, 0, 0, 0, 1],
452 | [1, 0, 0, 0, 0, 1, 1, 0, 1],
453 | [0, 0, 1, 3, 1, 1, 1, 0, 1],
454 | [0, 1, 1, 0, 1, 0, 3, 0, 1],
455 | [0, 4, 2, 4, 4, 1, 1, 0, 0],
456 | [0, 0, 1, 0, 1, 0, 1, 1, 0],
457 | [1, 0, 1, 1, 1, 3, 1, 1, 0],
458 | [1, 0, 1, 1, 0, 0, 0, 0, 0],
459 | [1, 0, 0, 0, 0, 1, 1, 1, 1]
460 | ],
461 | [
462 | [1, 1, 1, 1, 0, 0, 0, 0],
463 | [1, 0, 0, 0, 0, 1, 1, 0],
464 | [1, 0, 1, 1, 1, 1, 1, 0],
465 | [0, 0, 3, 0, 0, 4, 1, 0],
466 | [0, 1, 1, 1, 2, 1, 0, 0],
467 | [0, 1, 1, 0, 0, 4, 0, 0],
468 | [0, 1, 3, 3, 1, 1, 1, 0],
469 | [0, 1, 1, 0, 0, 4, 1, 0],
470 | [0, 0, 0, 0, 0, 1, 1, 0],
471 | [1, 1, 1, 1, 0, 0, 0, 0]
472 | ],
473 | [
474 | [0, 0, 0, 1, 1, 1, 1, 1],
475 | [0, 2, 0, 1, 1, 1, 1, 1],
476 | [0, 1, 0, 0, 0, 0, 0, 0],
477 | [0, 1, 0, 1, 4, 4, 4, 0],
478 | [0, 1, 1, 1, 1, 1, 0, 0],
479 | [0, 1, 3, 0, 1, 0, 0, 1],
480 | [0, 1, 1, 0, 1, 0, 1, 1],
481 | [0, 0, 3, 0, 1, 0, 1, 1],
482 | [0, 1, 1, 0, 1, 0, 1, 1],
483 | [0, 1, 3, 0, 1, 0, 1, 1],
484 | [0, 1, 1, 1, 1, 0, 1, 1],
485 | [0, 0, 0, 0, 0, 0, 1, 1]
486 | ],
487 | [
488 | [0, 0, 0, 0, 0, 0, 0, 0],
489 | [0, 1, 1, 1, 4, 1, 2, 0],
490 | [0, 1, 0, 0, 4, 0, 1, 0],
491 | [0, 1, 1, 0, 4, 0, 1, 0],
492 | [0, 1, 3, 1, 1, 0, 1, 0],
493 | [0, 1, 3, 3, 1, 0, 1, 0],
494 | [0, 1, 1, 0, 0, 0, 1, 0],
495 | [0, 0, 1, 1, 1, 1, 1, 0],
496 | [1, 0, 0, 0, 0, 0, 0, 0]
497 | ],
498 | [
499 | [0, 0, 0, 0, 0, 0, 0, 0],
500 | [0, 1, 1, 1, 1, 1, 1, 0],
501 | [0, 2, 3, 1, 3, 3, 1, 0],
502 | [0, 0, 0, 0, 1, 1, 0, 0],
503 | [0, 1, 1, 0, 0, 1, 1, 0],
504 | [0, 1, 1, 0, 4, 1, 4, 0],
505 | [0, 1, 1, 1, 4, 1, 1, 0],
506 | [0, 0, 1, 1, 1, 1, 0, 0],
507 | [1, 0, 0, 0, 0, 0, 0, 1]
508 | ],
509 | [
510 | [1, 0, 0, 0, 0, 1, 1, 1, 1],
511 | [1, 0, 1, 1, 0, 1, 1, 1, 1],
512 | [1, 0, 3, 1, 0, 1, 1, 1, 1],
513 | [1, 0, 1, 1, 0, 1, 1, 1, 1],
514 | [1, 0, 3, 4, 0, 1, 1, 1, 1],
515 | [1, 0, 1, 4, 0, 0, 0, 0, 0],
516 | [1, 0, 3, 1, 1, 1, 1, 1, 0],
517 | [1, 0, 1, 4, 0, 0, 1, 1, 0],
518 | [0, 0, 1, 0, 0, 0, 1, 0, 0],
519 | [0, 1, 1, 1, 1, 1, 1, 0, 1],
520 | [0, 1, 2, 1, 0, 1, 1, 0, 1],
521 | [0, 0, 0, 0, 0, 0, 0, 0, 1]
522 | ],
523 | [
524 | [1, 1, 0, 0, 0, 0, 1, 1],
525 | [1, 1, 0, 1, 1, 0, 0, 0],
526 | [0, 0, 0, 1, 3, 1, 1, 0],
527 | [0, 4, 0, 1, 1, 0, 1, 0],
528 | [0, 4, 0, 0, 1, 0, 1, 0],
529 | [0, 4, 0, 2, 1, 0, 1, 0],
530 | [0, 1, 1, 1, 3, 3, 1, 0],
531 | [0, 1, 0, 1, 1, 0, 1, 0],
532 | [0, 1, 0, 0, 0, 0, 1, 0],
533 | [0, 1, 1, 1, 1, 1, 1, 0],
534 | [0, 0, 0, 0, 0, 0, 0, 0]
535 | ],
536 | [
537 | [1, 1, 1, 1, 0, 0, 0, 0, 1],
538 | [0, 0, 0, 0, 0, 1, 1, 0, 0],
539 | [0, 1, 1, 1, 1, 1, 1, 1, 0],
540 | [0, 1, 1, 0, 0, 1, 0, 1, 0],
541 | [0, 0, 1, 4, 1, 2, 1, 4, 0],
542 | [1, 0, 1, 0, 0, 1, 1, 0, 0],
543 | [1, 0, 1, 1, 0, 4, 0, 0, 1],
544 | [1, 0, 1, 3, 3, 1, 0, 1, 1],
545 | [1, 0, 1, 1, 3, 0, 0, 1, 1],
546 | [1, 0, 1, 1, 1, 0, 1, 1, 1],
547 | [1, 0, 0, 0, 0, 0, 1, 1, 1]
548 | ],
549 | [
550 | [1, 1, 1, 0, 0, 0, 0, 0],
551 | [0, 0, 0, 0, 1, 1, 1, 0],
552 | [0, 1, 1, 1, 1, 1, 1, 0],
553 | [0, 1, 1, 0, 0, 4, 0, 0],
554 | [0, 0, 1, 0, 2, 1, 1, 0],
555 | [1, 0, 4, 4, 3, 1, 1, 0],
556 | [0, 0, 1, 0, 3, 0, 0, 0],
557 | [0, 1, 1, 1, 3, 1, 0, 1],
558 | [0, 1, 0, 1, 1, 1, 0, 1],
559 | [0, 1, 1, 1, 0, 0, 0, 1],
560 | [0, 0, 0, 0, 0, 1, 1, 1]
561 | ],
562 | [
563 | [1, 0, 0, 0, 0, 0, 1],
564 | [1, 0, 4, 1, 1, 0, 1],
565 | [1, 0, 1, 0, 1, 0, 1],
566 | [0, 0, 1, 1, 3, 0, 0],
567 | [0, 1, 3, 1, 3, 1, 0],
568 | [0, 4, 4, 3, 0, 1, 0],
569 | [0, 0, 0, 4, 1, 2, 0],
570 | [1, 1, 0, 0, 0, 0, 0]
571 | ],
572 | [
573 | [1, 0, 0, 0, 0, 0, 1],
574 | [0, 0, 2, 4, 1, 0, 0],
575 | [0, 1, 1, 3, 1, 1, 0],
576 | [0, 4, 3, 1, 3, 4, 0],
577 | [0, 1, 1, 3, 1, 1, 0],
578 | [0, 0, 1, 4, 1, 0, 0],
579 | [1, 0, 0, 0, 0, 0, 1]
580 | ],
581 | [
582 | [1, 0, 0, 0, 0, 0, 0],
583 | [0, 0, 1, 1, 1, 4, 0],
584 | [0, 4, 1, 1, 3, 1, 0],
585 | [0, 3, 0, 3, 0, 1, 0],
586 | [0, 2, 1, 1, 3, 1, 0],
587 | [0, 4, 1, 1, 0, 4, 0],
588 | [0, 0, 0, 0, 0, 0, 0]
589 | ],
590 | [
591 | [0, 0, 0, 0, 0, 1, 1],
592 | [0, 1, 1, 1, 0, 1, 1],
593 | [0, 2, 3, 3, 0, 0, 1],
594 | [0, 4, 0, 1, 1, 0, 0],
595 | [0, 4, 4, 3, 1, 1, 0],
596 | [0, 4, 3, 1, 1, 1, 0],
597 | [0, 0, 0, 0, 1, 1, 0],
598 | [1, 1, 1, 0, 0, 0, 0]
599 | ],
600 | [
601 | [0, 0, 0, 0, 0, 0, 1],
602 | [0, 4, 1, 4, 4, 0, 1],
603 | [0, 1, 1, 3, 4, 0, 1],
604 | [0, 0, 1, 1, 3, 0, 0],
605 | [1, 0, 1, 1, 3, 1, 0],
606 | [1, 0, 3, 0, 0, 1, 0],
607 | [1, 0, 1, 2, 1, 1, 0],
608 | [1, 0, 0, 0, 0, 0, 0]
609 | ],
610 | [
611 | [0, 0, 0, 0, 0, 0, 0],
612 | [0, 4, 1, 1, 1, 4, 0],
613 | [0, 0, 1, 3, 3, 1, 0],
614 | [1, 0, 1, 1, 0, 4, 0],
615 | [0, 0, 3, 3, 0, 4, 0],
616 | [0, 1, 1, 1, 0, 0, 0],
617 | [0, 2, 1, 1, 0, 1, 1],
618 | [0, 0, 0, 0, 0, 1, 1]
619 | ],
620 | [
621 | [1, 1, 0, 0, 0, 0, 1],
622 | [1, 1, 0, 1, 1, 0, 1],
623 | [0, 0, 0, 3, 4, 0, 0],
624 | [0, 1, 1, 3, 4, 1, 0],
625 | [0, 1, 1, 3, 4, 2, 0],
626 | [0, 1, 1, 3, 4, 1, 0],
627 | [0, 0, 0, 1, 1, 0, 0],
628 | [1, 1, 0, 0, 0, 0, 1]
629 | ],
630 | [
631 | [1, 1, 0, 0, 0, 0, 1],
632 | [0, 0, 0, 1, 1, 0, 1],
633 | [0, 1, 4, 1, 3, 0, 1],
634 | [0, 4, 4, 3, 2, 0, 0],
635 | [0, 1, 1, 3, 1, 1, 0],
636 | [0, 4, 1, 0, 3, 1, 0],
637 | [0, 0, 0, 0, 1, 1, 0],
638 | [1, 1, 1, 0, 0, 0, 0]
639 | ],
640 | [
641 | [1, 0, 0, 0, 0, 1, 1],
642 | [1, 0, 1, 1, 0, 1, 1],
643 | [0, 0, 4, 3, 0, 0, 0],
644 | [0, 1, 4, 1, 3, 1, 0],
645 | [0, 1, 4, 3, 0, 2, 0],
646 | [0, 1, 4, 1, 3, 1, 0],
647 | [0, 1, 1, 1, 0, 0, 0],
648 | [0, 0, 0, 0, 0, 1, 1]
649 | ],
650 | [
651 | [1, 0, 0, 0, 0, 1, 1],
652 | [1, 0, 1, 1, 0, 0, 1],
653 | [1, 0, 1, 1, 1, 0, 0],
654 | [0, 0, 3, 4, 4, 1, 0],
655 | [0, 1, 3, 2, 3, 1, 0],
656 | [0, 1, 4, 4, 3, 0, 0],
657 | [0, 0, 1, 1, 1, 0, 1],
658 | [1, 0, 0, 0, 0, 0, 1]
659 | ],
660 | [
661 | [0, 0, 0, 0, 0, 1],
662 | [0, 4, 1, 4, 0, 1],
663 | [0, 1, 3, 4, 0, 1],
664 | [0, 0, 3, 4, 0, 0],
665 | [1, 0, 1, 1, 1, 0],
666 | [1, 0, 3, 2, 1, 0],
667 | [1, 0, 1, 1, 1, 0],
668 | [1, 0, 3, 1, 0, 0],
669 | [1, 0, 1, 1, 0, 1],
670 | [1, 0, 0, 0, 0, 1]
671 | ],
672 | [
673 | [0, 0, 0, 0, 0, 1],
674 | [0, 1, 2, 1, 0, 1],
675 | [0, 3, 3, 3, 0, 0],
676 | [0, 1, 3, 1, 1, 0],
677 | [0, 1, 1, 0, 1, 0],
678 | [0, 4, 4, 4, 4, 0],
679 | [0, 1, 1, 1, 1, 0],
680 | [0, 0, 0, 0, 0, 0]
681 | ],
682 | [
683 | [0, 0, 0, 0, 0, 0, 1],
684 | [0, 1, 1, 1, 1, 0, 1],
685 | [0, 4, 0, 4, 3, 0, 0],
686 | [0, 1, 1, 3, 1, 1, 0],
687 | [0, 1, 3, 2, 4, 1, 0],
688 | [0, 4, 0, 3, 0, 0, 0],
689 | [0, 1, 1, 1, 0, 1, 1],
690 | [0, 0, 0, 0, 0, 1, 1]
691 | ],
692 | [
693 | [1, 0, 0, 0, 0, 0, 0],
694 | [0, 0, 1, 1, 1, 1, 0],
695 | [0, 4, 3, 3, 1, 1, 0],
696 | [0, 1, 3, 2, 0, 1, 0],
697 | [0, 1, 4, 3, 4, 1, 0],
698 | [0, 0, 4, 1, 0, 0, 0],
699 | [1, 0, 1, 1, 0, 1, 1],
700 | [1, 0, 0, 0, 0, 1, 1]
701 | ],
702 | [
703 | [1, 1, 0, 0, 0, 0, 1, 1],
704 | [1, 1, 0, 1, 1, 0, 1, 1],
705 | [1, 1, 0, 3, 1, 0, 1, 1],
706 | [0, 0, 0, 1, 1, 0, 0, 0],
707 | [0, 1, 3, 1, 4, 3, 1, 0],
708 | [0, 2, 1, 4, 1, 4, 1, 0],
709 | [0, 0, 0, 3, 4, 0, 0, 0],
710 | [1, 1, 0, 1, 1, 0, 1, 1],
711 | [1, 1, 0, 0, 0, 0, 1, 1]
712 | ],
713 | [
714 | [1, 0, 0, 0, 0, 1, 1, 1],
715 | [1, 0, 1, 2, 0, 1, 1, 1],
716 | [1, 0, 1, 1, 0, 1, 1, 1],
717 | [1, 0, 3, 4, 0, 1, 1, 1],
718 | [0, 0, 4, 3, 0, 0, 0, 0],
719 | [0, 1, 3, 4, 1, 1, 1, 0],
720 | [0, 1, 4, 3, 1, 1, 1, 0],
721 | [0, 1, 1, 0, 0, 0, 0, 0],
722 | [0, 0, 0, 0, 1, 1, 1, 1]
723 | ],
724 | [
725 | [1, 1, 0, 0, 0, 0, 1, 1],
726 | [1, 1, 0, 1, 4, 0, 0, 0],
727 | [0, 0, 0, 1, 4, 4, 1, 0],
728 | [0, 1, 1, 3, 1, 1, 4, 0],
729 | [0, 1, 1, 1, 0, 1, 0, 0],
730 | [0, 0, 3, 3, 3, 1, 0, 1],
731 | [1, 0, 1, 2, 0, 0, 0, 1],
732 | [1, 0, 0, 0, 0, 1, 1, 1]
733 | ],
734 | [
735 | [0, 0, 0, 0, 1, 1],
736 | [0, 2, 4, 0, 0, 0],
737 | [0, 1, 4, 1, 1, 0],
738 | [0, 4, 4, 3, 1, 0],
739 | [0, 3, 0, 3, 0, 0],
740 | [0, 1, 1, 1, 1, 0],
741 | [0, 1, 3, 1, 1, 0],
742 | [0, 1, 1, 0, 0, 0],
743 | [0, 0, 0, 0, 1, 1]
744 | ],
745 | [
746 | [1, 0, 0, 0, 0, 0],
747 | [0, 0, 1, 1, 1, 0],
748 | [0, 2, 3, 3, 1, 0],
749 | [0, 4, 0, 1, 1, 0],
750 | [0, 4, 1, 1, 0, 0],
751 | [0, 4, 3, 3, 0, 0],
752 | [0, 4, 1, 1, 1, 0],
753 | [0, 0, 1, 1, 1, 0],
754 | [1, 0, 0, 0, 0, 0]
755 | ],
756 | [
757 | [1, 1, 0, 0, 0, 0, 0],
758 | [0, 0, 0, 1, 1, 1, 0],
759 | [0, 1, 3, 3, 1, 1, 0],
760 | [0, 1, 4, 1, 1, 0, 0],
761 | [0, 0, 4, 0, 4, 0, 0],
762 | [1, 0, 1, 2, 4, 1, 0],
763 | [1, 0, 1, 3, 3, 1, 0],
764 | [1, 0, 1, 1, 0, 0, 0],
765 | [1, 0, 0, 0, 0, 1, 1]
766 | ],
767 | [
768 | [1, 0, 0, 0, 0, 1, 1],
769 | [1, 0, 1, 1, 0, 1, 1],
770 | [1, 0, 1, 1, 0, 1, 1],
771 | [0, 0, 2, 4, 0, 0, 0],
772 | [0, 1, 3, 3, 1, 1, 0],
773 | [0, 1, 4, 4, 0, 1, 0],
774 | [0, 1, 3, 3, 1, 1, 0],
775 | [0, 0, 4, 1, 0, 0, 0],
776 | [1, 0, 1, 1, 0, 1, 1],
777 | [1, 0, 0, 0, 0, 1, 1]
778 | ],
779 | [
780 | [1, 0, 0, 0, 0, 1, 1, 1],
781 | [1, 0, 1, 4, 0, 0, 0, 0],
782 | [1, 0, 1, 1, 1, 1, 4, 0],
783 | [1, 0, 3, 3, 3, 3, 2, 0],
784 | [0, 0, 1, 0, 1, 0, 0, 0],
785 | [0, 1, 1, 1, 4, 1, 0, 1],
786 | [0, 1, 4, 1, 1, 1, 0, 1],
787 | [0, 0, 0, 0, 0, 0, 0, 1]
788 | ],
789 | [
790 | [1, 1, 0, 0, 0, 0, 1],
791 | [0, 0, 0, 4, 1, 0, 1],
792 | [0, 1, 3, 1, 4, 0, 0],
793 | [0, 1, 0, 1, 4, 4, 0],
794 | [0, 1, 2, 1, 0, 1, 0],
795 | [0, 1, 3, 3, 3, 1, 0],
796 | [0, 0, 1, 1, 1, 0, 0],
797 | [1, 0, 1, 1, 0, 0, 1],
798 | [1, 0, 0, 0, 0, 1, 1]
799 | ],
800 | [
801 | [1, 1, 1, 0, 0, 0, 0, 0],
802 | [1, 1, 1, 0, 2, 1, 1, 0],
803 | [1, 0, 0, 0, 1, 3, 1, 0],
804 | [1, 0, 1, 1, 3, 3, 1, 0],
805 | [1, 0, 1, 0, 3, 1, 0, 0],
806 | [1, 0, 4, 1, 1, 1, 0, 1],
807 | [0, 0, 4, 0, 1, 0, 0, 1],
808 | [0, 4, 4, 1, 1, 0, 1, 1],
809 | [0, 0, 0, 0, 0, 0, 1, 1]
810 | ],
811 | [
812 | [0, 0, 0, 0, 0, 0, 1],
813 | [0, 1, 1, 4, 1, 0, 0],
814 | [0, 1, 0, 1, 1, 4, 0],
815 | [0, 1, 0, 3, 1, 0, 0],
816 | [0, 1, 4, 3, 4, 1, 0],
817 | [0, 1, 1, 3, 3, 1, 0],
818 | [0, 0, 1, 1, 2, 1, 0],
819 | [1, 0, 0, 0, 0, 0, 0]
820 | ],
821 | [
822 | [1, 0, 0, 0, 0, 0, 0],
823 | [0, 0, 1, 2, 4, 1, 0],
824 | [0, 1, 1, 3, 0, 1, 0],
825 | [0, 4, 3, 4, 3, 1, 0],
826 | [0, 0, 1, 1, 1, 0, 0],
827 | [0, 1, 1, 0, 4, 0, 1],
828 | [0, 1, 3, 1, 1, 0, 1],
829 | [0, 1, 1, 0, 0, 0, 1],
830 | [0, 0, 0, 0, 1, 1, 1]
831 | ],
832 | [
833 | [1, 0, 0, 0, 0, 0, 0],
834 | [0, 0, 1, 2, 4, 1, 0],
835 | [0, 1, 1, 3, 0, 1, 0],
836 | [0, 4, 3, 4, 3, 1, 0],
837 | [0, 0, 1, 1, 1, 0, 0],
838 | [0, 1, 1, 0, 4, 0, 1],
839 | [0, 1, 3, 1, 1, 0, 1],
840 | [0, 1, 1, 0, 0, 0, 1],
841 | [0, 0, 0, 0, 1, 1, 1]
842 | ],
843 | [
844 | [0, 0, 0, 0, 0, 0, 0, 0],
845 | [0, 1, 1, 0, 1, 1, 1, 0],
846 | [0, 4, 3, 1, 3, 1, 1, 0],
847 | [0, 4, 2, 0, 1, 0, 0, 0],
848 | [0, 4, 1, 3, 3, 1, 0, 1],
849 | [0, 4, 1, 0, 1, 1, 0, 1],
850 | [0, 0, 0, 0, 1, 1, 0, 1],
851 | [1, 1, 1, 0, 0, 0, 0, 1]
852 | ],
853 | [
854 | [0, 0, 0, 0, 0, 0, 0],
855 | [0, 4, 1, 1, 1, 4, 0],
856 | [0, 1, 0, 1, 3, 1, 0],
857 | [0, 1, 0, 1, 0, 1, 0],
858 | [0, 1, 3, 2, 3, 1, 0],
859 | [0, 1, 0, 3, 0, 1, 0],
860 | [0, 4, 1, 1, 1, 4, 0],
861 | [0, 0, 0, 0, 0, 0, 0]
862 | ],
863 | [
864 | [0, 0, 0, 0, 1, 1, 1],
865 | [0, 2, 1, 0, 1, 1, 1],
866 | [0, 1, 1, 0, 0, 0, 0],
867 | [0, 1, 1, 1, 4, 1, 0],
868 | [0, 4, 0, 3, 0, 1, 0],
869 | [0, 1, 3, 1, 1, 1, 0],
870 | [0, 3, 0, 3, 0, 4, 0],
871 | [0, 1, 4, 1, 1, 1, 0],
872 | [0, 0, 0, 0, 0, 0, 0]
873 | ],
874 | [
875 | [1, 1, 0, 0, 0, 0, 0],
876 | [1, 1, 0, 1, 1, 1, 0],
877 | [0, 0, 0, 3, 0, 4, 0],
878 | [0, 1, 1, 3, 0, 1, 0],
879 | [0, 1, 4, 3, 4, 4, 0],
880 | [0, 0, 1, 3, 0, 1, 0],
881 | [1, 0, 1, 2, 1, 1, 0],
882 | [1, 0, 0, 0, 0, 0, 0]
883 | ],
884 | [
885 | [1, 1, 1, 0, 0, 0, 0],
886 | [0, 0, 0, 0, 1, 1, 0],
887 | [0, 4, 3, 1, 3, 1, 0],
888 | [0, 1, 0, 0, 1, 4, 0],
889 | [0, 2, 1, 1, 1, 1, 0],
890 | [0, 1, 0, 0, 1, 4, 0],
891 | [0, 4, 3, 1, 3, 1, 0],
892 | [0, 0, 0, 0, 1, 1, 0],
893 | [1, 1, 1, 0, 0, 0, 0]
894 | ],
895 | [
896 | [1, 0, 0, 0, 0, 1, 1, 1],
897 | [1, 0, 1, 1, 0, 0, 0, 1],
898 | [1, 0, 1, 1, 3, 1, 0, 1],
899 | [0, 0, 1, 0, 3, 2, 0, 0],
900 | [0, 1, 1, 1, 3, 3, 1, 0],
901 | [0, 1, 1, 4, 0, 1, 1, 0],
902 | [0, 1, 4, 4, 4, 1, 0, 0],
903 | [0, 0, 0, 0, 0, 0, 0, 1]
904 | ],
905 | [
906 | [1, 1, 0, 0, 0, 0, 0, 1],
907 | [0, 0, 0, 1, 1, 1, 0, 0],
908 | [0, 1, 1, 4, 3, 4, 1, 0],
909 | [0, 1, 4, 3, 4, 0, 2, 0],
910 | [0, 0, 1, 0, 1, 3, 1, 0],
911 | [1, 0, 1, 3, 1, 0, 1, 0],
912 | [1, 0, 0, 0, 1, 1, 1, 0],
913 | [1, 1, 1, 0, 0, 0, 0, 0]
914 | ],
915 | [
916 | [1, 1, 0, 0, 0, 0, 0, 1],
917 | [1, 1, 0, 1, 1, 1, 0, 1],
918 | [1, 0, 0, 4, 0, 3, 0, 0],
919 | [0, 0, 1, 4, 3, 1, 1, 0],
920 | [0, 1, 1, 4, 1, 3, 1, 0],
921 | [0, 1, 0, 4, 3, 0, 1, 0],
922 | [0, 1, 1, 1, 1, 1, 2, 0],
923 | [0, 0, 0, 0, 0, 0, 0, 0]
924 | ],
925 | [
926 | [1, 1, 0, 0, 0, 0, 0, 1],
927 | [1, 1, 0, 1, 1, 1, 0, 1],
928 | [0, 0, 0, 1, 0, 3, 0, 0],
929 | [0, 2, 1, 4, 4, 1, 1, 0],
930 | [0, 1, 3, 0, 0, 3, 1, 0],
931 | [0, 1, 1, 4, 4, 1, 1, 0],
932 | [0, 0, 1, 0, 3, 0, 0, 0],
933 | [1, 0, 1, 1, 1, 0, 1, 1],
934 | [1, 0, 0, 0, 0, 0, 1, 1]
935 | ],
936 | [
937 | [1, 1, 0, 0, 0, 0, 1, 1],
938 | [1, 1, 0, 1, 1, 0, 1, 1],
939 | [0, 0, 0, 1, 4, 0, 0, 0],
940 | [0, 1, 3, 2, 3, 1, 1, 0],
941 | [0, 1, 0, 4, 4, 0, 1, 0],
942 | [0, 1, 1, 3, 3, 1, 1, 0],
943 | [0, 0, 0, 4, 1, 0, 0, 0],
944 | [1, 1, 0, 1, 1, 0, 1, 1],
945 | [1, 1, 0, 1, 1, 0, 1, 1],
946 | [1, 1, 0, 0, 0, 0, 1, 1]
947 | ],
948 | [
949 | [0, 0, 0, 0, 0, 0, 1],
950 | [0, 1, 1, 1, 1, 0, 1],
951 | [0, 1, 0, 0, 1, 0, 1],
952 | [0, 1, 3, 2, 3, 0, 1],
953 | [0, 1, 4, 3, 1, 0, 0],
954 | [0, 1, 4, 4, 1, 1, 0],
955 | [0, 1, 1, 4, 3, 1, 0],
956 | [0, 1, 1, 0, 0, 0, 0],
957 | [0, 0, 0, 0, 1, 1, 1]
958 | ],
959 | [
960 | [1, 1, 0, 0, 0, 0, 0],
961 | [1, 1, 0, 1, 1, 1, 0],
962 | [0, 0, 0, 1, 0, 1, 0],
963 | [0, 4, 1, 1, 1, 4, 0],
964 | [0, 1, 0, 3, 0, 1, 0],
965 | [0, 1, 3, 2, 3, 1, 0],
966 | [0, 1, 0, 3, 0, 1, 0],
967 | [0, 4, 1, 1, 1, 4, 0],
968 | [0, 0, 0, 0, 0, 0, 0]
969 | ],
970 | [
971 | [0, 0, 0, 0, 0, 0, 0],
972 | [0, 1, 1, 1, 1, 1, 0],
973 | [0, 1, 4, 3, 4, 1, 0],
974 | [0, 1, 3, 2, 3, 1, 0],
975 | [0, 1, 4, 3, 4, 1, 0],
976 | [0, 1, 1, 1, 1, 1, 0],
977 | [0, 0, 0, 0, 1, 1, 0],
978 | [1, 1, 1, 0, 0, 0, 0]
979 | ],
980 | [
981 | [1, 1, 1, 1, 0, 0, 0, 0, 1],
982 | [1, 1, 1, 1, 0, 1, 1, 0, 1],
983 | [1, 1, 1, 1, 0, 2, 3, 0, 1],
984 | [0, 0, 0, 0, 0, 1, 1, 0, 0],
985 | [0, 1, 1, 1, 0, 0, 1, 1, 0],
986 | [0, 1, 3, 3, 4, 4, 4, 4, 0],
987 | [0, 1, 1, 3, 1, 0, 0, 0, 0],
988 | [0, 1, 1, 1, 0, 0, 1, 1, 1],
989 | [0, 0, 1, 1, 0, 1, 1, 1, 1],
990 | [1, 0, 0, 0, 0, 1, 1, 1, 1]
991 | ],
992 | [
993 | [0, 0, 0, 0, 0, 1],
994 | [0, 1, 1, 1, 0, 0],
995 | [0, 1, 1, 3, 1, 0],
996 | [0, 1, 3, 1, 2, 0],
997 | [0, 0, 0, 4, 1, 0],
998 | [1, 1, 0, 4, 0, 0],
999 | [1, 1, 0, 4, 1, 0],
1000 | [0, 0, 0, 4, 1, 0],
1001 | [0, 1, 1, 3, 1, 0],
1002 | [0, 1, 3, 1, 1, 0],
1003 | [0, 0, 1, 1, 0, 0],
1004 | [1, 0, 0, 0, 0, 1]
1005 | ],
1006 | [
1007 | [1, 0, 0, 0, 0, 1, 1],
1008 | [1, 0, 1, 1, 0, 1, 1],
1009 | [0, 0, 1, 1, 0, 0, 0],
1010 | [0, 1, 3, 1, 3, 1, 0],
1011 | [0, 1, 1, 4, 1, 4, 0],
1012 | [0, 0, 0, 2, 0, 1, 0],
1013 | [0, 1, 1, 4, 1, 4, 0],
1014 | [0, 1, 3, 1, 3, 1, 0],
1015 | [0, 0, 1, 1, 0, 0, 0],
1016 | [1, 0, 0, 0, 0, 1, 1]
1017 | ],
1018 | [
1019 | [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
1020 | [1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1],
1021 | [1, 0, 1, 1, 1, 3, 1, 1, 1, 0, 1],
1022 | [1, 0, 3, 1, 0, 0, 0, 1, 3, 0, 1],
1023 | [1, 0, 1, 0, 4, 4, 4, 0, 1, 0, 1],
1024 | [0, 0, 1, 0, 4, 4, 4, 0, 1, 0, 0],
1025 | [0, 1, 3, 1, 1, 3, 1, 1, 3, 1, 0],
1026 | [0, 1, 1, 1, 1, 1, 0, 1, 1, 2, 0],
1027 | [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
1028 | ],
1029 | [
1030 | [1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1],
1031 | [1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1],
1032 | [0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0],
1033 | [0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0],
1034 | [1, 0, 1, 1, 1, 2, 1, 1, 1, 0, 1],
1035 | [1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1],
1036 | [1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1],
1037 | [1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1],
1038 | [1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1]
1039 | ]
1040 | ]
1041 |
1042 | // 拓展关
1043 | export const expand = [
1044 | {
1045 | life: 4,
1046 | gameMap: [
1047 | [0, 0, 0, 0, 0, 0, 0, 0],
1048 | [0, 2, 5, 5, 5, 3, 4, 0],
1049 | [0, 0, 0, 0, 0, 0, 0, 0]
1050 | ]
1051 | },
1052 | {
1053 | life: 1,
1054 | gameMap: [
1055 | [0, 0, 0, 0, 0, 0, 0],
1056 | [0, 1, 1, 1, 1, 1, 0],
1057 | [0, 2, 5, 1, 3, 4, 0],
1058 | [0, 1, 1, 1, 1, 1, 0],
1059 | [0, 0, 0, 0, 0, 0, 0]
1060 | ]
1061 | },
1062 | {
1063 | life: 1,
1064 | gameMap: [
1065 | [1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0],
1066 | [1, 0, 4, 0, 0, 0, 1, 1, 1, 1, 0],
1067 | [1, 0, 1, 0, 0, 5, 1, 1, 3, 1, 0],
1068 | [1, 0, 1, 0, 0, 1, 1, 3, 0, 0, 0],
1069 | [1, 0, 1, 0, 1, 1, 3, 4, 1, 0, 1],
1070 | [1, 0, 1, 1, 1, 3, 0, 5, 1, 0, 1],
1071 | [0, 0, 1, 1, 3, 1, 1, 4, 1, 0, 1],
1072 | [0, 1, 5, 1, 1, 1, 1, 0, 0, 0, 1],
1073 | [0, 2, 1, 5, 1, 1, 5, 1, 0, 1, 1],
1074 | [0, 0, 4, 1, 1, 1, 1, 4, 0, 1, 1],
1075 | [1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1]
1076 | ]
1077 | },
1078 | {
1079 | life: 1,
1080 | gameMap: [
1081 | [0, 0, 0, 0, 0, 0, 0],
1082 | [0, 1, 1, 1, 1, 1, 0],
1083 | [0, 2, 7, 6, 1, 4, 0],
1084 | [0, 1, 1, 1, 1, 1, 0],
1085 | [0, 0, 0, 0, 0, 0, 0]
1086 | ]
1087 | },
1088 | {
1089 | life: 2,
1090 | gameMap: [
1091 | [0, 0, 0, 0, 0, 0, 0, 0, 0],
1092 | [0, 6, 4, 1, 1, 1, 4, 1, 0],
1093 | [0, 1, 6, 1, 1, 1, 6, 1, 0],
1094 | [0, 1, 1, 1, 7, 6, 1, 1, 0],
1095 | [0, 1, 1, 7, 2, 7, 6, 1, 0],
1096 | [0, 1, 1, 1, 7, 6, 1, 1, 0],
1097 | [0, 1, 6, 1, 1, 1, 6, 1, 0],
1098 | [0, 6, 4, 1, 1, 1, 4, 6, 0],
1099 | [0, 0, 0, 0, 0, 0, 0, 0, 0]
1100 | ]
1101 | },
1102 | {
1103 | life: 0,
1104 | gameMap: [
1105 | [0, 0, 0, 0, 0, 0, 0, 0],
1106 | [0, 1, 1, 0, 1, 1, 1, 0],
1107 | [0, 2, 9, 0, 1, 3, 4, 0],
1108 | [0, 1, 1, 0, 1, 1, 1, 0],
1109 | [0, 0, 0, 0, 0, 0, 0, 0]
1110 | ]
1111 | },
1112 | {
1113 | life: 1,
1114 | gameMap: [
1115 | [0, 0, 0, 0, 0, 0, 0, 0],
1116 | [0, 1, 1, 0, 1, 1, 11, 0],
1117 | [0, 2, 10, 0, 1, 3, 4, 0],
1118 | [0, 1, 1, 0, 1, 1, 11, 0],
1119 | [0, 0, 0, 0, 0, 0, 0, 0]
1120 | ]
1121 | },
1122 | {
1123 | life: 0,
1124 | gameMap: [
1125 | [0, 0, 0, 0, 0, 0, 0, 0],
1126 | [0, 2, 12, 0, 1, 1, 1, 0],
1127 | [0, 0, 1, 0, 1, 3, 4, 0],
1128 | [0, 1, 1, 1, 1, 1, 1, 0],
1129 | [0, 1, 1, 0, 1, 1, 1, 0],
1130 | [0, 0, 0, 0, 0, 0, 0, 0]
1131 | ]
1132 | },
1133 | {
1134 | life: 1,
1135 | gameMap: [
1136 | [0, 0, 0, 0, 0, 0, 0, 0],
1137 | [0, 2, 12, 0, 5, 1, 1, 0],
1138 | [0, 0, 1, 0, 1, 3, 4, 0],
1139 | [0, 1, 1, 1, 1, 5, 1, 0],
1140 | [0, 13, 1, 0, 1, 1, 1, 0],
1141 | [0, 0, 0, 0, 0, 0, 0, 0]
1142 | ]
1143 | },
1144 | {
1145 | life: 1,
1146 | gameMap: [
1147 | [0, 0, 0, 0, 0, 0, 0, 0, 0],
1148 | [0, 1, 1, 1, 1, 0, 5, 11, 0],
1149 | [0, 2, 1, 1, 3, 10, 1, 3, 0],
1150 | [0, 1, 8, 1, 1, 3, 1, 4, 0],
1151 | [0, 0, 0, 0, 1, 1, 1, 4, 0],
1152 | [0, 0, 4, 0, 1, 7, 1, 4, 0],
1153 | [0, 12, 3, 0, 1, 6, 1, 4, 0],
1154 | [0, 10, 11, 0, 0, 0, 0, 0, 0],
1155 | [0, 0, 0, 0, 1, 1, 1, 1, 1]
1156 | ]
1157 | }
1158 | ]
1159 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------