|
@@ -2,34 +2,18 @@
|
|
|
* @Author: mojunshou 1637302775@qq.com
|
|
* @Author: mojunshou 1637302775@qq.com
|
|
|
* @Date: 2025-03-20 15:01:09
|
|
* @Date: 2025-03-20 15:01:09
|
|
|
* @LastEditors: mojunshou 1637302775@qq.com
|
|
* @LastEditors: mojunshou 1637302775@qq.com
|
|
|
- * @LastEditTime: 2025-03-27 18:40:24
|
|
|
|
|
|
|
+ * @LastEditTime: 2025-03-28 11:47:41
|
|
|
* @Description: 消除游戏主场景
|
|
* @Description: 消除游戏主场景
|
|
|
*/
|
|
*/
|
|
|
-import { _decorator } from "cc";
|
|
|
|
|
|
|
+import { _decorator, Color, EventTouch, instantiate, JsonAsset, Label, Node, Prefab, randomRangeInt, Sprite, Toggle, tween, UITransform, Vec2, Vec3, Widget } from "cc";
|
|
|
|
|
+import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
|
|
|
import { oops } from "db://oops-framework/core/Oops";
|
|
import { oops } from "db://oops-framework/core/Oops";
|
|
|
import { ecs } from "db://oops-framework/libs/ecs/ECS";
|
|
import { ecs } from "db://oops-framework/libs/ecs/ECS";
|
|
|
|
|
+import { LabelChange } from "db://oops-framework/libs/gui/label/LabelChange";
|
|
|
import { CCComp } from "db://oops-framework/module/common/CCComp";
|
|
import { CCComp } from "db://oops-framework/module/common/CCComp";
|
|
|
|
|
+import { GameEvent } from "../../common/config/GameEvent";
|
|
|
import { UIID } from "../../common/config/GameUIConfig";
|
|
import { UIID } from "../../common/config/GameUIConfig";
|
|
|
-import { Node } from "cc";
|
|
|
|
|
-import { Toggle } from "cc";
|
|
|
|
|
-import { ToggleContainer } from "cc";
|
|
|
|
|
-import { Prefab } from "cc";
|
|
|
|
|
-import { LabelChange } from "db://oops-framework/libs/gui/label/LabelChange";
|
|
|
|
|
-import { Label } from "cc";
|
|
|
|
|
-import { Vec3 } from "cc";
|
|
|
|
|
import { BlockItemView } from "./BlockItemView";
|
|
import { BlockItemView } from "./BlockItemView";
|
|
|
-import { UITransform } from "cc";
|
|
|
|
|
-import { instantiate } from "cc";
|
|
|
|
|
-import { Sprite } from "cc";
|
|
|
|
|
-import { Color } from "cc";
|
|
|
|
|
-import { RandomManager } from "db://oops-framework/core/common/random/RandomManager";
|
|
|
|
|
-import { Widget } from "cc";
|
|
|
|
|
-import { JsonAsset } from "cc";
|
|
|
|
|
-import { randomRangeInt } from "cc";
|
|
|
|
|
-import { EventTouch } from "cc";
|
|
|
|
|
-import { Vec2 } from "cc";
|
|
|
|
|
-import { tween } from "cc";
|
|
|
|
|
-import { GameEvent } from "../../common/config/GameEvent";
|
|
|
|
|
|
|
|
|
|
const { ccclass, property } = _decorator;
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
|
@@ -211,6 +195,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
await this.loadConfig();
|
|
await this.loadConfig();
|
|
|
this.initGrid();
|
|
this.initGrid();
|
|
|
this.initData();
|
|
this.initData();
|
|
|
|
|
+ this.addEventList();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -233,6 +218,20 @@ export class EliminateViewComp extends CCComp {
|
|
|
this.autoOnToggle = toggle.getComponent(Toggle)!;
|
|
this.autoOnToggle = toggle.getComponent(Toggle)!;
|
|
|
this.lab_speed = this.node.getChildByPath("Scene/Bottom/btn_double/lab_time")!.uiLabel;
|
|
this.lab_speed = this.node.getChildByPath("Scene/Bottom/btn_double/lab_time")!.uiLabel;
|
|
|
this.lab_speed.string = "二倍速"
|
|
this.lab_speed.string = "二倍速"
|
|
|
|
|
+
|
|
|
|
|
+ // this.brickNode.on(Node.EventType.TOUCH_START, (event: EventTouch) => {
|
|
|
|
|
+ // const touch = event.touch;
|
|
|
|
|
+ // console.log("iiiiii", touch)
|
|
|
|
|
+
|
|
|
|
|
+ // }, this);
|
|
|
|
|
+ // this.brickNode.on(Node.EventType.TOUCH_MOVE, () => {
|
|
|
|
|
+
|
|
|
|
|
+ // console.log("22222")
|
|
|
|
|
+
|
|
|
|
|
+ // }, this);
|
|
|
|
|
+ // this.brickNode.on(Node.EventType.TOUCH_END, () => {
|
|
|
|
|
+ // console.log("333333")
|
|
|
|
|
+ // }, this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -481,8 +480,11 @@ export class EliminateViewComp extends CCComp {
|
|
|
if (this.brickNode) {
|
|
if (this.brickNode) {
|
|
|
this.brickNode.addChild(brickNode)
|
|
this.brickNode.addChild(brickNode)
|
|
|
}
|
|
}
|
|
|
- brickData.brickNode = brickNode
|
|
|
|
|
|
|
+ brickData.brickNode = brickNode;
|
|
|
// 方块间隔
|
|
// 方块间隔
|
|
|
|
|
+
|
|
|
|
|
+ //这里修改一下,分别放到3个Node中,然后
|
|
|
|
|
+
|
|
|
let offset = 220
|
|
let offset = 220
|
|
|
if (this.brickNum % 2 === 1) {
|
|
if (this.brickNum % 2 === 1) {
|
|
|
const middleNum = Math.floor(this.brickNum / 2) + 1
|
|
const middleNum = Math.floor(this.brickNum / 2) + 1
|
|
@@ -494,18 +496,16 @@ export class EliminateViewComp extends CCComp {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (brickData && brickData.brickNode) {
|
|
if (brickData && brickData.brickNode) {
|
|
|
- let width = 0;
|
|
|
|
|
- if (this.brickNode) {
|
|
|
|
|
- width = this.brickNode.getComponent(UITransform)!.width;
|
|
|
|
|
- }
|
|
|
|
|
brickData.brickNode.setPosition(offset, 0)
|
|
brickData.brickNode.setPosition(offset, 0)
|
|
|
brickData.brickNode.scale_x = 0.6;
|
|
brickData.brickNode.scale_x = 0.6;
|
|
|
brickData.brickNode.scale_y = 0.6;
|
|
brickData.brickNode.scale_y = 0.6;
|
|
|
brickData.brickInitPos = brickData.brickNode.getWorldPosition()
|
|
brickData.brickInitPos = brickData.brickNode.getWorldPosition()
|
|
|
- this.brickAddEvent(brickData);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ this.brickAddEvent(brickData);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 每个item生成独立的方块节点
|
|
// 每个item生成独立的方块节点
|
|
|
generateBrick(brickKey: string, randomIndex: number) {
|
|
generateBrick(brickKey: string, randomIndex: number) {
|
|
|
const brickConfig = this.brickConfig['bricks'][brickKey]
|
|
const brickConfig = this.brickConfig['bricks'][brickKey]
|
|
@@ -532,14 +532,17 @@ export class EliminateViewComp extends CCComp {
|
|
|
// 生成独立的方块节点
|
|
// 生成独立的方块节点
|
|
|
const brickNode = new Node()
|
|
const brickNode = new Node()
|
|
|
brickNode.name = brickKey
|
|
brickNode.name = brickKey
|
|
|
|
|
+ // 设置方块大小
|
|
|
const transformCom: UITransform = brickNode.addComponent(UITransform)
|
|
const transformCom: UITransform = brickNode.addComponent(UITransform)
|
|
|
transformCom.setContentSize(
|
|
transformCom.setContentSize(
|
|
|
this.itemSize * columnNum,
|
|
this.itemSize * columnNum,
|
|
|
this.itemSize * rowNum
|
|
this.itemSize * rowNum
|
|
|
)
|
|
)
|
|
|
transformCom.setAnchorPoint(0.5, 0.5)
|
|
transformCom.setAnchorPoint(0.5, 0.5)
|
|
|
|
|
+
|
|
|
|
|
+ // 设置方块位置
|
|
|
const gridPrefab = this.itemPrefabs[randomIndex]
|
|
const gridPrefab = this.itemPrefabs[randomIndex]
|
|
|
- //生成对应的配置方块
|
|
|
|
|
|
|
+ //生成对应的配置方块设置地址
|
|
|
brickConfig['gridConfig'].forEach((gridConfigData: GridConfigData) => {
|
|
brickConfig['gridConfig'].forEach((gridConfigData: GridConfigData) => {
|
|
|
const gridNode = new Node()
|
|
const gridNode = new Node()
|
|
|
gridNode.name = 'grid'
|
|
gridNode.name = 'grid'
|
|
@@ -559,13 +562,17 @@ export class EliminateViewComp extends CCComp {
|
|
|
this.itemSize,
|
|
this.itemSize,
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
- node.on(Node.EventType.TOUCH_END, () => {
|
|
|
|
|
- console.log("结束")
|
|
|
|
|
- })
|
|
|
|
|
- // 设置位置
|
|
|
|
|
node.setPosition(Vec3.ZERO)
|
|
node.setPosition(Vec3.ZERO)
|
|
|
|
|
+ node.on(Node.EventType.TOUCH_START, (event: EventTouch) => {
|
|
|
|
|
+ event.preventSwallow = true;
|
|
|
|
|
+ }, this);
|
|
|
|
|
+ node.on(Node.EventType.TOUCH_MOVE, (event: EventTouch) => {
|
|
|
|
|
+ event.preventSwallow = true;
|
|
|
|
|
+ }, this);
|
|
|
|
|
+ node.on(Node.EventType.TOUCH_END, (event: EventTouch) => {
|
|
|
|
|
+ event.preventSwallow = true;
|
|
|
|
|
+ }, this);
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
return brickNode
|
|
return brickNode
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -574,21 +581,34 @@ export class EliminateViewComp extends CCComp {
|
|
|
brickAddEvent(brickData: BrickData) {
|
|
brickAddEvent(brickData: BrickData) {
|
|
|
const brickNode = brickData.brickNode
|
|
const brickNode = brickData.brickNode
|
|
|
if (!brickNode) {
|
|
if (!brickNode) {
|
|
|
- console.log("打印进这里来了")
|
|
|
|
|
|
|
+ console.error("brickNode为空,无法添加事件");
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 确保节点可交互
|
|
|
|
|
+ brickNode.active = true;
|
|
|
|
|
+
|
|
|
|
|
+ // 移除可能存在的旧事件监听器,防止重复添加
|
|
|
|
|
+ brickNode.off(Node.EventType.TOUCH_START);
|
|
|
|
|
+ brickNode.off(Node.EventType.TOUCH_MOVE);
|
|
|
|
|
+ brickNode.off(Node.EventType.TOUCH_END);
|
|
|
|
|
+
|
|
|
|
|
+ // 添加调试日志
|
|
|
|
|
+ console.log(`为节点 ${brickNode.name} 添加触摸事件监听器`);
|
|
|
|
|
+
|
|
|
|
|
+ // 添加触摸开始事件
|
|
|
brickNode.on(Node.EventType.TOUCH_START, (event: EventTouch) => {
|
|
brickNode.on(Node.EventType.TOUCH_START, (event: EventTouch) => {
|
|
|
- // if (this.adShowingFlag) return
|
|
|
|
|
|
|
+ console.log("触发TOUCH_START事件");
|
|
|
// 未操作完时不能操作下一个方块
|
|
// 未操作完时不能操作下一个方块
|
|
|
if (this.editingFlag) return
|
|
if (this.editingFlag) return
|
|
|
this.touchStartFlag = true
|
|
this.touchStartFlag = true
|
|
|
this.editingFlag = true
|
|
this.editingFlag = true
|
|
|
this.editingData.brickData = null
|
|
this.editingData.brickData = null
|
|
|
this.editingData.gridList.length = 0
|
|
this.editingData.gridList.length = 0
|
|
|
- // 隐藏游戏提示
|
|
|
|
|
- // this.gameTipNode.active = false
|
|
|
|
|
|
|
+
|
|
|
// 记录开始触摸的位置,用于结束触摸时,判断位置是否是单击
|
|
// 记录开始触摸的位置,用于结束触摸时,判断位置是否是单击
|
|
|
this.touchStartLocation.set(event.getUILocation())
|
|
this.touchStartLocation.set(event.getUILocation())
|
|
|
|
|
+
|
|
|
// 添加到移动节点里进行移动
|
|
// 添加到移动节点里进行移动
|
|
|
const pos = brickNode.getWorldPosition()
|
|
const pos = brickNode.getWorldPosition()
|
|
|
brickNode.setParent(this.moveNode)
|
|
brickNode.setParent(this.moveNode)
|
|
@@ -605,6 +625,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
} else {
|
|
} else {
|
|
|
console.error("bricksList not find brickData:", brickData)
|
|
console.error("bricksList not find brickData:", brickData)
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 清除旋转数据
|
|
// 清除旋转数据
|
|
|
if (this.rotateFlag && this.rotateBrickData !== this.editingData.brickData) {
|
|
if (this.rotateFlag && this.rotateBrickData !== this.editingData.brickData) {
|
|
|
this.rotateFlag = false
|
|
this.rotateFlag = false
|
|
@@ -613,11 +634,14 @@ export class EliminateViewComp extends CCComp {
|
|
|
this.rotateNode.children.forEach(node => { node.destroy() })
|
|
this.rotateNode.children.forEach(node => { node.destroy() })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
- // 触摸移动时
|
|
|
|
|
|
|
+ }, this);
|
|
|
|
|
+
|
|
|
|
|
+ // 触摸移动事件
|
|
|
brickNode.on(Node.EventType.TOUCH_MOVE, (event: EventTouch) => {
|
|
brickNode.on(Node.EventType.TOUCH_MOVE, (event: EventTouch) => {
|
|
|
|
|
+
|
|
|
// 防止如放回方块回弹动画时,已经触摸在另一个方块上面,从而导致异常错误
|
|
// 防止如放回方块回弹动画时,已经触摸在另一个方块上面,从而导致异常错误
|
|
|
if (this.editingData.brickData !== brickData) return
|
|
if (this.editingData.brickData !== brickData) return
|
|
|
|
|
+
|
|
|
// 清除旋转数据
|
|
// 清除旋转数据
|
|
|
if (event.getUILocation().subtract(this.touchStartLocation).length() >= this.rotateFaultTolerant) {
|
|
if (event.getUILocation().subtract(this.touchStartLocation).length() >= this.rotateFaultTolerant) {
|
|
|
this.rotateFlag = false
|
|
this.rotateFlag = false
|
|
@@ -626,12 +650,16 @@ export class EliminateViewComp extends CCComp {
|
|
|
this.rotateNode.children.forEach(node => { node.destroy() })
|
|
this.rotateNode.children.forEach(node => { node.destroy() })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 格子颜色恢复
|
|
// 格子颜色恢复
|
|
|
this.gridColorRecovery()
|
|
this.gridColorRecovery()
|
|
|
|
|
+
|
|
|
// 移动
|
|
// 移动
|
|
|
brickNode.setWorldPosition(brickNode.getWorldPosition().add(event.getUIDelta().toVec3()))
|
|
brickNode.setWorldPosition(brickNode.getWorldPosition().add(event.getUIDelta().toVec3()))
|
|
|
|
|
+
|
|
|
// 每次移动重置数据
|
|
// 每次移动重置数据
|
|
|
this.editingData.gridList.length = 0
|
|
this.editingData.gridList.length = 0
|
|
|
|
|
+
|
|
|
// 实时获取方块位置判断在哪个格子上
|
|
// 实时获取方块位置判断在哪个格子上
|
|
|
const tempGridList: GridData[] = []
|
|
const tempGridList: GridData[] = []
|
|
|
brickNode.children.forEach((brickGridNode) => {
|
|
brickNode.children.forEach((brickGridNode) => {
|
|
@@ -653,6 +681,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
}
|
|
}
|
|
|
tempGridList.push(gridData)
|
|
tempGridList.push(gridData)
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
// 检查整体情况
|
|
// 检查整体情况
|
|
|
let checkFlag = false
|
|
let checkFlag = false
|
|
|
if (
|
|
if (
|
|
@@ -664,6 +693,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
this.editingData.gridList.push(gridData)
|
|
this.editingData.gridList.push(gridData)
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 格子给用户提示
|
|
// 格子给用户提示
|
|
|
tempGridList.forEach((gridData) => {
|
|
tempGridList.forEach((gridData) => {
|
|
|
if (gridData.status !== CellState.EMPTY) {
|
|
if (gridData.status !== CellState.EMPTY) {
|
|
@@ -678,18 +708,22 @@ export class EliminateViewComp extends CCComp {
|
|
|
// 用于恢复格子
|
|
// 用于恢复格子
|
|
|
this.gridColorList.push(gridData)
|
|
this.gridColorList.push(gridData)
|
|
|
})
|
|
})
|
|
|
- })
|
|
|
|
|
|
|
+ }, this);
|
|
|
|
|
|
|
|
- // 触摸结束
|
|
|
|
|
|
|
+ // 触摸结束事件
|
|
|
brickNode.on(Node.EventType.TOUCH_END, (event: EventTouch) => {
|
|
brickNode.on(Node.EventType.TOUCH_END, (event: EventTouch) => {
|
|
|
- console.log("移动结束数据查看", this.editingData.gridList.length);
|
|
|
|
|
- console.log("brickData数据查看", this.editingData.brickData);
|
|
|
|
|
|
|
+ console.log("触发TOUCH_END事件", this.touchStartFlag);
|
|
|
|
|
+
|
|
|
|
|
+ // 防止事件冒泡
|
|
|
|
|
+ event.propagationStopped = true;
|
|
|
|
|
+
|
|
|
// 当连击很快时,会出现1次start,2次end情况,为了避免所以通过标志位表示是一个连贯操作
|
|
// 当连击很快时,会出现1次start,2次end情况,为了避免所以通过标志位表示是一个连贯操作
|
|
|
if (!this.touchStartFlag) return
|
|
if (!this.touchStartFlag) return
|
|
|
this.touchStartFlag = false
|
|
this.touchStartFlag = false
|
|
|
- // console.log("TOUCH_END", this.editingFlag, this.editingData.brickData.index)
|
|
|
|
|
|
|
+
|
|
|
// 防止如放回方块回弹动画时,已经触摸在另一个方块上面,从而导致异常错误
|
|
// 防止如放回方块回弹动画时,已经触摸在另一个方块上面,从而导致异常错误
|
|
|
if (this.editingData.brickData !== brickData) return
|
|
if (this.editingData.brickData !== brickData) return
|
|
|
|
|
+
|
|
|
// 第二次单击,旋转
|
|
// 第二次单击,旋转
|
|
|
if (this.rotateFlag) {
|
|
if (this.rotateFlag) {
|
|
|
const brickData = this.editingData.brickData
|
|
const brickData = this.editingData.brickData
|
|
@@ -698,7 +732,6 @@ export class EliminateViewComp extends CCComp {
|
|
|
this.bricksList.push(brickData)
|
|
this.bricksList.push(brickData)
|
|
|
if (this.brickNode && brickData.brickNode) {
|
|
if (this.brickNode && brickData.brickNode) {
|
|
|
this.brickNode.addChild(brickData.brickNode)
|
|
this.brickNode.addChild(brickData.brickNode)
|
|
|
- // brickData.brickNode.setWorldPosition(brickData.brickInitPos)
|
|
|
|
|
tween(brickData.brickNode)
|
|
tween(brickData.brickNode)
|
|
|
.to(0.2, {
|
|
.to(0.2, {
|
|
|
worldPosition: brickData.brickInitPos,
|
|
worldPosition: brickData.brickInitPos,
|
|
@@ -740,7 +773,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
}
|
|
}
|
|
|
// 方块回到待选区
|
|
// 方块回到待选区
|
|
|
else {
|
|
else {
|
|
|
- console.log("返回带待选区域")
|
|
|
|
|
|
|
+ console.log("返回待选区域")
|
|
|
const brickData = this.editingData.brickData
|
|
const brickData = this.editingData.brickData
|
|
|
this.bricksList.push(brickData)
|
|
this.bricksList.push(brickData)
|
|
|
// this.audioManager.playMoveFail()
|
|
// this.audioManager.playMoveFail()
|
|
@@ -761,6 +794,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
.start();
|
|
.start();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 旋转标志位
|
|
// 旋转标志位
|
|
|
if (
|
|
if (
|
|
|
!this.rotateFlag &&
|
|
!this.rotateFlag &&
|
|
@@ -771,18 +805,18 @@ export class EliminateViewComp extends CCComp {
|
|
|
this.rotateFlag = true
|
|
this.rotateFlag = true
|
|
|
this.rotateBrickData = this.editingData.brickData;
|
|
this.rotateBrickData = this.editingData.brickData;
|
|
|
if (this.rotateBrickData.brickNode) {
|
|
if (this.rotateBrickData.brickNode) {
|
|
|
- const prosition = this.rotateBrickData.brickNode.getWorldPosition()
|
|
|
|
|
|
|
+ const position = this.rotateBrickData.brickNode.getWorldPosition()
|
|
|
const rotateNode = instantiate(this.rotatePrefab)
|
|
const rotateNode = instantiate(this.rotatePrefab)
|
|
|
if (this.rotateNode && rotateNode) {
|
|
if (this.rotateNode && rotateNode) {
|
|
|
const instantiatedRotateNode = instantiate(rotateNode);
|
|
const instantiatedRotateNode = instantiate(rotateNode);
|
|
|
this.rotateNode.addChild(instantiatedRotateNode);
|
|
this.rotateNode.addChild(instantiatedRotateNode);
|
|
|
- instantiatedRotateNode.setWorldPosition(prosition)
|
|
|
|
|
|
|
+ instantiatedRotateNode.setWorldPosition(position)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// 格子颜色恢复
|
|
// 格子颜色恢复
|
|
|
this.gridColorRecovery();
|
|
this.gridColorRecovery();
|
|
|
- })
|
|
|
|
|
|
|
+ }, this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//格子颜色恢复
|
|
//格子颜色恢复
|
|
@@ -1469,7 +1503,7 @@ export class EliminateViewComp extends CCComp {
|
|
|
private reopenGrid() {
|
|
private reopenGrid() {
|
|
|
for (let rowIndex = 0; rowIndex < this.rows; rowIndex++) {
|
|
for (let rowIndex = 0; rowIndex < this.rows; rowIndex++) {
|
|
|
for (let columnIndex = 0; columnIndex < this.cols; columnIndex++) {
|
|
for (let columnIndex = 0; columnIndex < this.cols; columnIndex++) {
|
|
|
- this.gridList[rowIndex][columnIndex].status = CellState.FILLED
|
|
|
|
|
|
|
+ this.gridList[rowIndex][columnIndex].status = CellState.EMPTY
|
|
|
this.generateGrid(this.gridList[rowIndex][columnIndex])
|
|
this.generateGrid(this.gridList[rowIndex][columnIndex])
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|