/// <summary> /// Looks for full rows /// </summary> private void checkFullRows() { int sum = 0; List <int> rowsForDeleting = new List <int>(); foreach (Square s in currentTetrimino.s) { int y = s.Y; if (!rowsForDeleting.Contains(y)) { rowsForDeleting.Add(y); } } rowsForDeleting.Sort(); foreach (int y in rowsForDeleting) { int count = 0; for (int i = 0; i < board.Columns; i++) { if (board.immovableSquares[y][i] == null) { break; } else { count++; } } if (count == board.immovableSquares[y].Length) { sum += sum * 2 + 60; board.immovableSquares.RemoveAt(y); board.immovableSquares.Insert(0, new Square[board.Columns]); } } if (sum > 0) { Tetris.playSound2(); } updateScore(sum); }
public ChooseLvl(Tetris link) { InitializeComponent(); Tetrisref = link; }