public SpecialTileCreateSignal(MatchInfo match) { this.match = match; }
void FindMatch(int row, int col, MatchInfo findinfo, FindDirection dir) { int num = 0; compareTile compareTile1; compareTile compareTile2; getNeighborTile getTile1; getNeighborTile getTile2; if (dir == FindDirection.Horizon) { num = _gamepanel.NumCol - 1; compareTile1 = _gamepanel.IsSameLeft; compareTile2 = _gamepanel.IsSameRight; getTile1 = _gamepanel.GetLeftTile; getTile2 = _gamepanel.GetRightTile; } else { num = _gamepanel.NumRow - 1; compareTile1 = _gamepanel.IsSameUp; compareTile2 = _gamepanel.IsSameDown; getTile1 = _gamepanel.GetUpTile; getTile2 = _gamepanel.GetDownTile; } List <Tile> matchCandidates = new List <Tile>(); // 매치 확인을 위해 임시로 저장 bool bStopLeft = false; bool bStopRight = false; for (int i = 0; i < num; i++) { if (!bStopLeft && compareTile1(row, col, i)) { matchCandidates.Add(getTile1(row, col, i)); } else if (bStopRight) { break; } else { bStopLeft = true; } if (!bStopRight && compareTile2(row, col, i)) { matchCandidates.Add(getTile2(row, col, i)); } else if (bStopLeft) { break; } else { bStopRight = true; } } if (matchCandidates.Count >= 2) { makeMatch(findinfo, dir, matchCandidates); } matchCandidates.Clear(); }
public EndTileAttractionSignal(MatchInfo matchInfo) { this.matchInfo = matchInfo; match = matchInfo.matchType; }
public void AddTilePosition(MatchInfo info) { matchlist.AddRange(info.matchlist); }