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" />
<link rel="icon" type="image/svg+xml" href="/logo.png" />
<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>LA.init({id: "JonPnywkOzKkLXdw",ck: "JonPnywkOzKkLXdw"})</script>
</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-vue": "^3.2.11",
"lodash": "^4.17.21",
"pinia": "^2.0.19",
"pinia-plugin-persistedstate": "^2.1.1",
"pinia": "^2.0.22",
"pinia-plugin-persistedstate": "^2.2.0",
"vue": "^3.2.37",
"vue-router": "4"
},

View File

@ -8,7 +8,7 @@
<script setup lang="ts"></script>
<style scoped>
#app {
background: url("assets/bg.jpeg");
background: url("assets/bp.jpg");
padding: 16px 16px 50px;
min-height: 100vh;
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>
<div class="my-ad">
<a href="https://github.com/liyupi/yulegeyu" target="_blank">
<!-- <div class="my-ad">
<a href="https://github.com/MeiXue16" target="_blank">
<div style="background: rgba(0, 0, 0, 0.8); padding: 12px">
<github-outlined />
代码完全开源欢迎 star
开源代码
</div>
</a>
<!-- <a href="https://space.bilibili.com/12890453/"> 欢迎关注程序员鱼皮 </a>-->
</div>
-->
<!-- <a href="https://space.bilibili.com/12890453/"> </a> -->
<!-- </div> -->
</template>
<script setup lang="ts">
import { GithubOutlined } from "@ant-design/icons-vue";

View File

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

View File

@ -1,35 +1,64 @@
// <template> <div id="div1"></div> </template>
// 动物数组
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 = {
// 槽容量
slotNum: 7,
// 需要多少个一样块的才能合成
composeNum: 3,
// 动物类别数
typeNum: 12,
typeNum: 10,
// 每层块数(大致)
levelBlockNum: 24,
// 边界收缩步长
@ -161,9 +190,9 @@ export const yangGameConfig: GameConfigType = {
// 需要多少个一样块的才能合成
composeNum: 3,
// 动物类别数
typeNum: 18,
typeNum: 16,
// 每层块数(大致)
levelBlockNum: 28,
levelBlockNum: 24,
// 边界收缩步长
borderStep: 3,
// 总层数(最小为 2

View File

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

View File

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

View File

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

View File

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

View File

@ -13,6 +13,6 @@
"lib": ["ESNext", "DOM"],
"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" }]
}

2909
yarn.lock

File diff suppressed because it is too large Load Diff