TableturfBattleApp/TableturfBattleServer/Stage.cs
2023-11-23 12:24:57 +11:00

18 lines
826 B
C#

using Newtonsoft.Json;
namespace TableturfBattleServer;
public class Stage(string name, Space[,] grid, Point[][] startSpaces) {
public string Name { get; } = name ?? throw new ArgumentNullException(nameof(name));
[JsonProperty]
internal readonly Space[,] grid = grid ?? throw new ArgumentNullException(nameof(grid));
/// <summary>
/// The lists of starting spaces on this stage.
/// </summary>
/// <remarks>
/// The smallest list with at least as many spaces as players in the game will be used.
/// For example, if there is a list of 3 and a list of 4, the list of 3 will be used for 2 or 3 players, and the list of 4 will be used for 4 players.
/// </remarks>
[JsonProperty]
internal readonly Point[][] startSpaces = startSpaces ?? throw new ArgumentNullException(nameof(startSpaces));
}