public class World
{
public int[,] WorldState { get; set; }
public Fountain Fountain { get; set; }
public Pit[] Pits { get; set; }
public Maelstrom?[] Maelstroms { get; set; }
public Entrance Entrance { get; set; } = new Entrance();
public World(string? size)
{
switch (size)
{
case "small":
WorldState = new int[4, 4];
Fountain = new Fountain(new Point(3, 1));
Pits = new Pit[1] { new Pit(new Point(1, 1)) };
break;
case "medium":
WorldState = new int[6, 6];
Fountain = new Fountain(new Point(4, 3));
Pits = new Pit[2]
{
new Pit(new Point(3, 1)),
new Pit(new Point(2, 3))
};
Maelstroms = new Maelstrom[1] { new Maelstrom(new Point(4, 2))};
break;
case "large":
WorldState = new int[8, 8];
Fountain = new Fountain(new Point(4, 3));
Pits = new Pit[2]
{
new Pit(new Point(3, 1)),
new Pit(new Point(2, 3))
};
Maelstroms = new Maelstrom[1] { new Maelstrom(new Point(4, 2))};
break;
default:
throw new NotSupportedException("Invalid world size.");
}
}