Skip to content

Commit 48df406

Browse files
committed
allow empty "WIthPlayers" in SessionBuilder
1 parent c759f1d commit 48df406

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/Backdash/Session/NetcodeSessionBuilder.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ public NetcodeSessionBuilder<TInput> WithPlayerCount(int count)
159159
{
160160
ArgumentOutOfRangeException.ThrowIfNegativeOrZero(count);
161161
options.NumberOfPlayers = count;
162-
163162
return this;
164163
}
165164

@@ -169,7 +168,6 @@ public NetcodeSessionBuilder<TInput> WithPlayerCount(int count)
169168
public NetcodeSessionBuilder<TInput> WithPlayers(params NetcodePlayer[] players)
170169
{
171170
ArgumentNullException.ThrowIfNull(players);
172-
ArgumentOutOfRangeException.ThrowIfZero(players.Length);
173171
playerList.AddRange(players);
174172
return this;
175173
}
@@ -181,7 +179,6 @@ public NetcodeSessionBuilder<TInput> WithPlayers(IEnumerable<NetcodePlayer> play
181179
{
182180
ArgumentNullException.ThrowIfNull(players);
183181
playerList.AddRange(players);
184-
ArgumentOutOfRangeException.ThrowIfZero(playerList.Count);
185182
return this;
186183
}
187184

0 commit comments

Comments
 (0)