From 6d86f3a05b4465d8b2a6851fd73c78689df49a03 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 20 Oct 2023 22:55:06 +0800 Subject: [PATCH] =?UTF-8?q?AI=E7=A7=BB=E5=8A=A8=E5=85=83=E7=B4=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/entertainment/xxlPlat.go | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/modules/entertainment/xxlPlat.go b/modules/entertainment/xxlPlat.go index 8c45ee8ee..025b7e9f5 100644 --- a/modules/entertainment/xxlPlat.go +++ b/modules/entertainment/xxlPlat.go @@ -85,14 +85,15 @@ func (this *MapData) SetMap() { 3, 1, 5, 4, 2, 4, 4, 4, 4, 2, 1, 6, 4, 1, 6, 3, 1, 4, 3, 6, 3, - 6, 3, 3, 1, 1, 6, 1, + 6, 1, 3, 5, 1, 6, 1, 5, 6, 5, 5, 1, 3, 1, - 6, 5, 5, 1, 2, 1, 4, + 6, 1, 5, 1, 2, 1, 4, } var pos int for index := Width - 1; index >= 0; index-- { for j := 0; j < Height; j++ { this.Plat[index+j*Height].Color = sz2[pos] + this.Plat[index+j*Height].Cid = sz2[pos] pos++ } } @@ -456,14 +457,23 @@ func (this *MapData) AiSwapGirde() bool { y := pos % Height if y < Height-1 { if b, _ := this.SwapGirde(int32(pos), int32(pos+1), 2); b { - bSwap = true - break + if s, _, _ := this.CheckMap(2); s == 0 { + this.SwapGirde(int32(pos+1), int32(pos), 2) + } else { + bSwap = true + break + } + } } if pos/Width+1 < Width { if b, _ := this.SwapGirde(int32(pos), int32(pos+Width), 2); b { - bSwap = true - break + if s, _, _ := this.CheckMap(2); s == 0 { + this.SwapGirde(int32(pos+Width), int32(pos), 2) + } else { + bSwap = true + break + } } } }