update
This commit is contained in:
parent
9e94db9d7a
commit
8ea3174625
@ -86,8 +86,8 @@ func (this *MapData) SwapGirde(oldId, newId int32) (bSwap bool) {
|
||||
func (this *MapData) SetMap() {
|
||||
sz2 := []int32{
|
||||
5, 1, 2, 5, 1, 5, 2,
|
||||
3, 1, 5, 4, 2, 4, 4,
|
||||
4, 4, 2, 1, 6, 4, 1,
|
||||
5, 1, 5, 4, 2, 4, 4,
|
||||
4, 5, 5, 1, 6, 4, 1,
|
||||
6, 3, 1, 4, 3, 6, 3,
|
||||
6, 1, 3, 5, 1, 6, 1,
|
||||
5, 6, 5, 5, 1, 3, 1,
|
||||
@ -468,10 +468,12 @@ func (this *MapData) CheckMap(color int32) (score int32, szMap []*pb.MapData, co
|
||||
|
||||
score += curScore // 总分
|
||||
this.DropGirde()
|
||||
szMap = append(szMap, &pb.MapData{
|
||||
Data: this.Plat,
|
||||
CurSocre: curScore,
|
||||
})
|
||||
if curScore > 0 {
|
||||
szMap = append(szMap, &pb.MapData{
|
||||
Data: this.Plat,
|
||||
CurSocre: curScore,
|
||||
})
|
||||
}
|
||||
// 检查掉落
|
||||
this.operElem = []int32{} // 初始化操作元素
|
||||
if curScore == 0 {
|
||||
@ -523,8 +525,9 @@ func (this *MapData) AiSwapGirde() (bSwap bool, szMap []*pb.MapData, oid1 int32,
|
||||
if s, m, _ := this.CheckMap(2); s == 0 {
|
||||
this.SwapGirde(int32(pos+1), int32(pos))
|
||||
this.operElem = []int32{}
|
||||
oid1 = 0
|
||||
oid2 = 0
|
||||
} else {
|
||||
|
||||
szMap = append(szMap, m...)
|
||||
bSwap = true
|
||||
break
|
||||
@ -538,6 +541,8 @@ func (this *MapData) AiSwapGirde() (bSwap bool, szMap []*pb.MapData, oid1 int32,
|
||||
if s, m, _ := this.CheckMap(2); s == 0 {
|
||||
this.SwapGirde(int32(pos+Width), int32(pos))
|
||||
this.operElem = []int32{}
|
||||
oid1 = 0
|
||||
oid2 = 0
|
||||
} else {
|
||||
szMap = append(szMap, m...)
|
||||
bSwap = true
|
||||
|
Loading…
Reference in New Issue
Block a user