public ICollection <Player> GetPlayersNearPosition(Position position) { ICollection <Player> playersNearPosition = new List <Player>(); for (int row = position.Row - 1; row <= position.Row + 1; row++) { for (int column = position.Column - 1; column <= position.Column + 1; column++) { Position actualPosition = new Position(row, column); if (IsValidPosition(actualPosition) && !IsEmptyPosition(actualPosition) && !actualPosition.Equals(position)) { playersNearPosition.Add(GetPlayer(actualPosition)); } } } return(playersNearPosition); }