private HashSet <ElimateChain> FindVerticalMatches() { HashSet <ElimateChain> chainset = new HashSet <ElimateChain>(); for (int col = 0; col < Col_Max; col++) { for (int row = 0; row < Row_Max; row++) { if (ArrayUnit[col, row] != null) { ElimateType matchtype = ArrayUnit[col, row].Type; if (ArrayUnit[col, row + 1] != null && ArrayUnit[col, row + 1].Type == matchtype && ArrayUnit[col, row + 2] != null && ArrayUnit[col, row + 2].Type == matchtype) { ElimateChain chain = new ElimateChain(); chain.ChainType = ElimateChainType.ECT_Vertical; do { chain.AddElimateUnit(ArrayUnit[col, row]); row += 1; }while (row < Row_Max && ArrayUnit[col, row] != null && ArrayUnit[col, row].Type == matchtype); chainset.Add(chain); continue; } row += 1; } } } return(chainset); }
private void ElimateScoreForChain(ElimateChain chains) { }