18 lines
622 B
Lua
18 lines
622 B
Lua
local BoardHelper = {}
|
|
|
|
function BoardHelper:findPvpLinkOptimalSolution(battleController, minRow, maxRow)
|
|
local battleData = battleController.battleData
|
|
local gridEntities = {}
|
|
for row = minRow, maxRow do -- 遍历所有的可使用格子
|
|
for column = 1, GConst.BattleConst.COLUMN_COUNT do
|
|
local posId = ModuleManager.BattleManager:getPosId(row, column)
|
|
local gridEntity = battleData:getGridEnties()[posId]
|
|
if gridEntity and gridEntity:canLink() then
|
|
table.insert(gridEntities, gridEntity)
|
|
end
|
|
end
|
|
end
|
|
|
|
end
|
|
|
|
return BoardHelper |