/// <summary> /// Sets the current level. /// </summary> public bool SetLevel(int level) { lock (this) { return(_stats.SetLevel(level)); } }
/// <summary> /// Updates opponent after status packet received. /// </summary> public void UpdateOpponent(Space[,] matrix, int level, int lines, int score, int linesSent) { lock (this) { for (int x = 0; x < matrix.GetLength(0); x++) { for (int y = 0; y < matrix.GetLength(1); y++) { _grid[x, y] = matrix[x, y]; } } _stats.SetLevel(level); _stats.SetLines(lines); _stats.SetScore(score); _stats.SetLinesSent(linesSent); } }