neu korrigieren

This commit is contained in:
mei 2022-09-22 01:19:42 +02:00
parent e8f95a4d4d
commit 1f300bbfbc
31 changed files with 7981 additions and 1576 deletions

7
images.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
declare module '*.svg'
declare module '*.png'
declare module '*.jpg'
declare module '*.jpeg'
declare module '*.gif'
declare module '*.bmp'
declare module '*.tiff'

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/logo.png" /> <link rel="icon" type="image/svg+xml" href="/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>鱼了个鱼</title> <title>喵了个喵</title>
<script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script> <script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
<script>LA.init({id: "JonPnywkOzKkLXdw",ck: "JonPnywkOzKkLXdw"})</script> <script>LA.init({id: "JonPnywkOzKkLXdw",ck: "JonPnywkOzKkLXdw"})</script>
</head> </head>

6468
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -11,8 +11,8 @@
"@ant-design/icons-vue": "^6.1.0", "@ant-design/icons-vue": "^6.1.0",
"ant-design-vue": "^3.2.11", "ant-design-vue": "^3.2.11",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"pinia": "^2.0.19", "pinia": "^2.0.22",
"pinia-plugin-persistedstate": "^2.1.1", "pinia-plugin-persistedstate": "^2.2.0",
"vue": "^3.2.37", "vue": "^3.2.37",
"vue-router": "4" "vue-router": "4"
}, },

View File

@ -8,7 +8,7 @@
<script setup lang="ts"></script> <script setup lang="ts"></script>
<style scoped> <style scoped>
#app { #app {
background: url("assets/bg.jpeg"); background: url("assets/bp.jpg");
padding: 16px 16px 50px; padding: 16px 16px 50px;
min-height: 100vh; min-height: 100vh;
background-size: 100% 100%; background-size: 100% 100%;

BIN
src/assets/alien.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
src/assets/bee.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

BIN
src/assets/bp.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
src/assets/cat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
src/assets/clock_alarm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
src/assets/crown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
src/assets/fish.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
src/assets/hamburger.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
src/assets/lemon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
src/assets/monster.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
src/assets/rake.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
src/assets/soccer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
src/assets/stop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
src/assets/strawberry.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src/assets/suitcase.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

BIN
src/assets/trash_can.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -1,13 +1,14 @@
<template> <template>
<div class="my-ad"> <!-- <div class="my-ad">
<a href="https://github.com/liyupi/yulegeyu" target="_blank"> <a href="https://github.com/MeiXue16" target="_blank">
<div style="background: rgba(0, 0, 0, 0.8); padding: 12px"> <div style="background: rgba(0, 0, 0, 0.8); padding: 12px">
<github-outlined /> <github-outlined />
代码完全开源欢迎 star 开源代码
</div> </div>
</a> </a>
<!-- <a href="https://space.bilibili.com/12890453/"> 欢迎关注程序员鱼皮 </a>--> -->
</div> <!-- <a href="https://space.bilibili.com/12890453/"> </a> -->
<!-- </div> -->
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { GithubOutlined } from "@ant-design/icons-vue"; import { GithubOutlined } from "@ant-design/icons-vue";

View File

@ -1,7 +1,7 @@
/** /**
* V2 level * V2 level
* *
* @author yupi https://github.com/liyupi *
*/ */
import { useGlobalStore } from "./globalStore"; import { useGlobalStore } from "./globalStore";
// @ts-ignore // @ts-ignore
@ -231,7 +231,7 @@ const useGame = () => {
let newPosY; let newPosY;
let key; let key;
while (true) { while (true) {
newPosX = Math.floor(Math.random() * maxX + minX); newPosX = Math.floor(Math.random() * (maxX + minX));
newPosY = Math.floor(Math.random() * maxY + minY); newPosY = Math.floor(Math.random() * maxY + minY);
key = newPosX + "," + newPosY; key = newPosX + "," + newPosY;
// 同批次元素不能完全重叠 // 同批次元素不能完全重叠

View File

@ -1,35 +1,64 @@
// <template> <div id="div1"></div> </template>
// 动物数组 // 动物数组
const animals = [ const animals = [
"🐔", '✂',
"🐟", '🤡',
"🦆", '🐾',
"🐶", '🐝',
"🐱", '🎄',
"🐴", '🏐',
"🐑", '🍔',
"🐦", '🍜',
"🐧", '🍓',
"🐊", '🍦',
"🐺", '🍐',
"🐒", '🚦',
"🐳", '💦',
"🐬", '🥐',
"🐢", '🍑',
"🦖", '🍩',
"🦒", '🍋',
"🦁", '🍨',
"🐍", '🥑',
"🐭", '⚽',
"🐂", '🧀',
]; '🍖',
'🍭',
];
// let text = "<div>";
// defaultGameConfig.animals.forEach(myFunk);
// text += "</div>";
// document.getElementById("form_item_animalStr").innerHTML = text;
// const animals = text;
// function myFunk(value) {
// text += "<img src=" + value + "/>";
// }
// function trImg(arr){
// var imgAll = []; //定义一个空数组用于存放转换后的对象
// for(var i in arr){
// imgAll[i] = new Image();//将新数组的每个对象定义为图片对象
// imgAll[i].src = arr[i];//定义图片对象的地址为原数组中的图片地址
// }
// return imgAll;
// }
// const animals =trImg(animal);
// declare function require(string): string;
// // const i1 = require('../assets/alien.png');
// import img1 from '../assets/alien.png';
// import img2 from '../assets/bee.png';
export const defaultGameConfig: GameConfigType = { export const defaultGameConfig: GameConfigType = {
// 槽容量 // 槽容量
slotNum: 7, slotNum: 7,
// 需要多少个一样块的才能合成 // 需要多少个一样块的才能合成
composeNum: 3, composeNum: 3,
// 动物类别数 // 动物类别数
typeNum: 12, typeNum: 10,
// 每层块数(大致) // 每层块数(大致)
levelBlockNum: 24, levelBlockNum: 24,
// 边界收缩步长 // 边界收缩步长
@ -161,9 +190,9 @@ export const yangGameConfig: GameConfigType = {
// 需要多少个一样块的才能合成 // 需要多少个一样块的才能合成
composeNum: 3, composeNum: 3,
// 动物类别数 // 动物类别数
typeNum: 18, typeNum: 16,
// 每层块数(大致) // 每层块数(大致)
levelBlockNum: 28, levelBlockNum: 24,
// 边界收缩步长 // 边界收缩步长
borderStep: 3, borderStep: 3,
// 总层数(最小为 2 // 总层数(最小为 2

View File

@ -4,7 +4,7 @@ import { defaultGameConfig } from "./gameConfig";
/** /**
* *
* *
* @author yupi *
*/ */
export const useGlobalStore = defineStore("global", { export const useGlobalStore = defineStore("global", {
state: () => ({ state: () => ({

View File

@ -17,10 +17,10 @@
<a-form-item label="合成数" name="composeNum"> <a-form-item label="合成数" name="composeNum">
<a-input-number v-model:value="config.composeNum" /> <a-input-number v-model:value="config.composeNum" />
</a-form-item> </a-form-item>
<a-form-item label="动物数" name="typeNum"> <a-form-item label="图案种类" name="typeNum">
<a-input-number v-model:value="config.typeNum" /> <a-input-number v-model:value="config.typeNum" />
</a-form-item> </a-form-item>
<a-form-item label="动物图案" name="animalStr"> <a-form-item label="图案" name="animalStr">
<a-input v-model:value="config.animalStr" /> <a-input v-model:value="config.animalStr" />
</a-form-item> </a-form-item>
<a-form-item label="总层数" name="levelNum"> <a-form-item label="总层数" name="levelNum">

View File

@ -8,8 +8,8 @@
<a-row align="center"> <a-row align="center">
<div v-if="gameStatus === 3" style="text-align: center"> <div v-if="gameStatus === 3" style="text-align: center">
<h2>恭喜你赢啦🎉</h2> <h2>恭喜你赢啦🎉</h2>
<img alt="程序员鱼皮" src="../assets/kunkun.png" /> <!-- <img alt="" src="../assets/kunkun.png" /> -->
<my-ad style="margin-top: 16px" /> <!-- <my-ad style="margin-top: 16px" /> -->
</div> </div>
</a-row> </a-row>
<!-- 分层选块 --> <!-- 分层选块 -->
@ -141,7 +141,7 @@ onMounted(() => {
} }
.slot-board { .slot-board {
border: 10px solid saddlebrown; border: 10px solid hsl(196, 51%, 70%);
margin: 16px auto; margin: 16px auto;
width: fit-content; width: fit-content;
} }
@ -155,15 +155,18 @@ onMounted(() => {
width: 42px; width: 42px;
height: 42px; height: 42px;
line-height: 42px; line-height: 42px;
border: 1px solid #eee; border: 0.5px hsl(194, 0%, 30%);
background: white; /* transform: translate(0, -15%) rotate(-4deg); */
/* transform-origin: center center; */
box-shadow: 2px 2px 2px 2px hsl(130, 30%, 72%);
background: hsl(0, 8%, 94%);
text-align: center; text-align: center;
vertical-align: top; vertical-align: top;
display: inline-block; display: inline-block;
} }
.disabled { .disabled {
background: grey; background: hsl(204, 8%, 70%);
cursor: not-allowed; cursor: not-allowed;
} }
</style> </style>

View File

@ -1,28 +1,28 @@
<template> <template>
<div id="indexPage"> <div id="indexPage">
<h1>🐟 鱼了个鱼</h1> <h1>喵了个喵ฅʕ̫͡ʔฅ</h1>
<div style="margin-bottom: 16px">低配版羊了个羊小游戏仅供消遣</div> <div style="margin-bottom: 16px">改编自鱼了个鱼</div>
<a-button <!-- <a-button
block block
style="margin-bottom: 16px" style="margin-bottom: 16px"
@click="toGamePage(easyGameConfig)" @click="toGamePage(easyGameConfig)"
> > -->
简单模式 <!-- 简单模式
</a-button> </a-button>
<a-button <a-button
block block
style="margin-bottom: 16px" style="margin-bottom: 16px"
@click="toGamePage(middleGameConfig)" @click="toGamePage(middleGameConfig)" -->
> <!-- > -->
中等模式 <!-- 中等模式
</a-button> </a-button>
<a-button <a-button
block block
style="margin-bottom: 16px" style="margin-bottom: 16px"
@click="toGamePage(hardGameConfig)" @click="toGamePage(hardGameConfig)"
> > -->
困难模式 <!-- 困难模式 -->
</a-button> <!-- </a-button> -->
<a-button <a-button
block block
style="margin-bottom: 16px" style="margin-bottom: 16px"
@ -30,13 +30,13 @@
> >
地狱模式 地狱模式
</a-button> </a-button>
<a-button <!-- <a-button
block block
style="margin-bottom: 16px" style="margin-bottom: 16px"
@click="toGamePage(skyGameConfig)" @click="toGamePage(skyGameConfig)"
> >
天域模式 天域模式
</a-button> </a-button> -->
<a-button <a-button
block block
style="margin-bottom: 16px" style="margin-bottom: 16px"
@ -49,18 +49,12 @@
</a-button> </a-button>
<my-ad /> <my-ad />
<div class="footer"> <div class="footer">
鱼了个鱼 ©2022 by 喵了个喵 ©2022 by
<a href="https://github.com/liyupi" target="_blank" style="color: #fff"> <a href="https://github.com/MeiXue16" target="_blank" style="color: #fff">
程序员鱼皮 Mei
</a> </a>
| |
<a <a href=" " target="_blank" style="color: #fff"> 代码开源 </a>
href="https://github.com/liyupi/yulegeyu"
target="_blank"
style="color: #fff"
>
代码开源
</a>
</div> </div>
</div> </div>
</template> </template>
@ -68,11 +62,11 @@
<script setup lang="ts"> <script setup lang="ts">
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { import {
easyGameConfig, // easyGameConfig,
middleGameConfig, // middleGameConfig,
hardGameConfig, // hardGameConfig,
lunaticGameConfig, lunaticGameConfig,
skyGameConfig, // skyGameConfig,
yangGameConfig, yangGameConfig,
} from "../core/gameConfig"; } from "../core/gameConfig";
import { useGlobalStore } from "../core/globalStore"; import { useGlobalStore } from "../core/globalStore";

View File

@ -13,6 +13,6 @@
"lib": ["ESNext", "DOM"], "lib": ["ESNext", "DOM"],
"skipLibCheck": true "skipLibCheck": true
}, },
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "images.d.ts"],
"references": [{ "path": "./tsconfig.node.json" }] "references": [{ "path": "./tsconfig.node.json" }]
} }

2909
yarn.lock

File diff suppressed because it is too large Load Diff