diff --git a/server/Adjudication/Adjudicator.cs b/server/Adjudication/Adjudicator.cs index 9792c24..9c1c5fc 100644 --- a/server/Adjudication/Adjudicator.cs +++ b/server/Adjudication/Adjudicator.cs @@ -9,17 +9,19 @@ public class Adjudicator { private readonly World world; - private readonly AdjacencyValidator adjacencyValidator; private readonly Validator validator; private readonly Evaluator evaluator; private readonly Executor executor; - public Adjudicator(World world, bool hasStrictAdjacencies, List regions, DefaultWorldFactory defaultWorldFactory) + public Adjudicator(World world, bool hasStrictAdjacencies, MapFactory mapFactory, DefaultWorldFactory defaultWorldFactory) { this.world = world; - adjacencyValidator = new(regions, hasStrictAdjacencies); - validator = new(world, regions, adjacencyValidator, defaultWorldFactory); + var regions = mapFactory.CreateRegions(); + var centres = defaultWorldFactory.CreateCentres(); + var adjacencyValidator = new AdjacencyValidator(regions, hasStrictAdjacencies); + + validator = new(world, regions, centres, adjacencyValidator); evaluator = new(world, adjacencyValidator); executor = new(world, regions); } diff --git a/server/Adjudication/Validation/Validator.cs b/server/Adjudication/Validation/Validator.cs index 5f1ca27..c51b5b7 100644 --- a/server/Adjudication/Validation/Validator.cs +++ b/server/Adjudication/Validation/Validator.cs @@ -1,6 +1,5 @@ using Entities; using Enums; -using Factories; namespace Adjudication; @@ -15,17 +14,18 @@ public class Validator private readonly List disbands; private readonly List retreats; - private readonly DefaultWorldFactory defaultWorldFactory; private readonly List regions; + private readonly List centres; + private readonly AdjacencyValidator adjacencyValidator; private readonly ConvoyPathValidator convoyPathValidator; - public Validator(World world, List regions, AdjacencyValidator adjacencyValidator, DefaultWorldFactory defaultWorldFactory) + public Validator(World world, List regions, List centres, AdjacencyValidator adjacencyValidator) { this.world = world; this.regions = regions; + this.centres = centres; this.adjacencyValidator = adjacencyValidator; - this.defaultWorldFactory = defaultWorldFactory; var nonRetreats = world.Orders.Where(o => o.NeedsValidation && !o.Unit!.MustRetreat).ToList(); retreats = world.Orders.Where(o => o.NeedsValidation && o.Unit!.MustRetreat).ToList(); @@ -107,8 +107,6 @@ private void ValidateConvoys() private void ValidateBuilds() { - var homeCentres = defaultWorldFactory.CreateCentres(); - foreach (var build in builds) { if (build.Location.Phase != Phase.Winter) @@ -119,7 +117,7 @@ private void ValidateBuilds() var board = world.Boards.FirstOrDefault(b => b.Contains(build.Location)); var region = regions.First(r => r.Id == build.Location.RegionId); - var centre = homeCentres.FirstOrDefault(c => c.Location.RegionId == build.Location.RegionId); + var centre = centres.FirstOrDefault(c => c.Location.RegionId == build.Location.RegionId); var unit = build.Unit!; if (board == null || centre == null) diff --git a/server/Context/GameContext.cs b/server/Context/GameContext.cs index 28454b5..7607a25 100644 --- a/server/Context/GameContext.cs +++ b/server/Context/GameContext.cs @@ -1,16 +1,10 @@ using Entities; -using Factories; using Microsoft.EntityFrameworkCore; namespace Context; -public class GameContext(DbContextOptions options, MapFactory mapFactory) : DbContext(options) +public class GameContext(DbContextOptions options) : DbContext(options) { - private readonly MapFactory mapFactory = mapFactory; - - public DbSet Regions { get; set; } = null!; - public DbSet Connections { get; set; } = null!; - public DbSet Games { get; set; } = null!; public DbSet Worlds { get; set; } = null!; public DbSet Boards { get; set; } = null!; @@ -24,39 +18,4 @@ public class GameContext(DbContextOptions options, MapFactory mapFa public DbSet Convoys { get; set; } = null!; public DbSet Builds { get; set; } = null!; public DbSet Disbands { get; set; } = null!; - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - var (regions, connections) = mapFactory.CreateMap(); - - modelBuilder.Entity() - .HasData(regions); - - modelBuilder.Entity() - .HasData(connections); - - modelBuilder.Entity() - .HasMany(r => r.Connections) - .WithMany(c => c.Regions) - .UsingEntity("ConnectionMappings") - .HasData(connections.SelectMany(connection => - { - var regionIds = connection.Id.Split("-"); - return new List - { - new() - { - ConnectionsId = connection.Id, - RegionsId = regionIds[0], - }, - new() - { - ConnectionsId = connection.Id, - RegionsId = regionIds[1], - }, - }; - })); - } }; diff --git a/server/Data/regions.json b/server/Data/regions.json index 09cfeda..f6d6ce1 100644 --- a/server/Data/regions.json +++ b/server/Data/regions.json @@ -93,7 +93,7 @@ }, { "id": "Bur", - "name": "Burgandy", + "name": "Burgundy", "type": "Land" }, { @@ -372,7 +372,7 @@ }, { "id": "TYS", - "name": "Tyrhennian Sea", + "name": "Tyrrhenian Sea", "type": "Sea" }, { diff --git a/server/Factories/MapFactory.cs b/server/Factories/MapFactory.cs index ff4f256..28f4419 100644 --- a/server/Factories/MapFactory.cs +++ b/server/Factories/MapFactory.cs @@ -10,7 +10,7 @@ public class MapFactory private const string RegionsFilePath = "Data/regions.json"; private const string ConnectionsFilePath = "Data/connections.json"; - public (List regions, List connections) CreateMap() + public List CreateRegions() { var regionsFile = File.ReadAllText(RegionsFilePath); var regions = JsonSerializer.Deserialize>(regionsFile, Constants.JsonOptions) @@ -22,7 +22,7 @@ public class MapFactory Check(regions, connections); PopulateConnections(regions, connections); - return (regions, connections); + return regions; } private void PopulateConnections(List regions, List connections) diff --git a/server/Migrations/20240827215546_RemoveRegionsFromDatabase.Designer.cs b/server/Migrations/20240827215546_RemoveRegionsFromDatabase.Designer.cs new file mode 100644 index 0000000..d7e2735 --- /dev/null +++ b/server/Migrations/20240827215546_RemoveRegionsFromDatabase.Designer.cs @@ -0,0 +1,498 @@ +// +using System; +using System.Collections.Generic; +using Context; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace _5dDiplomacyWithMultiverseTimeTravel.Migrations +{ + [DbContext(typeof(GameContext))] + [Migration("20240827215546_RemoveRegionsFromDatabase")] + partial class RemoveRegionsFromDatabase + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.7") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Entities.Board", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ChildTimelines") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Phase") + .HasColumnType("int"); + + b.Property("Timeline") + .HasColumnType("int"); + + b.Property("WorldId") + .HasColumnType("int"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("WorldId"); + + b.ToTable("Boards"); + }); + + modelBuilder.Entity("Entities.Centre", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BoardId") + .HasColumnType("int"); + + b.Property("Owner") + .HasColumnType("int"); + + b.ComplexProperty>("Location", "Entities.Centre.Location#Location", b1 => + { + b1.IsRequired(); + + b1.Property("Phase") + .HasColumnType("int"); + + b1.Property("RegionId") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("Timeline") + .HasColumnType("int"); + + b1.Property("Year") + .HasColumnType("int"); + }); + + b.HasKey("Id"); + + b.HasIndex("BoardId"); + + b.ToTable("Centres"); + }); + + modelBuilder.Entity("Entities.Game", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("HasStrictAdjacencies") + .HasColumnType("bit"); + + b.Property("IsSandbox") + .HasColumnType("bit"); + + b.Property("Players") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PlayersSubmitted") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Games"); + }); + + modelBuilder.Entity("Entities.Order", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Discriminator") + .IsRequired() + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UnitId") + .HasColumnType("int"); + + b.Property("WorldId") + .HasColumnType("int"); + + b.ComplexProperty>("Location", "Entities.Order.Location#Location", b1 => + { + b1.IsRequired(); + + b1.Property("Phase") + .HasColumnType("int"); + + b1.Property("RegionId") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("Timeline") + .HasColumnType("int"); + + b1.Property("Year") + .HasColumnType("int"); + }); + + b.HasKey("Id"); + + b.HasIndex("UnitId") + .IsUnique() + .HasFilter("[UnitId] IS NOT NULL"); + + b.HasIndex("WorldId"); + + b.ToTable("Orders"); + + b.HasDiscriminator().HasValue("Order"); + + b.UseTphMappingStrategy(); + }); + + modelBuilder.Entity("Entities.Unit", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BoardId") + .HasColumnType("int"); + + b.Property("MustRetreat") + .HasColumnType("bit"); + + b.Property("Owner") + .HasColumnType("int"); + + b.Property("Type") + .HasColumnType("int"); + + b.ComplexProperty>("Location", "Entities.Unit.Location#Location", b1 => + { + b1.IsRequired(); + + b1.Property("Phase") + .HasColumnType("int"); + + b1.Property("RegionId") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("Timeline") + .HasColumnType("int"); + + b1.Property("Year") + .HasColumnType("int"); + }); + + b.HasKey("Id"); + + b.HasIndex("BoardId"); + + b.ToTable("Units"); + }); + + modelBuilder.Entity("Entities.World", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("GameId") + .HasColumnType("int"); + + b.Property("Iteration") + .HasColumnType("int"); + + b.Property("Winner") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("GameId") + .IsUnique(); + + b.ToTable("Worlds"); + }); + + modelBuilder.Entity("Entities.Build", b => + { + b.HasBaseType("Entities.Order"); + + b.HasDiscriminator().HasValue("Build"); + }); + + modelBuilder.Entity("Entities.Convoy", b => + { + b.HasBaseType("Entities.Order"); + + b.ComplexProperty>("Destination", "Entities.Convoy.Destination#Location", b1 => + { + b1.IsRequired(); + + b1.Property("Phase") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + + b1.Property("RegionId") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("Timeline") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + + b1.Property("Year") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + }); + + b.ComplexProperty>("Midpoint", "Entities.Convoy.Midpoint#Location", b1 => + { + b1.IsRequired(); + + b1.Property("Phase") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + + b1.Property("RegionId") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("Timeline") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + + b1.Property("Year") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + }); + + b.HasDiscriminator().HasValue("Convoy"); + }); + + modelBuilder.Entity("Entities.Disband", b => + { + b.HasBaseType("Entities.Order"); + + b.HasDiscriminator().HasValue("Disband"); + }); + + modelBuilder.Entity("Entities.Hold", b => + { + b.HasBaseType("Entities.Order"); + + b.HasDiscriminator().HasValue("Hold"); + }); + + modelBuilder.Entity("Entities.Move", b => + { + b.HasBaseType("Entities.Order"); + + b.ComplexProperty>("Destination", "Entities.Move.Destination#Location", b1 => + { + b1.IsRequired(); + + b1.Property("Phase") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + + b1.Property("RegionId") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("Timeline") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + + b1.Property("Year") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + }); + + b.HasDiscriminator().HasValue("Move"); + }); + + modelBuilder.Entity("Entities.Support", b => + { + b.HasBaseType("Entities.Order"); + + b.ComplexProperty>("Destination", "Entities.Support.Destination#Location", b1 => + { + b1.IsRequired(); + + b1.Property("Phase") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + + b1.Property("RegionId") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("Timeline") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + + b1.Property("Year") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + }); + + b.ComplexProperty>("Midpoint", "Entities.Support.Midpoint#Location", b1 => + { + b1.IsRequired(); + + b1.Property("Phase") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + + b1.Property("RegionId") + .IsRequired() + .ValueGeneratedOnUpdateSometimes() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("Timeline") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + + b1.Property("Year") + .ValueGeneratedOnUpdateSometimes() + .HasColumnType("int"); + }); + + b.HasDiscriminator().HasValue("Support"); + }); + + modelBuilder.Entity("Entities.Board", b => + { + b.HasOne("Entities.World", "World") + .WithMany("Boards") + .HasForeignKey("WorldId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("World"); + }); + + modelBuilder.Entity("Entities.Centre", b => + { + b.HasOne("Entities.Board", "Board") + .WithMany("Centres") + .HasForeignKey("BoardId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Board"); + }); + + modelBuilder.Entity("Entities.Order", b => + { + b.HasOne("Entities.Unit", "Unit") + .WithOne("Order") + .HasForeignKey("Entities.Order", "UnitId"); + + b.HasOne("Entities.World", "World") + .WithMany("Orders") + .HasForeignKey("WorldId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Unit"); + + b.Navigation("World"); + }); + + modelBuilder.Entity("Entities.Unit", b => + { + b.HasOne("Entities.Board", "Board") + .WithMany("Units") + .HasForeignKey("BoardId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Board"); + }); + + modelBuilder.Entity("Entities.World", b => + { + b.HasOne("Entities.Game", "Game") + .WithOne("World") + .HasForeignKey("Entities.World", "GameId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Game"); + }); + + modelBuilder.Entity("Entities.Board", b => + { + b.Navigation("Centres"); + + b.Navigation("Units"); + }); + + modelBuilder.Entity("Entities.Game", b => + { + b.Navigation("World"); + }); + + modelBuilder.Entity("Entities.Unit", b => + { + b.Navigation("Order"); + }); + + modelBuilder.Entity("Entities.World", b => + { + b.Navigation("Boards"); + + b.Navigation("Orders"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/server/Migrations/20240827215546_RemoveRegionsFromDatabase.cs b/server/Migrations/20240827215546_RemoveRegionsFromDatabase.cs new file mode 100644 index 0000000..e9a20a0 --- /dev/null +++ b/server/Migrations/20240827215546_RemoveRegionsFromDatabase.cs @@ -0,0 +1,864 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional + +namespace _5dDiplomacyWithMultiverseTimeTravel.Migrations +{ + /// + public partial class RemoveRegionsFromDatabase : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "ConnectionMappings"); + + migrationBuilder.DropTable( + name: "Connections"); + + migrationBuilder.DropTable( + name: "Regions"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Connections", + columns: table => new + { + Id = table.Column(type: "nvarchar(11)", maxLength: 11, nullable: false), + Type = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Connections", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Regions", + columns: table => new + { + Id = table.Column(type: "nvarchar(5)", maxLength: 5, nullable: false), + ParentId = table.Column(type: "nvarchar(5)", nullable: true), + Name = table.Column(type: "nvarchar(max)", nullable: false), + Type = table.Column(type: "int", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Regions", x => x.Id); + table.ForeignKey( + name: "FK_Regions_Regions_ParentId", + column: x => x.ParentId, + principalTable: "Regions", + principalColumn: "Id"); + }); + + migrationBuilder.CreateTable( + name: "ConnectionMappings", + columns: table => new + { + ConnectionsId = table.Column(type: "nvarchar(11)", nullable: false), + RegionsId = table.Column(type: "nvarchar(5)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ConnectionMappings", x => new { x.ConnectionsId, x.RegionsId }); + table.ForeignKey( + name: "FK_ConnectionMappings_Connections_ConnectionsId", + column: x => x.ConnectionsId, + principalTable: "Connections", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_ConnectionMappings_Regions_RegionsId", + column: x => x.RegionsId, + principalTable: "Regions", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.InsertData( + table: "Connections", + columns: new[] { "Id", "Type" }, + values: new object[,] + { + { "ADR-Alb", 2 }, + { "ADR-Apu", 2 }, + { "ADR-ION", 2 }, + { "ADR-Tri", 2 }, + { "ADR-Ven", 2 }, + { "AEG-Bul_S", 2 }, + { "AEG-Con", 2 }, + { "AEG-EAS", 2 }, + { "AEG-Gre", 2 }, + { "AEG-ION", 2 }, + { "AEG-Smy", 2 }, + { "Alb-Gre", 1 }, + { "Alb-ION", 2 }, + { "Alb-Ser", 0 }, + { "Alb-Tri", 1 }, + { "Ank-Arm", 1 }, + { "Ank-BLA", 2 }, + { "Ank-Con", 1 }, + { "Ank-Smy", 0 }, + { "Apu-ION", 2 }, + { "Apu-Nap", 1 }, + { "Apu-Rom", 0 }, + { "Apu-Ven", 0 }, + { "Arm-BLA", 2 }, + { "Arm-Sev", 1 }, + { "Arm-Smy", 0 }, + { "Arm-Syr", 0 }, + { "BAL-Ber", 2 }, + { "BAL-BOT", 2 }, + { "BAL-Den", 2 }, + { "BAL-Kie", 2 }, + { "BAL-Lvn", 2 }, + { "BAL-Pru", 2 }, + { "BAL-Swe", 2 }, + { "BAR-NWG", 2 }, + { "BAR-Nwy", 2 }, + { "BAR-Stp_N", 2 }, + { "Bel-Bur", 0 }, + { "Bel-ENG", 2 }, + { "Bel-Hol", 1 }, + { "Bel-NTH", 2 }, + { "Bel-Pic", 1 }, + { "Bel-Ruh", 0 }, + { "Ber-Kie", 1 }, + { "Ber-Mun", 0 }, + { "Ber-Pru", 1 }, + { "Ber-Sil", 0 }, + { "BLA-Bul_E", 2 }, + { "BLA-Con", 2 }, + { "BLA-Rum", 2 }, + { "BLA-Sev", 2 }, + { "Boh-Gal", 0 }, + { "Boh-Mun", 0 }, + { "Boh-Sil", 0 }, + { "Boh-Tyr", 0 }, + { "Boh-Vie", 0 }, + { "BOT-Fin", 2 }, + { "BOT-Lvn", 2 }, + { "BOT-Stp_S", 2 }, + { "BOT-Swe", 2 }, + { "Bre-ENG", 2 }, + { "Bre-Gas", 1 }, + { "Bre-MAO", 2 }, + { "Bre-Par", 0 }, + { "Bre-Pic", 1 }, + { "Bud-Gal", 0 }, + { "Bud-Rum", 0 }, + { "Bud-Ser", 0 }, + { "Bud-Tri", 0 }, + { "Bud-Vie", 0 }, + { "Bul_E-Con", 2 }, + { "Bul_E-Rum", 2 }, + { "Bul_S-Con", 2 }, + { "Bul_S-Gre", 2 }, + { "Bul-Con", 0 }, + { "Bul-Gre", 0 }, + { "Bul-Rum", 0 }, + { "Bul-Ser", 0 }, + { "Bur-Gas", 0 }, + { "Bur-Mar", 0 }, + { "Bur-Mun", 0 }, + { "Bur-Par", 0 }, + { "Bur-Pic", 0 }, + { "Bur-Ruh", 0 }, + { "Cly-Edi", 1 }, + { "Cly-Lvp", 1 }, + { "Cly-NAO", 2 }, + { "Cly-NWG", 2 }, + { "Con-Smy", 1 }, + { "Den-HEL", 2 }, + { "Den-Kie", 1 }, + { "Den-NTH", 2 }, + { "Den-SKA", 2 }, + { "Den-Swe", 1 }, + { "EAS-ION", 2 }, + { "EAS-Smy", 2 }, + { "EAS-Syr", 2 }, + { "Edi-Lvp", 0 }, + { "Edi-NTH", 2 }, + { "Edi-NWG", 2 }, + { "Edi-Yor", 1 }, + { "ENG-IRI", 2 }, + { "ENG-Lon", 2 }, + { "ENG-MAO", 2 }, + { "ENG-NTH", 2 }, + { "ENG-Pic", 2 }, + { "ENG-Wal", 2 }, + { "Fin-Nwy", 1 }, + { "Fin-Stp", 0 }, + { "Fin-Stp_S", 2 }, + { "Fin-Swe", 1 }, + { "Gal-Rum", 0 }, + { "Gal-Sil", 0 }, + { "Gal-Ukr", 0 }, + { "Gal-Vie", 0 }, + { "Gal-War", 0 }, + { "Gas-MAO", 2 }, + { "Gas-Mar", 0 }, + { "Gas-Par", 0 }, + { "Gas-Spa", 0 }, + { "Gas-Spa_N", 2 }, + { "Gre-ION", 2 }, + { "Gre-Ser", 0 }, + { "HEL-Hol", 2 }, + { "HEL-Kie", 2 }, + { "HEL-NTH", 2 }, + { "Hol-Kie", 1 }, + { "Hol-NTH", 2 }, + { "Hol-Ruh", 0 }, + { "ION-Nap", 2 }, + { "ION-Tun", 2 }, + { "ION-TYS", 2 }, + { "IRI-Lvp", 2 }, + { "IRI-MAO", 2 }, + { "IRI-NAO", 2 }, + { "IRI-Wal", 2 }, + { "Kie-Mun", 0 }, + { "Kie-Ruh", 0 }, + { "Lon-NTH", 2 }, + { "Lon-Wal", 1 }, + { "Lon-Yor", 1 }, + { "Lvn-Mos", 0 }, + { "Lvn-Pru", 1 }, + { "Lvn-Stp", 0 }, + { "Lvn-Stp_S", 2 }, + { "Lvn-War", 0 }, + { "Lvp-NAO", 2 }, + { "Lvp-Wal", 1 }, + { "Lvp-Yor", 0 }, + { "LYO-Mar", 2 }, + { "LYO-Pie", 2 }, + { "LYO-Spa_S", 2 }, + { "LYO-Tus", 2 }, + { "LYO-TYS", 2 }, + { "LYO-WES", 2 }, + { "MAO-Naf", 2 }, + { "MAO-NAO", 2 }, + { "MAO-Por", 2 }, + { "MAO-Spa_N", 2 }, + { "MAO-Spa_S", 2 }, + { "MAO-WES", 2 }, + { "Mar-Pie", 1 }, + { "Mar-Spa", 0 }, + { "Mar-Spa_S", 2 }, + { "Mos-Sev", 0 }, + { "Mos-Stp", 0 }, + { "Mos-Ukr", 0 }, + { "Mos-War", 0 }, + { "Mun-Ruh", 0 }, + { "Mun-Sil", 0 }, + { "Mun-Tyr", 0 }, + { "Naf-Tun", 1 }, + { "Naf-WES", 2 }, + { "NAO-NWG", 2 }, + { "Nap-Rom", 1 }, + { "Nap-TYS", 2 }, + { "NTH-NWG", 2 }, + { "NTH-Nwy", 2 }, + { "NTH-SKA", 2 }, + { "NTH-Yor", 2 }, + { "NWG-Nwy", 2 }, + { "Nwy-SKA", 2 }, + { "Nwy-Stp", 0 }, + { "Nwy-Stp_N", 2 }, + { "Nwy-Swe", 1 }, + { "Par-Pic", 0 }, + { "Pie-Tus", 1 }, + { "Pie-Tyr", 0 }, + { "Pie-Ven", 0 }, + { "Por-Spa", 0 }, + { "Por-Spa_N", 2 }, + { "Por-Spa_S", 2 }, + { "Pru-Sil", 0 }, + { "Pru-War", 0 }, + { "Rom-Tus", 1 }, + { "Rom-TYS", 2 }, + { "Rom-Ven", 0 }, + { "Rum-Ser", 0 }, + { "Rum-Sev", 1 }, + { "Rum-Ukr", 0 }, + { "Ser-Tri", 0 }, + { "Sev-Ukr", 0 }, + { "Sil-War", 0 }, + { "SKA-Swe", 2 }, + { "Smy-Syr", 1 }, + { "Spa_S-WES", 2 }, + { "Tri-Tyr", 0 }, + { "Tri-Ven", 1 }, + { "Tri-Vie", 0 }, + { "Tun-TYS", 2 }, + { "Tun-WES", 2 }, + { "Tus-TYS", 2 }, + { "Tus-Ven", 0 }, + { "Tyr-Ven", 0 }, + { "Tyr-Vie", 0 }, + { "TYS-WES", 2 }, + { "Ukr-War", 0 }, + { "Wal-Yor", 0 } + }); + + migrationBuilder.InsertData( + table: "Regions", + columns: new[] { "Id", "Name", "ParentId", "Type" }, + values: new object[,] + { + { "ADR", "Adriatic Sea", null, 2 }, + { "AEG", "Aegean Sea", null, 2 }, + { "Alb", "Albania", null, 1 }, + { "Ank", "Ankara", null, 1 }, + { "Apu", "Apulia", null, 1 }, + { "Arm", "Armenia", null, 1 }, + { "BAL", "Baltic Sea", null, 2 }, + { "BAR", "Barents Sea", null, 2 }, + { "Bel", "Belgium", null, 1 }, + { "Ber", "Berlin", null, 1 }, + { "BLA", "Black Sea", null, 2 }, + { "Boh", "Bohemia", null, 0 }, + { "BOT", "Gulf of Bothnia", null, 2 }, + { "Bre", "Brest", null, 1 }, + { "Bud", "Budapest", null, 0 }, + { "Bul", "Bulgaria", null, 0 }, + { "Bur", "Burgandy", null, 0 }, + { "Cly", "Clyde", null, 1 }, + { "Con", "Constantinople", null, 1 }, + { "Den", "Denmark", null, 1 }, + { "EAS", "Eastern Mediterranean", null, 2 }, + { "Edi", "Edinburgh", null, 1 }, + { "ENG", "English Channel", null, 2 }, + { "Fin", "Finland", null, 1 }, + { "Gal", "Galicia", null, 0 }, + { "Gas", "Gascony", null, 1 }, + { "Gre", "Greece", null, 1 }, + { "HEL", "Heligoland Bight", null, 2 }, + { "Hol", "Holland", null, 1 }, + { "ION", "Ionian Sea", null, 2 }, + { "IRI", "Irish Sea", null, 2 }, + { "Kie", "Kiel", null, 1 }, + { "Lon", "London", null, 1 }, + { "Lvn", "Livonia", null, 1 }, + { "Lvp", "Liverpool", null, 1 }, + { "LYO", "Gulf of Lyon", null, 2 }, + { "MAO", "Mid-Atlantic Ocean", null, 2 }, + { "Mar", "Marseilles", null, 1 }, + { "Mos", "Moscow", null, 0 }, + { "Mun", "Munich", null, 0 }, + { "Naf", "North Africa", null, 1 }, + { "NAO", "North Atlantic Ocean", null, 2 }, + { "Nap", "Naples", null, 1 }, + { "NTH", "North Sea", null, 2 }, + { "NWG", "Norwegian Sea", null, 2 }, + { "Nwy", "Norway", null, 1 }, + { "Par", "Paris", null, 0 }, + { "Pic", "Picardy", null, 1 }, + { "Pie", "Piedmont", null, 1 }, + { "Por", "Portugal", null, 1 }, + { "Pru", "Prussia", null, 1 }, + { "Rom", "Rome", null, 1 }, + { "Ruh", "Ruhr", null, 0 }, + { "Rum", "Rumania", null, 1 }, + { "Ser", "Serbia", null, 0 }, + { "Sev", "Sevastopol", null, 1 }, + { "Sil", "Silesia", null, 0 }, + { "SKA", "Skagerrak", null, 2 }, + { "Smy", "Smyrna", null, 1 }, + { "Spa", "Spain", null, 0 }, + { "Stp", "St Petersburg", null, 0 }, + { "Swe", "Sweden", null, 1 }, + { "Syr", "Syria", null, 1 }, + { "Tri", "Trieste", null, 1 }, + { "Tun", "Tunis", null, 1 }, + { "Tus", "Tuscany", null, 1 }, + { "Tyr", "Tyrolia", null, 0 }, + { "TYS", "Tyrhennian Sea", null, 2 }, + { "Ukr", "Ukraine", null, 0 }, + { "Ven", "Venice", null, 1 }, + { "Vie", "Vienna", null, 0 }, + { "Wal", "Wales", null, 1 }, + { "War", "Warsaw", null, 0 }, + { "WES", "Western Mediterranean", null, 2 }, + { "Yor", "York", null, 1 } + }); + + migrationBuilder.InsertData( + table: "ConnectionMappings", + columns: new[] { "ConnectionsId", "RegionsId" }, + values: new object[,] + { + { "ADR-Alb", "ADR" }, + { "ADR-Alb", "Alb" }, + { "ADR-Apu", "ADR" }, + { "ADR-Apu", "Apu" }, + { "ADR-ION", "ADR" }, + { "ADR-ION", "ION" }, + { "ADR-Tri", "ADR" }, + { "ADR-Tri", "Tri" }, + { "ADR-Ven", "ADR" }, + { "ADR-Ven", "Ven" }, + { "AEG-Bul_S", "AEG" }, + { "AEG-Con", "AEG" }, + { "AEG-Con", "Con" }, + { "AEG-EAS", "AEG" }, + { "AEG-EAS", "EAS" }, + { "AEG-Gre", "AEG" }, + { "AEG-Gre", "Gre" }, + { "AEG-ION", "AEG" }, + { "AEG-ION", "ION" }, + { "AEG-Smy", "AEG" }, + { "AEG-Smy", "Smy" }, + { "Alb-Gre", "Alb" }, + { "Alb-Gre", "Gre" }, + { "Alb-ION", "Alb" }, + { "Alb-ION", "ION" }, + { "Alb-Ser", "Alb" }, + { "Alb-Ser", "Ser" }, + { "Alb-Tri", "Alb" }, + { "Alb-Tri", "Tri" }, + { "Ank-Arm", "Ank" }, + { "Ank-Arm", "Arm" }, + { "Ank-BLA", "Ank" }, + { "Ank-BLA", "BLA" }, + { "Ank-Con", "Ank" }, + { "Ank-Con", "Con" }, + { "Ank-Smy", "Ank" }, + { "Ank-Smy", "Smy" }, + { "Apu-ION", "Apu" }, + { "Apu-ION", "ION" }, + { "Apu-Nap", "Apu" }, + { "Apu-Nap", "Nap" }, + { "Apu-Rom", "Apu" }, + { "Apu-Rom", "Rom" }, + { "Apu-Ven", "Apu" }, + { "Apu-Ven", "Ven" }, + { "Arm-BLA", "Arm" }, + { "Arm-BLA", "BLA" }, + { "Arm-Sev", "Arm" }, + { "Arm-Sev", "Sev" }, + { "Arm-Smy", "Arm" }, + { "Arm-Smy", "Smy" }, + { "Arm-Syr", "Arm" }, + { "Arm-Syr", "Syr" }, + { "BAL-Ber", "BAL" }, + { "BAL-Ber", "Ber" }, + { "BAL-BOT", "BAL" }, + { "BAL-BOT", "BOT" }, + { "BAL-Den", "BAL" }, + { "BAL-Den", "Den" }, + { "BAL-Kie", "BAL" }, + { "BAL-Kie", "Kie" }, + { "BAL-Lvn", "BAL" }, + { "BAL-Lvn", "Lvn" }, + { "BAL-Pru", "BAL" }, + { "BAL-Pru", "Pru" }, + { "BAL-Swe", "BAL" }, + { "BAL-Swe", "Swe" }, + { "BAR-NWG", "BAR" }, + { "BAR-NWG", "NWG" }, + { "BAR-Nwy", "BAR" }, + { "BAR-Nwy", "Nwy" }, + { "BAR-Stp_N", "BAR" }, + { "Bel-Bur", "Bel" }, + { "Bel-Bur", "Bur" }, + { "Bel-ENG", "Bel" }, + { "Bel-ENG", "ENG" }, + { "Bel-Hol", "Bel" }, + { "Bel-Hol", "Hol" }, + { "Bel-NTH", "Bel" }, + { "Bel-NTH", "NTH" }, + { "Bel-Pic", "Bel" }, + { "Bel-Pic", "Pic" }, + { "Bel-Ruh", "Bel" }, + { "Bel-Ruh", "Ruh" }, + { "Ber-Kie", "Ber" }, + { "Ber-Kie", "Kie" }, + { "Ber-Mun", "Ber" }, + { "Ber-Mun", "Mun" }, + { "Ber-Pru", "Ber" }, + { "Ber-Pru", "Pru" }, + { "Ber-Sil", "Ber" }, + { "Ber-Sil", "Sil" }, + { "BLA-Bul_E", "BLA" }, + { "BLA-Con", "BLA" }, + { "BLA-Con", "Con" }, + { "BLA-Rum", "BLA" }, + { "BLA-Rum", "Rum" }, + { "BLA-Sev", "BLA" }, + { "BLA-Sev", "Sev" }, + { "Boh-Gal", "Boh" }, + { "Boh-Gal", "Gal" }, + { "Boh-Mun", "Boh" }, + { "Boh-Mun", "Mun" }, + { "Boh-Sil", "Boh" }, + { "Boh-Sil", "Sil" }, + { "Boh-Tyr", "Boh" }, + { "Boh-Tyr", "Tyr" }, + { "Boh-Vie", "Boh" }, + { "Boh-Vie", "Vie" }, + { "BOT-Fin", "BOT" }, + { "BOT-Fin", "Fin" }, + { "BOT-Lvn", "BOT" }, + { "BOT-Lvn", "Lvn" }, + { "BOT-Stp_S", "BOT" }, + { "BOT-Swe", "BOT" }, + { "BOT-Swe", "Swe" }, + { "Bre-ENG", "Bre" }, + { "Bre-ENG", "ENG" }, + { "Bre-Gas", "Bre" }, + { "Bre-Gas", "Gas" }, + { "Bre-MAO", "Bre" }, + { "Bre-MAO", "MAO" }, + { "Bre-Par", "Bre" }, + { "Bre-Par", "Par" }, + { "Bre-Pic", "Bre" }, + { "Bre-Pic", "Pic" }, + { "Bud-Gal", "Bud" }, + { "Bud-Gal", "Gal" }, + { "Bud-Rum", "Bud" }, + { "Bud-Rum", "Rum" }, + { "Bud-Ser", "Bud" }, + { "Bud-Ser", "Ser" }, + { "Bud-Tri", "Bud" }, + { "Bud-Tri", "Tri" }, + { "Bud-Vie", "Bud" }, + { "Bud-Vie", "Vie" }, + { "Bul_E-Con", "Con" }, + { "Bul_E-Rum", "Rum" }, + { "Bul_S-Con", "Con" }, + { "Bul_S-Gre", "Gre" }, + { "Bul-Con", "Bul" }, + { "Bul-Con", "Con" }, + { "Bul-Gre", "Bul" }, + { "Bul-Gre", "Gre" }, + { "Bul-Rum", "Bul" }, + { "Bul-Rum", "Rum" }, + { "Bul-Ser", "Bul" }, + { "Bul-Ser", "Ser" }, + { "Bur-Gas", "Bur" }, + { "Bur-Gas", "Gas" }, + { "Bur-Mar", "Bur" }, + { "Bur-Mar", "Mar" }, + { "Bur-Mun", "Bur" }, + { "Bur-Mun", "Mun" }, + { "Bur-Par", "Bur" }, + { "Bur-Par", "Par" }, + { "Bur-Pic", "Bur" }, + { "Bur-Pic", "Pic" }, + { "Bur-Ruh", "Bur" }, + { "Bur-Ruh", "Ruh" }, + { "Cly-Edi", "Cly" }, + { "Cly-Edi", "Edi" }, + { "Cly-Lvp", "Cly" }, + { "Cly-Lvp", "Lvp" }, + { "Cly-NAO", "Cly" }, + { "Cly-NAO", "NAO" }, + { "Cly-NWG", "Cly" }, + { "Cly-NWG", "NWG" }, + { "Con-Smy", "Con" }, + { "Con-Smy", "Smy" }, + { "Den-HEL", "Den" }, + { "Den-HEL", "HEL" }, + { "Den-Kie", "Den" }, + { "Den-Kie", "Kie" }, + { "Den-NTH", "Den" }, + { "Den-NTH", "NTH" }, + { "Den-SKA", "Den" }, + { "Den-SKA", "SKA" }, + { "Den-Swe", "Den" }, + { "Den-Swe", "Swe" }, + { "EAS-ION", "EAS" }, + { "EAS-ION", "ION" }, + { "EAS-Smy", "EAS" }, + { "EAS-Smy", "Smy" }, + { "EAS-Syr", "EAS" }, + { "EAS-Syr", "Syr" }, + { "Edi-Lvp", "Edi" }, + { "Edi-Lvp", "Lvp" }, + { "Edi-NTH", "Edi" }, + { "Edi-NTH", "NTH" }, + { "Edi-NWG", "Edi" }, + { "Edi-NWG", "NWG" }, + { "Edi-Yor", "Edi" }, + { "Edi-Yor", "Yor" }, + { "ENG-IRI", "ENG" }, + { "ENG-IRI", "IRI" }, + { "ENG-Lon", "ENG" }, + { "ENG-Lon", "Lon" }, + { "ENG-MAO", "ENG" }, + { "ENG-MAO", "MAO" }, + { "ENG-NTH", "ENG" }, + { "ENG-NTH", "NTH" }, + { "ENG-Pic", "ENG" }, + { "ENG-Pic", "Pic" }, + { "ENG-Wal", "ENG" }, + { "ENG-Wal", "Wal" }, + { "Fin-Nwy", "Fin" }, + { "Fin-Nwy", "Nwy" }, + { "Fin-Stp", "Fin" }, + { "Fin-Stp", "Stp" }, + { "Fin-Stp_S", "Fin" }, + { "Fin-Swe", "Fin" }, + { "Fin-Swe", "Swe" }, + { "Gal-Rum", "Gal" }, + { "Gal-Rum", "Rum" }, + { "Gal-Sil", "Gal" }, + { "Gal-Sil", "Sil" }, + { "Gal-Ukr", "Gal" }, + { "Gal-Ukr", "Ukr" }, + { "Gal-Vie", "Gal" }, + { "Gal-Vie", "Vie" }, + { "Gal-War", "Gal" }, + { "Gal-War", "War" }, + { "Gas-MAO", "Gas" }, + { "Gas-MAO", "MAO" }, + { "Gas-Mar", "Gas" }, + { "Gas-Mar", "Mar" }, + { "Gas-Par", "Gas" }, + { "Gas-Par", "Par" }, + { "Gas-Spa", "Gas" }, + { "Gas-Spa", "Spa" }, + { "Gas-Spa_N", "Gas" }, + { "Gre-ION", "Gre" }, + { "Gre-ION", "ION" }, + { "Gre-Ser", "Gre" }, + { "Gre-Ser", "Ser" }, + { "HEL-Hol", "HEL" }, + { "HEL-Hol", "Hol" }, + { "HEL-Kie", "HEL" }, + { "HEL-Kie", "Kie" }, + { "HEL-NTH", "HEL" }, + { "HEL-NTH", "NTH" }, + { "Hol-Kie", "Hol" }, + { "Hol-Kie", "Kie" }, + { "Hol-NTH", "Hol" }, + { "Hol-NTH", "NTH" }, + { "Hol-Ruh", "Hol" }, + { "Hol-Ruh", "Ruh" }, + { "ION-Nap", "ION" }, + { "ION-Nap", "Nap" }, + { "ION-Tun", "ION" }, + { "ION-Tun", "Tun" }, + { "ION-TYS", "ION" }, + { "ION-TYS", "TYS" }, + { "IRI-Lvp", "IRI" }, + { "IRI-Lvp", "Lvp" }, + { "IRI-MAO", "IRI" }, + { "IRI-MAO", "MAO" }, + { "IRI-NAO", "IRI" }, + { "IRI-NAO", "NAO" }, + { "IRI-Wal", "IRI" }, + { "IRI-Wal", "Wal" }, + { "Kie-Mun", "Kie" }, + { "Kie-Mun", "Mun" }, + { "Kie-Ruh", "Kie" }, + { "Kie-Ruh", "Ruh" }, + { "Lon-NTH", "Lon" }, + { "Lon-NTH", "NTH" }, + { "Lon-Wal", "Lon" }, + { "Lon-Wal", "Wal" }, + { "Lon-Yor", "Lon" }, + { "Lon-Yor", "Yor" }, + { "Lvn-Mos", "Lvn" }, + { "Lvn-Mos", "Mos" }, + { "Lvn-Pru", "Lvn" }, + { "Lvn-Pru", "Pru" }, + { "Lvn-Stp", "Lvn" }, + { "Lvn-Stp", "Stp" }, + { "Lvn-Stp_S", "Lvn" }, + { "Lvn-War", "Lvn" }, + { "Lvn-War", "War" }, + { "Lvp-NAO", "Lvp" }, + { "Lvp-NAO", "NAO" }, + { "Lvp-Wal", "Lvp" }, + { "Lvp-Wal", "Wal" }, + { "Lvp-Yor", "Lvp" }, + { "Lvp-Yor", "Yor" }, + { "LYO-Mar", "LYO" }, + { "LYO-Mar", "Mar" }, + { "LYO-Pie", "LYO" }, + { "LYO-Pie", "Pie" }, + { "LYO-Spa_S", "LYO" }, + { "LYO-Tus", "LYO" }, + { "LYO-Tus", "Tus" }, + { "LYO-TYS", "LYO" }, + { "LYO-TYS", "TYS" }, + { "LYO-WES", "LYO" }, + { "LYO-WES", "WES" }, + { "MAO-Naf", "MAO" }, + { "MAO-Naf", "Naf" }, + { "MAO-NAO", "MAO" }, + { "MAO-NAO", "NAO" }, + { "MAO-Por", "MAO" }, + { "MAO-Por", "Por" }, + { "MAO-Spa_N", "MAO" }, + { "MAO-Spa_S", "MAO" }, + { "MAO-WES", "MAO" }, + { "MAO-WES", "WES" }, + { "Mar-Pie", "Mar" }, + { "Mar-Pie", "Pie" }, + { "Mar-Spa", "Mar" }, + { "Mar-Spa", "Spa" }, + { "Mar-Spa_S", "Mar" }, + { "Mos-Sev", "Mos" }, + { "Mos-Sev", "Sev" }, + { "Mos-Stp", "Mos" }, + { "Mos-Stp", "Stp" }, + { "Mos-Ukr", "Mos" }, + { "Mos-Ukr", "Ukr" }, + { "Mos-War", "Mos" }, + { "Mos-War", "War" }, + { "Mun-Ruh", "Mun" }, + { "Mun-Ruh", "Ruh" }, + { "Mun-Sil", "Mun" }, + { "Mun-Sil", "Sil" }, + { "Mun-Tyr", "Mun" }, + { "Mun-Tyr", "Tyr" }, + { "Naf-Tun", "Naf" }, + { "Naf-Tun", "Tun" }, + { "Naf-WES", "Naf" }, + { "Naf-WES", "WES" }, + { "NAO-NWG", "NAO" }, + { "NAO-NWG", "NWG" }, + { "Nap-Rom", "Nap" }, + { "Nap-Rom", "Rom" }, + { "Nap-TYS", "Nap" }, + { "Nap-TYS", "TYS" }, + { "NTH-NWG", "NTH" }, + { "NTH-NWG", "NWG" }, + { "NTH-Nwy", "NTH" }, + { "NTH-Nwy", "Nwy" }, + { "NTH-SKA", "NTH" }, + { "NTH-SKA", "SKA" }, + { "NTH-Yor", "NTH" }, + { "NTH-Yor", "Yor" }, + { "NWG-Nwy", "NWG" }, + { "NWG-Nwy", "Nwy" }, + { "Nwy-SKA", "Nwy" }, + { "Nwy-SKA", "SKA" }, + { "Nwy-Stp", "Nwy" }, + { "Nwy-Stp", "Stp" }, + { "Nwy-Stp_N", "Nwy" }, + { "Nwy-Swe", "Nwy" }, + { "Nwy-Swe", "Swe" }, + { "Par-Pic", "Par" }, + { "Par-Pic", "Pic" }, + { "Pie-Tus", "Pie" }, + { "Pie-Tus", "Tus" }, + { "Pie-Tyr", "Pie" }, + { "Pie-Tyr", "Tyr" }, + { "Pie-Ven", "Pie" }, + { "Pie-Ven", "Ven" }, + { "Por-Spa", "Por" }, + { "Por-Spa", "Spa" }, + { "Por-Spa_N", "Por" }, + { "Por-Spa_S", "Por" }, + { "Pru-Sil", "Pru" }, + { "Pru-Sil", "Sil" }, + { "Pru-War", "Pru" }, + { "Pru-War", "War" }, + { "Rom-Tus", "Rom" }, + { "Rom-Tus", "Tus" }, + { "Rom-TYS", "Rom" }, + { "Rom-TYS", "TYS" }, + { "Rom-Ven", "Rom" }, + { "Rom-Ven", "Ven" }, + { "Rum-Ser", "Rum" }, + { "Rum-Ser", "Ser" }, + { "Rum-Sev", "Rum" }, + { "Rum-Sev", "Sev" }, + { "Rum-Ukr", "Rum" }, + { "Rum-Ukr", "Ukr" }, + { "Ser-Tri", "Ser" }, + { "Ser-Tri", "Tri" }, + { "Sev-Ukr", "Sev" }, + { "Sev-Ukr", "Ukr" }, + { "Sil-War", "Sil" }, + { "Sil-War", "War" }, + { "SKA-Swe", "SKA" }, + { "SKA-Swe", "Swe" }, + { "Smy-Syr", "Smy" }, + { "Smy-Syr", "Syr" }, + { "Spa_S-WES", "WES" }, + { "Tri-Tyr", "Tri" }, + { "Tri-Tyr", "Tyr" }, + { "Tri-Ven", "Tri" }, + { "Tri-Ven", "Ven" }, + { "Tri-Vie", "Tri" }, + { "Tri-Vie", "Vie" }, + { "Tun-TYS", "Tun" }, + { "Tun-TYS", "TYS" }, + { "Tun-WES", "Tun" }, + { "Tun-WES", "WES" }, + { "Tus-TYS", "Tus" }, + { "Tus-TYS", "TYS" }, + { "Tus-Ven", "Tus" }, + { "Tus-Ven", "Ven" }, + { "Tyr-Ven", "Tyr" }, + { "Tyr-Ven", "Ven" }, + { "Tyr-Vie", "Tyr" }, + { "Tyr-Vie", "Vie" }, + { "TYS-WES", "TYS" }, + { "TYS-WES", "WES" }, + { "Ukr-War", "Ukr" }, + { "Ukr-War", "War" }, + { "Wal-Yor", "Wal" }, + { "Wal-Yor", "Yor" } + }); + + migrationBuilder.InsertData( + table: "Regions", + columns: new[] { "Id", "Name", "ParentId", "Type" }, + values: new object[,] + { + { "Bul_E", "Bulgaria (east coast)", "Bul", 1 }, + { "Bul_S", "Bulgaria (south coast)", "Bul", 1 }, + { "Spa_N", "Spain (north coast)", "Spa", 1 }, + { "Spa_S", "Spain (south coast)", "Spa", 1 }, + { "Stp_N", "St Petersburg (north coast)", "Stp", 1 }, + { "Stp_S", "St Petersburg (south coast)", "Stp", 1 } + }); + + migrationBuilder.InsertData( + table: "ConnectionMappings", + columns: new[] { "ConnectionsId", "RegionsId" }, + values: new object[,] + { + { "AEG-Bul_S", "Bul_S" }, + { "BAR-Stp_N", "Stp_N" }, + { "BLA-Bul_E", "Bul_E" }, + { "BOT-Stp_S", "Stp_S" }, + { "Bul_E-Con", "Bul_E" }, + { "Bul_E-Rum", "Bul_E" }, + { "Bul_S-Con", "Bul_S" }, + { "Bul_S-Gre", "Bul_S" }, + { "Fin-Stp_S", "Stp_S" }, + { "Gas-Spa_N", "Spa_N" }, + { "Lvn-Stp_S", "Stp_S" }, + { "LYO-Spa_S", "Spa_S" }, + { "MAO-Spa_N", "Spa_N" }, + { "MAO-Spa_S", "Spa_S" }, + { "Mar-Spa_S", "Spa_S" }, + { "Nwy-Stp_N", "Stp_N" }, + { "Por-Spa_N", "Spa_N" }, + { "Por-Spa_S", "Spa_S" }, + { "Spa_S-WES", "Spa_S" } + }); + + migrationBuilder.CreateIndex( + name: "IX_ConnectionMappings_RegionsId", + table: "ConnectionMappings", + column: "RegionsId"); + + migrationBuilder.CreateIndex( + name: "IX_Regions_ParentId", + table: "Regions", + column: "ParentId"); + } + } +} diff --git a/server/Migrations/GameContextModelSnapshot.cs b/server/Migrations/GameContextModelSnapshot.cs index b36c0c2..318e1d5 100644 --- a/server/Migrations/GameContextModelSnapshot.cs +++ b/server/Migrations/GameContextModelSnapshot.cs @@ -23,3378 +23,75 @@ protected override void BuildModel(ModelBuilder modelBuilder) SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - modelBuilder.Entity("ConnectionMappings", b => - { - b.Property("ConnectionsId") - .HasColumnType("nvarchar(11)"); - - b.Property("RegionsId") - .HasColumnType("nvarchar(5)"); - - b.HasKey("ConnectionsId", "RegionsId"); - - b.HasIndex("RegionsId"); - - b.ToTable("ConnectionMappings"); - - b.HasData( - new - { - ConnectionsId = "ADR-Alb", - RegionsId = "ADR" - }, - new - { - ConnectionsId = "ADR-Alb", - RegionsId = "Alb" - }, - new - { - ConnectionsId = "ADR-Apu", - RegionsId = "ADR" - }, - new - { - ConnectionsId = "ADR-Apu", - RegionsId = "Apu" - }, - new - { - ConnectionsId = "ADR-ION", - RegionsId = "ADR" - }, - new - { - ConnectionsId = "ADR-ION", - RegionsId = "ION" - }, - new - { - ConnectionsId = "ADR-Tri", - RegionsId = "ADR" - }, - new - { - ConnectionsId = "ADR-Tri", - RegionsId = "Tri" - }, - new - { - ConnectionsId = "ADR-Ven", - RegionsId = "ADR" - }, - new - { - ConnectionsId = "ADR-Ven", - RegionsId = "Ven" - }, - new - { - ConnectionsId = "AEG-Bul_S", - RegionsId = "AEG" - }, - new - { - ConnectionsId = "AEG-Bul_S", - RegionsId = "Bul_S" - }, - new - { - ConnectionsId = "AEG-Con", - RegionsId = "AEG" - }, - new - { - ConnectionsId = "AEG-Con", - RegionsId = "Con" - }, - new - { - ConnectionsId = "AEG-EAS", - RegionsId = "AEG" - }, - new - { - ConnectionsId = "AEG-EAS", - RegionsId = "EAS" - }, - new - { - ConnectionsId = "AEG-Gre", - RegionsId = "AEG" - }, - new - { - ConnectionsId = "AEG-Gre", - RegionsId = "Gre" - }, - new - { - ConnectionsId = "AEG-ION", - RegionsId = "AEG" - }, - new - { - ConnectionsId = "AEG-ION", - RegionsId = "ION" - }, - new - { - ConnectionsId = "AEG-Smy", - RegionsId = "AEG" - }, - new - { - ConnectionsId = "AEG-Smy", - RegionsId = "Smy" - }, - new - { - ConnectionsId = "Alb-Gre", - RegionsId = "Alb" - }, - new - { - ConnectionsId = "Alb-Gre", - RegionsId = "Gre" - }, - new - { - ConnectionsId = "Alb-ION", - RegionsId = "Alb" - }, - new - { - ConnectionsId = "Alb-ION", - RegionsId = "ION" - }, - new - { - ConnectionsId = "Alb-Ser", - RegionsId = "Alb" - }, - new - { - ConnectionsId = "Alb-Ser", - RegionsId = "Ser" - }, - new - { - ConnectionsId = "Alb-Tri", - RegionsId = "Alb" - }, - new - { - ConnectionsId = "Alb-Tri", - RegionsId = "Tri" - }, - new - { - ConnectionsId = "Ank-Arm", - RegionsId = "Ank" - }, - new - { - ConnectionsId = "Ank-Arm", - RegionsId = "Arm" - }, - new - { - ConnectionsId = "Ank-BLA", - RegionsId = "Ank" - }, - new - { - ConnectionsId = "Ank-BLA", - RegionsId = "BLA" - }, - new - { - ConnectionsId = "Ank-Con", - RegionsId = "Ank" - }, - new - { - ConnectionsId = "Ank-Con", - RegionsId = "Con" - }, - new - { - ConnectionsId = "Ank-Smy", - RegionsId = "Ank" - }, - new - { - ConnectionsId = "Ank-Smy", - RegionsId = "Smy" - }, - new - { - ConnectionsId = "Apu-ION", - RegionsId = "Apu" - }, - new - { - ConnectionsId = "Apu-ION", - RegionsId = "ION" - }, - new - { - ConnectionsId = "Apu-Nap", - RegionsId = "Apu" - }, - new - { - ConnectionsId = "Apu-Nap", - RegionsId = "Nap" - }, - new - { - ConnectionsId = "Apu-Rom", - RegionsId = "Apu" - }, - new - { - ConnectionsId = "Apu-Rom", - RegionsId = "Rom" - }, - new - { - ConnectionsId = "Apu-Ven", - RegionsId = "Apu" - }, - new - { - ConnectionsId = "Apu-Ven", - RegionsId = "Ven" - }, - new - { - ConnectionsId = "Arm-BLA", - RegionsId = "Arm" - }, - new - { - ConnectionsId = "Arm-BLA", - RegionsId = "BLA" - }, - new - { - ConnectionsId = "Arm-Sev", - RegionsId = "Arm" - }, - new - { - ConnectionsId = "Arm-Sev", - RegionsId = "Sev" - }, - new - { - ConnectionsId = "Arm-Smy", - RegionsId = "Arm" - }, - new - { - ConnectionsId = "Arm-Smy", - RegionsId = "Smy" - }, - new - { - ConnectionsId = "Arm-Syr", - RegionsId = "Arm" - }, - new - { - ConnectionsId = "Arm-Syr", - RegionsId = "Syr" - }, - new - { - ConnectionsId = "BAL-BOT", - RegionsId = "BAL" - }, - new - { - ConnectionsId = "BAL-BOT", - RegionsId = "BOT" - }, - new - { - ConnectionsId = "BAL-Ber", - RegionsId = "BAL" - }, - new - { - ConnectionsId = "BAL-Ber", - RegionsId = "Ber" - }, - new - { - ConnectionsId = "BAL-Den", - RegionsId = "BAL" - }, - new - { - ConnectionsId = "BAL-Den", - RegionsId = "Den" - }, - new - { - ConnectionsId = "BAL-Kie", - RegionsId = "BAL" - }, - new - { - ConnectionsId = "BAL-Kie", - RegionsId = "Kie" - }, - new - { - ConnectionsId = "BAL-Lvn", - RegionsId = "BAL" - }, - new - { - ConnectionsId = "BAL-Lvn", - RegionsId = "Lvn" - }, - new - { - ConnectionsId = "BAL-Pru", - RegionsId = "BAL" - }, - new - { - ConnectionsId = "BAL-Pru", - RegionsId = "Pru" - }, - new - { - ConnectionsId = "BAL-Swe", - RegionsId = "BAL" - }, - new - { - ConnectionsId = "BAL-Swe", - RegionsId = "Swe" - }, - new - { - ConnectionsId = "BAR-NWG", - RegionsId = "BAR" - }, - new - { - ConnectionsId = "BAR-NWG", - RegionsId = "NWG" - }, - new - { - ConnectionsId = "BAR-Nwy", - RegionsId = "BAR" - }, - new - { - ConnectionsId = "BAR-Nwy", - RegionsId = "Nwy" - }, - new - { - ConnectionsId = "BAR-Stp_N", - RegionsId = "BAR" - }, - new - { - ConnectionsId = "BAR-Stp_N", - RegionsId = "Stp_N" - }, - new - { - ConnectionsId = "Bel-Bur", - RegionsId = "Bel" - }, - new - { - ConnectionsId = "Bel-Bur", - RegionsId = "Bur" - }, - new - { - ConnectionsId = "Bel-ENG", - RegionsId = "Bel" - }, - new - { - ConnectionsId = "Bel-ENG", - RegionsId = "ENG" - }, - new - { - ConnectionsId = "Bel-Hol", - RegionsId = "Bel" - }, - new - { - ConnectionsId = "Bel-Hol", - RegionsId = "Hol" - }, - new - { - ConnectionsId = "Bel-NTH", - RegionsId = "Bel" - }, - new - { - ConnectionsId = "Bel-NTH", - RegionsId = "NTH" - }, - new - { - ConnectionsId = "Bel-Pic", - RegionsId = "Bel" - }, - new - { - ConnectionsId = "Bel-Pic", - RegionsId = "Pic" - }, - new - { - ConnectionsId = "Bel-Ruh", - RegionsId = "Bel" - }, - new - { - ConnectionsId = "Bel-Ruh", - RegionsId = "Ruh" - }, - new - { - ConnectionsId = "Ber-Kie", - RegionsId = "Ber" - }, - new - { - ConnectionsId = "Ber-Kie", - RegionsId = "Kie" - }, - new - { - ConnectionsId = "Ber-Mun", - RegionsId = "Ber" - }, - new - { - ConnectionsId = "Ber-Mun", - RegionsId = "Mun" - }, - new - { - ConnectionsId = "Ber-Pru", - RegionsId = "Ber" - }, - new - { - ConnectionsId = "Ber-Pru", - RegionsId = "Pru" - }, - new - { - ConnectionsId = "Ber-Sil", - RegionsId = "Ber" - }, - new - { - ConnectionsId = "Ber-Sil", - RegionsId = "Sil" - }, - new - { - ConnectionsId = "BLA-Bul_E", - RegionsId = "BLA" - }, - new - { - ConnectionsId = "BLA-Bul_E", - RegionsId = "Bul_E" - }, - new - { - ConnectionsId = "BLA-Con", - RegionsId = "BLA" - }, - new - { - ConnectionsId = "BLA-Con", - RegionsId = "Con" - }, - new - { - ConnectionsId = "BLA-Rum", - RegionsId = "BLA" - }, - new - { - ConnectionsId = "BLA-Rum", - RegionsId = "Rum" - }, - new - { - ConnectionsId = "BLA-Sev", - RegionsId = "BLA" - }, - new - { - ConnectionsId = "BLA-Sev", - RegionsId = "Sev" - }, - new - { - ConnectionsId = "Boh-Gal", - RegionsId = "Boh" - }, - new - { - ConnectionsId = "Boh-Gal", - RegionsId = "Gal" - }, - new - { - ConnectionsId = "Boh-Mun", - RegionsId = "Boh" - }, - new - { - ConnectionsId = "Boh-Mun", - RegionsId = "Mun" - }, - new - { - ConnectionsId = "Boh-Sil", - RegionsId = "Boh" - }, - new - { - ConnectionsId = "Boh-Sil", - RegionsId = "Sil" - }, - new - { - ConnectionsId = "Boh-Tyr", - RegionsId = "Boh" - }, - new - { - ConnectionsId = "Boh-Tyr", - RegionsId = "Tyr" - }, - new - { - ConnectionsId = "Boh-Vie", - RegionsId = "Boh" - }, - new - { - ConnectionsId = "Boh-Vie", - RegionsId = "Vie" - }, - new - { - ConnectionsId = "BOT-Fin", - RegionsId = "BOT" - }, - new - { - ConnectionsId = "BOT-Fin", - RegionsId = "Fin" - }, - new - { - ConnectionsId = "BOT-Lvn", - RegionsId = "BOT" - }, - new - { - ConnectionsId = "BOT-Lvn", - RegionsId = "Lvn" - }, - new - { - ConnectionsId = "BOT-Stp_S", - RegionsId = "BOT" - }, - new - { - ConnectionsId = "BOT-Stp_S", - RegionsId = "Stp_S" - }, - new - { - ConnectionsId = "BOT-Swe", - RegionsId = "BOT" - }, - new - { - ConnectionsId = "BOT-Swe", - RegionsId = "Swe" - }, - new - { - ConnectionsId = "Bre-ENG", - RegionsId = "Bre" - }, - new - { - ConnectionsId = "Bre-ENG", - RegionsId = "ENG" - }, - new - { - ConnectionsId = "Bre-Gas", - RegionsId = "Bre" - }, - new - { - ConnectionsId = "Bre-Gas", - RegionsId = "Gas" - }, - new - { - ConnectionsId = "Bre-MAO", - RegionsId = "Bre" - }, - new - { - ConnectionsId = "Bre-MAO", - RegionsId = "MAO" - }, - new - { - ConnectionsId = "Bre-Par", - RegionsId = "Bre" - }, - new - { - ConnectionsId = "Bre-Par", - RegionsId = "Par" - }, - new - { - ConnectionsId = "Bre-Pic", - RegionsId = "Bre" - }, - new - { - ConnectionsId = "Bre-Pic", - RegionsId = "Pic" - }, - new - { - ConnectionsId = "Bud-Gal", - RegionsId = "Bud" - }, - new - { - ConnectionsId = "Bud-Gal", - RegionsId = "Gal" - }, - new - { - ConnectionsId = "Bud-Rum", - RegionsId = "Bud" - }, - new - { - ConnectionsId = "Bud-Rum", - RegionsId = "Rum" - }, - new - { - ConnectionsId = "Bud-Ser", - RegionsId = "Bud" - }, - new - { - ConnectionsId = "Bud-Ser", - RegionsId = "Ser" - }, - new - { - ConnectionsId = "Bud-Tri", - RegionsId = "Bud" - }, - new - { - ConnectionsId = "Bud-Tri", - RegionsId = "Tri" - }, - new - { - ConnectionsId = "Bud-Vie", - RegionsId = "Bud" - }, - new - { - ConnectionsId = "Bud-Vie", - RegionsId = "Vie" - }, - new - { - ConnectionsId = "Bul-Con", - RegionsId = "Bul" - }, - new - { - ConnectionsId = "Bul-Con", - RegionsId = "Con" - }, - new - { - ConnectionsId = "Bul-Gre", - RegionsId = "Bul" - }, - new - { - ConnectionsId = "Bul-Gre", - RegionsId = "Gre" - }, - new - { - ConnectionsId = "Bul-Rum", - RegionsId = "Bul" - }, - new - { - ConnectionsId = "Bul-Rum", - RegionsId = "Rum" - }, - new - { - ConnectionsId = "Bul-Ser", - RegionsId = "Bul" - }, - new - { - ConnectionsId = "Bul-Ser", - RegionsId = "Ser" - }, - new - { - ConnectionsId = "Bul_E-Con", - RegionsId = "Bul_E" - }, - new - { - ConnectionsId = "Bul_E-Con", - RegionsId = "Con" - }, - new - { - ConnectionsId = "Bul_E-Rum", - RegionsId = "Bul_E" - }, - new - { - ConnectionsId = "Bul_E-Rum", - RegionsId = "Rum" - }, - new - { - ConnectionsId = "Bul_S-Con", - RegionsId = "Bul_S" - }, - new - { - ConnectionsId = "Bul_S-Con", - RegionsId = "Con" - }, - new - { - ConnectionsId = "Bul_S-Gre", - RegionsId = "Bul_S" - }, - new - { - ConnectionsId = "Bul_S-Gre", - RegionsId = "Gre" - }, - new - { - ConnectionsId = "Bur-Gas", - RegionsId = "Bur" - }, - new - { - ConnectionsId = "Bur-Gas", - RegionsId = "Gas" - }, - new - { - ConnectionsId = "Bur-Mar", - RegionsId = "Bur" - }, - new - { - ConnectionsId = "Bur-Mar", - RegionsId = "Mar" - }, - new - { - ConnectionsId = "Bur-Mun", - RegionsId = "Bur" - }, - new - { - ConnectionsId = "Bur-Mun", - RegionsId = "Mun" - }, - new - { - ConnectionsId = "Bur-Par", - RegionsId = "Bur" - }, - new - { - ConnectionsId = "Bur-Par", - RegionsId = "Par" - }, - new - { - ConnectionsId = "Bur-Pic", - RegionsId = "Bur" - }, - new - { - ConnectionsId = "Bur-Pic", - RegionsId = "Pic" - }, - new - { - ConnectionsId = "Bur-Ruh", - RegionsId = "Bur" - }, - new - { - ConnectionsId = "Bur-Ruh", - RegionsId = "Ruh" - }, - new - { - ConnectionsId = "Con-Smy", - RegionsId = "Con" - }, - new - { - ConnectionsId = "Con-Smy", - RegionsId = "Smy" - }, - new - { - ConnectionsId = "Cly-Edi", - RegionsId = "Cly" - }, - new - { - ConnectionsId = "Cly-Edi", - RegionsId = "Edi" - }, - new - { - ConnectionsId = "Cly-Lvp", - RegionsId = "Cly" - }, - new - { - ConnectionsId = "Cly-Lvp", - RegionsId = "Lvp" - }, - new - { - ConnectionsId = "Cly-NAO", - RegionsId = "Cly" - }, - new - { - ConnectionsId = "Cly-NAO", - RegionsId = "NAO" - }, - new - { - ConnectionsId = "Cly-NWG", - RegionsId = "Cly" - }, - new - { - ConnectionsId = "Cly-NWG", - RegionsId = "NWG" - }, - new - { - ConnectionsId = "Den-HEL", - RegionsId = "Den" - }, - new - { - ConnectionsId = "Den-HEL", - RegionsId = "HEL" - }, - new - { - ConnectionsId = "Den-Kie", - RegionsId = "Den" - }, - new - { - ConnectionsId = "Den-Kie", - RegionsId = "Kie" - }, - new - { - ConnectionsId = "Den-NTH", - RegionsId = "Den" - }, - new - { - ConnectionsId = "Den-NTH", - RegionsId = "NTH" - }, - new - { - ConnectionsId = "Den-SKA", - RegionsId = "Den" - }, - new - { - ConnectionsId = "Den-SKA", - RegionsId = "SKA" - }, - new - { - ConnectionsId = "Den-Swe", - RegionsId = "Den" - }, - new - { - ConnectionsId = "Den-Swe", - RegionsId = "Swe" - }, - new - { - ConnectionsId = "EAS-ION", - RegionsId = "EAS" - }, - new - { - ConnectionsId = "EAS-ION", - RegionsId = "ION" - }, - new - { - ConnectionsId = "EAS-Smy", - RegionsId = "EAS" - }, - new - { - ConnectionsId = "EAS-Smy", - RegionsId = "Smy" - }, - new - { - ConnectionsId = "EAS-Syr", - RegionsId = "EAS" - }, - new - { - ConnectionsId = "EAS-Syr", - RegionsId = "Syr" - }, - new - { - ConnectionsId = "Edi-Lvp", - RegionsId = "Edi" - }, - new - { - ConnectionsId = "Edi-Lvp", - RegionsId = "Lvp" - }, - new - { - ConnectionsId = "Edi-NTH", - RegionsId = "Edi" - }, - new - { - ConnectionsId = "Edi-NTH", - RegionsId = "NTH" - }, - new - { - ConnectionsId = "Edi-NWG", - RegionsId = "Edi" - }, - new - { - ConnectionsId = "Edi-NWG", - RegionsId = "NWG" - }, - new - { - ConnectionsId = "Edi-Yor", - RegionsId = "Edi" - }, - new - { - ConnectionsId = "Edi-Yor", - RegionsId = "Yor" - }, - new - { - ConnectionsId = "ENG-IRI", - RegionsId = "ENG" - }, - new - { - ConnectionsId = "ENG-IRI", - RegionsId = "IRI" - }, - new - { - ConnectionsId = "ENG-Lon", - RegionsId = "ENG" - }, - new - { - ConnectionsId = "ENG-Lon", - RegionsId = "Lon" - }, - new - { - ConnectionsId = "ENG-MAO", - RegionsId = "ENG" - }, - new - { - ConnectionsId = "ENG-MAO", - RegionsId = "MAO" - }, - new - { - ConnectionsId = "ENG-NTH", - RegionsId = "ENG" - }, - new - { - ConnectionsId = "ENG-NTH", - RegionsId = "NTH" - }, - new - { - ConnectionsId = "ENG-Pic", - RegionsId = "ENG" - }, - new - { - ConnectionsId = "ENG-Pic", - RegionsId = "Pic" - }, - new - { - ConnectionsId = "ENG-Wal", - RegionsId = "ENG" - }, - new - { - ConnectionsId = "ENG-Wal", - RegionsId = "Wal" - }, - new - { - ConnectionsId = "Fin-Nwy", - RegionsId = "Fin" - }, - new - { - ConnectionsId = "Fin-Nwy", - RegionsId = "Nwy" - }, - new - { - ConnectionsId = "Fin-Stp", - RegionsId = "Fin" - }, - new - { - ConnectionsId = "Fin-Stp", - RegionsId = "Stp" - }, - new - { - ConnectionsId = "Fin-Stp_S", - RegionsId = "Fin" - }, - new - { - ConnectionsId = "Fin-Stp_S", - RegionsId = "Stp_S" - }, - new - { - ConnectionsId = "Fin-Swe", - RegionsId = "Fin" - }, - new - { - ConnectionsId = "Fin-Swe", - RegionsId = "Swe" - }, - new - { - ConnectionsId = "Gal-Rum", - RegionsId = "Gal" - }, - new - { - ConnectionsId = "Gal-Rum", - RegionsId = "Rum" - }, - new - { - ConnectionsId = "Gal-Sil", - RegionsId = "Gal" - }, - new - { - ConnectionsId = "Gal-Sil", - RegionsId = "Sil" - }, - new - { - ConnectionsId = "Gal-Ukr", - RegionsId = "Gal" - }, - new - { - ConnectionsId = "Gal-Ukr", - RegionsId = "Ukr" - }, - new - { - ConnectionsId = "Gal-Vie", - RegionsId = "Gal" - }, - new - { - ConnectionsId = "Gal-Vie", - RegionsId = "Vie" - }, - new - { - ConnectionsId = "Gal-War", - RegionsId = "Gal" - }, - new - { - ConnectionsId = "Gal-War", - RegionsId = "War" - }, - new - { - ConnectionsId = "Gas-MAO", - RegionsId = "Gas" - }, - new - { - ConnectionsId = "Gas-MAO", - RegionsId = "MAO" - }, - new - { - ConnectionsId = "Gas-Mar", - RegionsId = "Gas" - }, - new - { - ConnectionsId = "Gas-Mar", - RegionsId = "Mar" - }, - new - { - ConnectionsId = "Gas-Par", - RegionsId = "Gas" - }, - new - { - ConnectionsId = "Gas-Par", - RegionsId = "Par" - }, - new - { - ConnectionsId = "Gas-Spa", - RegionsId = "Gas" - }, - new - { - ConnectionsId = "Gas-Spa", - RegionsId = "Spa" - }, - new - { - ConnectionsId = "Gas-Spa_N", - RegionsId = "Gas" - }, - new - { - ConnectionsId = "Gas-Spa_N", - RegionsId = "Spa_N" - }, - new - { - ConnectionsId = "Gre-Ser", - RegionsId = "Gre" - }, - new - { - ConnectionsId = "Gre-Ser", - RegionsId = "Ser" - }, - new - { - ConnectionsId = "Gre-ION", - RegionsId = "Gre" - }, - new - { - ConnectionsId = "Gre-ION", - RegionsId = "ION" - }, - new - { - ConnectionsId = "HEL-Hol", - RegionsId = "HEL" - }, - new - { - ConnectionsId = "HEL-Hol", - RegionsId = "Hol" - }, - new - { - ConnectionsId = "HEL-Kie", - RegionsId = "HEL" - }, - new - { - ConnectionsId = "HEL-Kie", - RegionsId = "Kie" - }, - new - { - ConnectionsId = "HEL-NTH", - RegionsId = "HEL" - }, - new - { - ConnectionsId = "HEL-NTH", - RegionsId = "NTH" - }, - new - { - ConnectionsId = "Hol-Kie", - RegionsId = "Hol" - }, - new - { - ConnectionsId = "Hol-Kie", - RegionsId = "Kie" - }, - new - { - ConnectionsId = "Hol-NTH", - RegionsId = "Hol" - }, - new - { - ConnectionsId = "Hol-NTH", - RegionsId = "NTH" - }, - new - { - ConnectionsId = "Hol-Ruh", - RegionsId = "Hol" - }, - new - { - ConnectionsId = "Hol-Ruh", - RegionsId = "Ruh" - }, - new - { - ConnectionsId = "ION-Nap", - RegionsId = "ION" - }, - new - { - ConnectionsId = "ION-Nap", - RegionsId = "Nap" - }, - new - { - ConnectionsId = "ION-Tun", - RegionsId = "ION" - }, - new - { - ConnectionsId = "ION-Tun", - RegionsId = "Tun" - }, - new - { - ConnectionsId = "ION-TYS", - RegionsId = "ION" - }, - new - { - ConnectionsId = "ION-TYS", - RegionsId = "TYS" - }, - new - { - ConnectionsId = "IRI-Lvp", - RegionsId = "IRI" - }, - new - { - ConnectionsId = "IRI-Lvp", - RegionsId = "Lvp" - }, - new - { - ConnectionsId = "IRI-MAO", - RegionsId = "IRI" - }, - new - { - ConnectionsId = "IRI-MAO", - RegionsId = "MAO" - }, - new - { - ConnectionsId = "IRI-NAO", - RegionsId = "IRI" - }, - new - { - ConnectionsId = "IRI-NAO", - RegionsId = "NAO" - }, - new - { - ConnectionsId = "IRI-Wal", - RegionsId = "IRI" - }, - new - { - ConnectionsId = "IRI-Wal", - RegionsId = "Wal" - }, - new - { - ConnectionsId = "Kie-Mun", - RegionsId = "Kie" - }, - new - { - ConnectionsId = "Kie-Mun", - RegionsId = "Mun" - }, - new - { - ConnectionsId = "Kie-Ruh", - RegionsId = "Kie" - }, - new - { - ConnectionsId = "Kie-Ruh", - RegionsId = "Ruh" - }, - new - { - ConnectionsId = "Lon-NTH", - RegionsId = "Lon" - }, - new - { - ConnectionsId = "Lon-NTH", - RegionsId = "NTH" - }, - new - { - ConnectionsId = "Lon-Wal", - RegionsId = "Lon" - }, - new - { - ConnectionsId = "Lon-Wal", - RegionsId = "Wal" - }, - new - { - ConnectionsId = "Lon-Yor", - RegionsId = "Lon" - }, - new - { - ConnectionsId = "Lon-Yor", - RegionsId = "Yor" - }, - new - { - ConnectionsId = "Lvn-Mos", - RegionsId = "Lvn" - }, - new - { - ConnectionsId = "Lvn-Mos", - RegionsId = "Mos" - }, - new - { - ConnectionsId = "Lvn-Pru", - RegionsId = "Lvn" - }, - new - { - ConnectionsId = "Lvn-Pru", - RegionsId = "Pru" - }, - new - { - ConnectionsId = "Lvn-Stp", - RegionsId = "Lvn" - }, - new - { - ConnectionsId = "Lvn-Stp", - RegionsId = "Stp" - }, - new - { - ConnectionsId = "Lvn-Stp_S", - RegionsId = "Lvn" - }, - new - { - ConnectionsId = "Lvn-Stp_S", - RegionsId = "Stp_S" - }, - new - { - ConnectionsId = "Lvn-War", - RegionsId = "Lvn" - }, - new - { - ConnectionsId = "Lvn-War", - RegionsId = "War" - }, - new - { - ConnectionsId = "Lvp-NAO", - RegionsId = "Lvp" - }, - new - { - ConnectionsId = "Lvp-NAO", - RegionsId = "NAO" - }, - new - { - ConnectionsId = "Lvp-Wal", - RegionsId = "Lvp" - }, - new - { - ConnectionsId = "Lvp-Wal", - RegionsId = "Wal" - }, - new - { - ConnectionsId = "Lvp-Yor", - RegionsId = "Lvp" - }, - new - { - ConnectionsId = "Lvp-Yor", - RegionsId = "Yor" - }, - new - { - ConnectionsId = "LYO-Mar", - RegionsId = "LYO" - }, - new - { - ConnectionsId = "LYO-Mar", - RegionsId = "Mar" - }, - new - { - ConnectionsId = "LYO-Pie", - RegionsId = "LYO" - }, - new - { - ConnectionsId = "LYO-Pie", - RegionsId = "Pie" - }, - new - { - ConnectionsId = "LYO-Spa_S", - RegionsId = "LYO" - }, - new - { - ConnectionsId = "LYO-Spa_S", - RegionsId = "Spa_S" - }, - new - { - ConnectionsId = "LYO-Tus", - RegionsId = "LYO" - }, - new - { - ConnectionsId = "LYO-Tus", - RegionsId = "Tus" - }, - new - { - ConnectionsId = "LYO-TYS", - RegionsId = "LYO" - }, - new - { - ConnectionsId = "LYO-TYS", - RegionsId = "TYS" - }, - new - { - ConnectionsId = "LYO-WES", - RegionsId = "LYO" - }, - new - { - ConnectionsId = "LYO-WES", - RegionsId = "WES" - }, - new - { - ConnectionsId = "MAO-Naf", - RegionsId = "MAO" - }, - new - { - ConnectionsId = "MAO-Naf", - RegionsId = "Naf" - }, - new - { - ConnectionsId = "MAO-NAO", - RegionsId = "MAO" - }, - new - { - ConnectionsId = "MAO-NAO", - RegionsId = "NAO" - }, - new - { - ConnectionsId = "MAO-Por", - RegionsId = "MAO" - }, - new - { - ConnectionsId = "MAO-Por", - RegionsId = "Por" - }, - new - { - ConnectionsId = "MAO-Spa_N", - RegionsId = "MAO" - }, - new - { - ConnectionsId = "MAO-Spa_N", - RegionsId = "Spa_N" - }, - new - { - ConnectionsId = "MAO-Spa_S", - RegionsId = "MAO" - }, - new - { - ConnectionsId = "MAO-Spa_S", - RegionsId = "Spa_S" - }, - new - { - ConnectionsId = "MAO-WES", - RegionsId = "MAO" - }, - new - { - ConnectionsId = "MAO-WES", - RegionsId = "WES" - }, - new - { - ConnectionsId = "Mar-Pie", - RegionsId = "Mar" - }, - new - { - ConnectionsId = "Mar-Pie", - RegionsId = "Pie" - }, - new - { - ConnectionsId = "Mar-Spa", - RegionsId = "Mar" - }, - new - { - ConnectionsId = "Mar-Spa", - RegionsId = "Spa" - }, - new - { - ConnectionsId = "Mar-Spa_S", - RegionsId = "Mar" - }, - new - { - ConnectionsId = "Mar-Spa_S", - RegionsId = "Spa_S" - }, - new - { - ConnectionsId = "Mos-Sev", - RegionsId = "Mos" - }, - new - { - ConnectionsId = "Mos-Sev", - RegionsId = "Sev" - }, - new - { - ConnectionsId = "Mos-Stp", - RegionsId = "Mos" - }, - new - { - ConnectionsId = "Mos-Stp", - RegionsId = "Stp" - }, - new - { - ConnectionsId = "Mos-Ukr", - RegionsId = "Mos" - }, - new - { - ConnectionsId = "Mos-Ukr", - RegionsId = "Ukr" - }, - new - { - ConnectionsId = "Mos-War", - RegionsId = "Mos" - }, - new - { - ConnectionsId = "Mos-War", - RegionsId = "War" - }, - new - { - ConnectionsId = "Mun-Ruh", - RegionsId = "Mun" - }, - new - { - ConnectionsId = "Mun-Ruh", - RegionsId = "Ruh" - }, - new - { - ConnectionsId = "Mun-Sil", - RegionsId = "Mun" - }, - new - { - ConnectionsId = "Mun-Sil", - RegionsId = "Sil" - }, - new - { - ConnectionsId = "Mun-Tyr", - RegionsId = "Mun" - }, - new - { - ConnectionsId = "Mun-Tyr", - RegionsId = "Tyr" - }, - new - { - ConnectionsId = "Naf-Tun", - RegionsId = "Naf" - }, - new - { - ConnectionsId = "Naf-Tun", - RegionsId = "Tun" - }, - new - { - ConnectionsId = "Naf-WES", - RegionsId = "Naf" - }, - new - { - ConnectionsId = "Naf-WES", - RegionsId = "WES" - }, - new - { - ConnectionsId = "NAO-NWG", - RegionsId = "NAO" - }, - new - { - ConnectionsId = "NAO-NWG", - RegionsId = "NWG" - }, - new - { - ConnectionsId = "Nap-Rom", - RegionsId = "Nap" - }, - new - { - ConnectionsId = "Nap-Rom", - RegionsId = "Rom" - }, - new - { - ConnectionsId = "Nap-TYS", - RegionsId = "Nap" - }, - new - { - ConnectionsId = "Nap-TYS", - RegionsId = "TYS" - }, - new - { - ConnectionsId = "NTH-NWG", - RegionsId = "NTH" - }, - new - { - ConnectionsId = "NTH-NWG", - RegionsId = "NWG" - }, - new - { - ConnectionsId = "NTH-Nwy", - RegionsId = "NTH" - }, - new - { - ConnectionsId = "NTH-Nwy", - RegionsId = "Nwy" - }, - new - { - ConnectionsId = "NTH-SKA", - RegionsId = "NTH" - }, - new - { - ConnectionsId = "NTH-SKA", - RegionsId = "SKA" - }, - new - { - ConnectionsId = "NTH-Yor", - RegionsId = "NTH" - }, - new - { - ConnectionsId = "NTH-Yor", - RegionsId = "Yor" - }, - new - { - ConnectionsId = "NWG-Nwy", - RegionsId = "NWG" - }, - new - { - ConnectionsId = "NWG-Nwy", - RegionsId = "Nwy" - }, - new - { - ConnectionsId = "Nwy-SKA", - RegionsId = "Nwy" - }, - new - { - ConnectionsId = "Nwy-SKA", - RegionsId = "SKA" - }, - new - { - ConnectionsId = "Nwy-Stp", - RegionsId = "Nwy" - }, - new - { - ConnectionsId = "Nwy-Stp", - RegionsId = "Stp" - }, - new - { - ConnectionsId = "Nwy-Stp_N", - RegionsId = "Nwy" - }, - new - { - ConnectionsId = "Nwy-Stp_N", - RegionsId = "Stp_N" - }, - new - { - ConnectionsId = "Nwy-Swe", - RegionsId = "Nwy" - }, - new - { - ConnectionsId = "Nwy-Swe", - RegionsId = "Swe" - }, - new - { - ConnectionsId = "Par-Pic", - RegionsId = "Par" - }, - new - { - ConnectionsId = "Par-Pic", - RegionsId = "Pic" - }, - new - { - ConnectionsId = "Pie-Tus", - RegionsId = "Pie" - }, - new - { - ConnectionsId = "Pie-Tus", - RegionsId = "Tus" - }, - new - { - ConnectionsId = "Pie-Tyr", - RegionsId = "Pie" - }, - new - { - ConnectionsId = "Pie-Tyr", - RegionsId = "Tyr" - }, - new - { - ConnectionsId = "Pie-Ven", - RegionsId = "Pie" - }, - new - { - ConnectionsId = "Pie-Ven", - RegionsId = "Ven" - }, - new - { - ConnectionsId = "Por-Spa", - RegionsId = "Por" - }, - new - { - ConnectionsId = "Por-Spa", - RegionsId = "Spa" - }, - new - { - ConnectionsId = "Por-Spa_N", - RegionsId = "Por" - }, - new - { - ConnectionsId = "Por-Spa_N", - RegionsId = "Spa_N" - }, - new - { - ConnectionsId = "Por-Spa_S", - RegionsId = "Por" - }, - new - { - ConnectionsId = "Por-Spa_S", - RegionsId = "Spa_S" - }, - new - { - ConnectionsId = "Pru-Sil", - RegionsId = "Pru" - }, - new - { - ConnectionsId = "Pru-Sil", - RegionsId = "Sil" - }, - new - { - ConnectionsId = "Pru-War", - RegionsId = "Pru" - }, - new - { - ConnectionsId = "Pru-War", - RegionsId = "War" - }, - new - { - ConnectionsId = "Rom-Tus", - RegionsId = "Rom" - }, - new - { - ConnectionsId = "Rom-Tus", - RegionsId = "Tus" - }, - new - { - ConnectionsId = "Rom-TYS", - RegionsId = "Rom" - }, - new - { - ConnectionsId = "Rom-TYS", - RegionsId = "TYS" - }, - new - { - ConnectionsId = "Rom-Ven", - RegionsId = "Rom" - }, - new - { - ConnectionsId = "Rom-Ven", - RegionsId = "Ven" - }, - new - { - ConnectionsId = "Rum-Ser", - RegionsId = "Rum" - }, - new - { - ConnectionsId = "Rum-Ser", - RegionsId = "Ser" - }, - new - { - ConnectionsId = "Rum-Sev", - RegionsId = "Rum" - }, - new - { - ConnectionsId = "Rum-Sev", - RegionsId = "Sev" - }, - new - { - ConnectionsId = "Rum-Ukr", - RegionsId = "Rum" - }, - new - { - ConnectionsId = "Rum-Ukr", - RegionsId = "Ukr" - }, - new - { - ConnectionsId = "Ser-Tri", - RegionsId = "Ser" - }, - new - { - ConnectionsId = "Ser-Tri", - RegionsId = "Tri" - }, - new - { - ConnectionsId = "Sev-Ukr", - RegionsId = "Sev" - }, - new - { - ConnectionsId = "Sev-Ukr", - RegionsId = "Ukr" - }, - new - { - ConnectionsId = "Sil-War", - RegionsId = "Sil" - }, - new - { - ConnectionsId = "Sil-War", - RegionsId = "War" - }, - new - { - ConnectionsId = "SKA-Swe", - RegionsId = "SKA" - }, - new - { - ConnectionsId = "SKA-Swe", - RegionsId = "Swe" - }, - new - { - ConnectionsId = "Smy-Syr", - RegionsId = "Smy" - }, - new - { - ConnectionsId = "Smy-Syr", - RegionsId = "Syr" - }, - new - { - ConnectionsId = "Spa_S-WES", - RegionsId = "Spa_S" - }, - new - { - ConnectionsId = "Spa_S-WES", - RegionsId = "WES" - }, - new - { - ConnectionsId = "Tri-Tyr", - RegionsId = "Tri" - }, - new - { - ConnectionsId = "Tri-Tyr", - RegionsId = "Tyr" - }, - new - { - ConnectionsId = "Tri-Ven", - RegionsId = "Tri" - }, - new - { - ConnectionsId = "Tri-Ven", - RegionsId = "Ven" - }, - new - { - ConnectionsId = "Tri-Vie", - RegionsId = "Tri" - }, - new - { - ConnectionsId = "Tri-Vie", - RegionsId = "Vie" - }, - new - { - ConnectionsId = "Tun-TYS", - RegionsId = "Tun" - }, - new - { - ConnectionsId = "Tun-TYS", - RegionsId = "TYS" - }, - new - { - ConnectionsId = "Tun-WES", - RegionsId = "Tun" - }, - new - { - ConnectionsId = "Tun-WES", - RegionsId = "WES" - }, - new - { - ConnectionsId = "Tus-TYS", - RegionsId = "Tus" - }, - new - { - ConnectionsId = "Tus-TYS", - RegionsId = "TYS" - }, - new - { - ConnectionsId = "Tus-Ven", - RegionsId = "Tus" - }, - new - { - ConnectionsId = "Tus-Ven", - RegionsId = "Ven" - }, - new - { - ConnectionsId = "Tyr-Ven", - RegionsId = "Tyr" - }, - new - { - ConnectionsId = "Tyr-Ven", - RegionsId = "Ven" - }, - new - { - ConnectionsId = "Tyr-Vie", - RegionsId = "Tyr" - }, - new - { - ConnectionsId = "Tyr-Vie", - RegionsId = "Vie" - }, - new - { - ConnectionsId = "TYS-WES", - RegionsId = "TYS" - }, - new - { - ConnectionsId = "TYS-WES", - RegionsId = "WES" - }, - new - { - ConnectionsId = "Ukr-War", - RegionsId = "Ukr" - }, - new - { - ConnectionsId = "Ukr-War", - RegionsId = "War" - }, - new - { - ConnectionsId = "Wal-Yor", - RegionsId = "Wal" - }, - new - { - ConnectionsId = "Wal-Yor", - RegionsId = "Yor" - }); - }); - - modelBuilder.Entity("Entities.Board", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ChildTimelines") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("Phase") - .HasColumnType("int"); - - b.Property("Timeline") - .HasColumnType("int"); - - b.Property("WorldId") - .HasColumnType("int"); - - b.Property("Year") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("WorldId"); - - b.ToTable("Boards"); - }); - - modelBuilder.Entity("Entities.Centre", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("BoardId") - .HasColumnType("int"); - - b.Property("Owner") - .HasColumnType("int"); - - b.ComplexProperty>("Location", "Entities.Centre.Location#Location", b1 => - { - b1.IsRequired(); - - b1.Property("Phase") - .HasColumnType("int"); - - b1.Property("RegionId") - .IsRequired() - .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); - - b1.Property("Timeline") - .HasColumnType("int"); - - b1.Property("Year") - .HasColumnType("int"); - }); - - b.HasKey("Id"); - - b.HasIndex("BoardId"); - - b.ToTable("Centres"); - }); - - modelBuilder.Entity("Entities.Connection", b => - { - b.Property("Id") - .HasMaxLength(11) - .HasColumnType("nvarchar(11)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.ToTable("Connections"); - - b.HasData( - new - { - Id = "ADR-Alb", - Type = 2 - }, - new - { - Id = "ADR-Apu", - Type = 2 - }, - new - { - Id = "ADR-ION", - Type = 2 - }, - new - { - Id = "ADR-Tri", - Type = 2 - }, - new - { - Id = "ADR-Ven", - Type = 2 - }, - new - { - Id = "AEG-Bul_S", - Type = 2 - }, - new - { - Id = "AEG-Con", - Type = 2 - }, - new - { - Id = "AEG-EAS", - Type = 2 - }, - new - { - Id = "AEG-Gre", - Type = 2 - }, - new - { - Id = "AEG-ION", - Type = 2 - }, - new - { - Id = "AEG-Smy", - Type = 2 - }, - new - { - Id = "Alb-Gre", - Type = 1 - }, - new - { - Id = "Alb-ION", - Type = 2 - }, - new - { - Id = "Alb-Ser", - Type = 0 - }, - new - { - Id = "Alb-Tri", - Type = 1 - }, - new - { - Id = "Ank-Arm", - Type = 1 - }, - new - { - Id = "Ank-BLA", - Type = 2 - }, - new - { - Id = "Ank-Con", - Type = 1 - }, - new - { - Id = "Ank-Smy", - Type = 0 - }, - new - { - Id = "Apu-ION", - Type = 2 - }, - new - { - Id = "Apu-Nap", - Type = 1 - }, - new - { - Id = "Apu-Rom", - Type = 0 - }, - new - { - Id = "Apu-Ven", - Type = 0 - }, - new - { - Id = "Arm-BLA", - Type = 2 - }, - new - { - Id = "Arm-Sev", - Type = 1 - }, - new - { - Id = "Arm-Smy", - Type = 0 - }, - new - { - Id = "Arm-Syr", - Type = 0 - }, - new - { - Id = "BAL-BOT", - Type = 2 - }, - new - { - Id = "BAL-Ber", - Type = 2 - }, - new - { - Id = "BAL-Den", - Type = 2 - }, - new - { - Id = "BAL-Kie", - Type = 2 - }, - new - { - Id = "BAL-Lvn", - Type = 2 - }, - new - { - Id = "BAL-Pru", - Type = 2 - }, - new - { - Id = "BAL-Swe", - Type = 2 - }, - new - { - Id = "BAR-NWG", - Type = 2 - }, - new - { - Id = "BAR-Nwy", - Type = 2 - }, - new - { - Id = "BAR-Stp_N", - Type = 2 - }, - new - { - Id = "Bel-Bur", - Type = 0 - }, - new - { - Id = "Bel-ENG", - Type = 2 - }, - new - { - Id = "Bel-Hol", - Type = 1 - }, - new - { - Id = "Bel-NTH", - Type = 2 - }, - new - { - Id = "Bel-Pic", - Type = 1 - }, - new - { - Id = "Bel-Ruh", - Type = 0 - }, - new - { - Id = "Ber-Kie", - Type = 1 - }, - new - { - Id = "Ber-Mun", - Type = 0 - }, - new - { - Id = "Ber-Pru", - Type = 1 - }, - new - { - Id = "Ber-Sil", - Type = 0 - }, - new - { - Id = "BLA-Bul_E", - Type = 2 - }, - new - { - Id = "BLA-Con", - Type = 2 - }, - new - { - Id = "BLA-Rum", - Type = 2 - }, - new - { - Id = "BLA-Sev", - Type = 2 - }, - new - { - Id = "Boh-Gal", - Type = 0 - }, - new - { - Id = "Boh-Mun", - Type = 0 - }, - new - { - Id = "Boh-Sil", - Type = 0 - }, - new - { - Id = "Boh-Tyr", - Type = 0 - }, - new - { - Id = "Boh-Vie", - Type = 0 - }, - new - { - Id = "BOT-Fin", - Type = 2 - }, - new - { - Id = "BOT-Lvn", - Type = 2 - }, - new - { - Id = "BOT-Stp_S", - Type = 2 - }, - new - { - Id = "BOT-Swe", - Type = 2 - }, - new - { - Id = "Bre-ENG", - Type = 2 - }, - new - { - Id = "Bre-Gas", - Type = 1 - }, - new - { - Id = "Bre-MAO", - Type = 2 - }, - new - { - Id = "Bre-Par", - Type = 0 - }, - new - { - Id = "Bre-Pic", - Type = 1 - }, - new - { - Id = "Bud-Gal", - Type = 0 - }, - new - { - Id = "Bud-Rum", - Type = 0 - }, - new - { - Id = "Bud-Ser", - Type = 0 - }, - new - { - Id = "Bud-Tri", - Type = 0 - }, - new - { - Id = "Bud-Vie", - Type = 0 - }, - new - { - Id = "Bul-Con", - Type = 0 - }, - new - { - Id = "Bul-Gre", - Type = 0 - }, - new - { - Id = "Bul-Rum", - Type = 0 - }, - new - { - Id = "Bul-Ser", - Type = 0 - }, - new - { - Id = "Bul_E-Con", - Type = 2 - }, - new - { - Id = "Bul_E-Rum", - Type = 2 - }, - new - { - Id = "Bul_S-Con", - Type = 2 - }, - new - { - Id = "Bul_S-Gre", - Type = 2 - }, - new - { - Id = "Bur-Gas", - Type = 0 - }, - new - { - Id = "Bur-Mar", - Type = 0 - }, - new - { - Id = "Bur-Mun", - Type = 0 - }, - new - { - Id = "Bur-Par", - Type = 0 - }, - new - { - Id = "Bur-Pic", - Type = 0 - }, - new - { - Id = "Bur-Ruh", - Type = 0 - }, - new - { - Id = "Con-Smy", - Type = 1 - }, - new - { - Id = "Cly-Edi", - Type = 1 - }, - new - { - Id = "Cly-Lvp", - Type = 1 - }, - new - { - Id = "Cly-NAO", - Type = 2 - }, - new - { - Id = "Cly-NWG", - Type = 2 - }, - new - { - Id = "Den-HEL", - Type = 2 - }, - new - { - Id = "Den-Kie", - Type = 1 - }, - new - { - Id = "Den-NTH", - Type = 2 - }, - new - { - Id = "Den-SKA", - Type = 2 - }, - new - { - Id = "Den-Swe", - Type = 1 - }, - new - { - Id = "EAS-ION", - Type = 2 - }, - new - { - Id = "EAS-Smy", - Type = 2 - }, - new - { - Id = "EAS-Syr", - Type = 2 - }, - new - { - Id = "Edi-Lvp", - Type = 0 - }, - new - { - Id = "Edi-NTH", - Type = 2 - }, - new - { - Id = "Edi-NWG", - Type = 2 - }, - new - { - Id = "Edi-Yor", - Type = 1 - }, - new - { - Id = "ENG-IRI", - Type = 2 - }, - new - { - Id = "ENG-Lon", - Type = 2 - }, - new - { - Id = "ENG-MAO", - Type = 2 - }, - new - { - Id = "ENG-NTH", - Type = 2 - }, - new - { - Id = "ENG-Pic", - Type = 2 - }, - new - { - Id = "ENG-Wal", - Type = 2 - }, - new - { - Id = "Fin-Nwy", - Type = 1 - }, - new - { - Id = "Fin-Stp", - Type = 0 - }, - new - { - Id = "Fin-Stp_S", - Type = 2 - }, - new - { - Id = "Fin-Swe", - Type = 1 - }, - new - { - Id = "Gal-Rum", - Type = 0 - }, - new - { - Id = "Gal-Sil", - Type = 0 - }, - new - { - Id = "Gal-Ukr", - Type = 0 - }, - new - { - Id = "Gal-Vie", - Type = 0 - }, - new - { - Id = "Gal-War", - Type = 0 - }, - new - { - Id = "Gas-MAO", - Type = 2 - }, - new - { - Id = "Gas-Mar", - Type = 0 - }, - new - { - Id = "Gas-Par", - Type = 0 - }, - new - { - Id = "Gas-Spa", - Type = 0 - }, - new - { - Id = "Gas-Spa_N", - Type = 2 - }, - new - { - Id = "Gre-Ser", - Type = 0 - }, - new - { - Id = "Gre-ION", - Type = 2 - }, - new - { - Id = "HEL-Hol", - Type = 2 - }, - new - { - Id = "HEL-Kie", - Type = 2 - }, - new - { - Id = "HEL-NTH", - Type = 2 - }, - new - { - Id = "Hol-Kie", - Type = 1 - }, - new - { - Id = "Hol-NTH", - Type = 2 - }, - new - { - Id = "Hol-Ruh", - Type = 0 - }, - new - { - Id = "ION-Nap", - Type = 2 - }, - new - { - Id = "ION-Tun", - Type = 2 - }, - new - { - Id = "ION-TYS", - Type = 2 - }, - new - { - Id = "IRI-Lvp", - Type = 2 - }, - new - { - Id = "IRI-MAO", - Type = 2 - }, - new - { - Id = "IRI-NAO", - Type = 2 - }, - new - { - Id = "IRI-Wal", - Type = 2 - }, - new - { - Id = "Kie-Mun", - Type = 0 - }, - new - { - Id = "Kie-Ruh", - Type = 0 - }, - new - { - Id = "Lon-NTH", - Type = 2 - }, - new - { - Id = "Lon-Wal", - Type = 1 - }, - new - { - Id = "Lon-Yor", - Type = 1 - }, - new - { - Id = "Lvn-Mos", - Type = 0 - }, - new - { - Id = "Lvn-Pru", - Type = 1 - }, - new - { - Id = "Lvn-Stp", - Type = 0 - }, - new - { - Id = "Lvn-Stp_S", - Type = 2 - }, - new - { - Id = "Lvn-War", - Type = 0 - }, - new - { - Id = "Lvp-NAO", - Type = 2 - }, - new - { - Id = "Lvp-Wal", - Type = 1 - }, - new - { - Id = "Lvp-Yor", - Type = 0 - }, - new - { - Id = "LYO-Mar", - Type = 2 - }, - new - { - Id = "LYO-Pie", - Type = 2 - }, - new - { - Id = "LYO-Spa_S", - Type = 2 - }, - new - { - Id = "LYO-Tus", - Type = 2 - }, - new - { - Id = "LYO-TYS", - Type = 2 - }, - new - { - Id = "LYO-WES", - Type = 2 - }, - new - { - Id = "MAO-Naf", - Type = 2 - }, - new - { - Id = "MAO-NAO", - Type = 2 - }, - new - { - Id = "MAO-Por", - Type = 2 - }, - new - { - Id = "MAO-Spa_N", - Type = 2 - }, - new - { - Id = "MAO-Spa_S", - Type = 2 - }, - new - { - Id = "MAO-WES", - Type = 2 - }, - new - { - Id = "Mar-Pie", - Type = 1 - }, - new - { - Id = "Mar-Spa", - Type = 0 - }, - new - { - Id = "Mar-Spa_S", - Type = 2 - }, - new - { - Id = "Mos-Sev", - Type = 0 - }, - new - { - Id = "Mos-Stp", - Type = 0 - }, - new - { - Id = "Mos-Ukr", - Type = 0 - }, - new - { - Id = "Mos-War", - Type = 0 - }, - new - { - Id = "Mun-Ruh", - Type = 0 - }, - new - { - Id = "Mun-Sil", - Type = 0 - }, - new - { - Id = "Mun-Tyr", - Type = 0 - }, - new - { - Id = "Naf-Tun", - Type = 1 - }, - new - { - Id = "Naf-WES", - Type = 2 - }, - new - { - Id = "NAO-NWG", - Type = 2 - }, - new - { - Id = "Nap-Rom", - Type = 1 - }, - new - { - Id = "Nap-TYS", - Type = 2 - }, - new - { - Id = "NTH-NWG", - Type = 2 - }, - new - { - Id = "NTH-Nwy", - Type = 2 - }, - new - { - Id = "NTH-SKA", - Type = 2 - }, - new - { - Id = "NTH-Yor", - Type = 2 - }, - new - { - Id = "NWG-Nwy", - Type = 2 - }, - new - { - Id = "Nwy-SKA", - Type = 2 - }, - new - { - Id = "Nwy-Stp", - Type = 0 - }, - new - { - Id = "Nwy-Stp_N", - Type = 2 - }, - new - { - Id = "Nwy-Swe", - Type = 1 - }, - new - { - Id = "Par-Pic", - Type = 0 - }, - new - { - Id = "Pie-Tus", - Type = 1 - }, - new - { - Id = "Pie-Tyr", - Type = 0 - }, - new - { - Id = "Pie-Ven", - Type = 0 - }, - new - { - Id = "Por-Spa", - Type = 0 - }, - new - { - Id = "Por-Spa_N", - Type = 2 - }, - new - { - Id = "Por-Spa_S", - Type = 2 - }, - new - { - Id = "Pru-Sil", - Type = 0 - }, - new - { - Id = "Pru-War", - Type = 0 - }, - new - { - Id = "Rom-Tus", - Type = 1 - }, - new - { - Id = "Rom-TYS", - Type = 2 - }, - new - { - Id = "Rom-Ven", - Type = 0 - }, - new - { - Id = "Rum-Ser", - Type = 0 - }, - new - { - Id = "Rum-Sev", - Type = 1 - }, - new - { - Id = "Rum-Ukr", - Type = 0 - }, - new - { - Id = "Ser-Tri", - Type = 0 - }, - new - { - Id = "Sev-Ukr", - Type = 0 - }, - new - { - Id = "Sil-War", - Type = 0 - }, - new - { - Id = "SKA-Swe", - Type = 2 - }, - new - { - Id = "Smy-Syr", - Type = 1 - }, - new - { - Id = "Spa_S-WES", - Type = 2 - }, - new - { - Id = "Tri-Tyr", - Type = 0 - }, - new - { - Id = "Tri-Ven", - Type = 1 - }, - new - { - Id = "Tri-Vie", - Type = 0 - }, - new - { - Id = "Tun-TYS", - Type = 2 - }, - new - { - Id = "Tun-WES", - Type = 2 - }, - new - { - Id = "Tus-TYS", - Type = 2 - }, - new - { - Id = "Tus-Ven", - Type = 0 - }, - new - { - Id = "Tyr-Ven", - Type = 0 - }, - new - { - Id = "Tyr-Vie", - Type = 0 - }, - new - { - Id = "TYS-WES", - Type = 2 - }, - new - { - Id = "Ukr-War", - Type = 0 - }, - new + modelBuilder.Entity("Entities.Board", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ChildTimelines") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Phase") + .HasColumnType("int"); + + b.Property("Timeline") + .HasColumnType("int"); + + b.Property("WorldId") + .HasColumnType("int"); + + b.Property("Year") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("WorldId"); + + b.ToTable("Boards"); + }); + + modelBuilder.Entity("Entities.Centre", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("BoardId") + .HasColumnType("int"); + + b.Property("Owner") + .HasColumnType("int"); + + b.ComplexProperty>("Location", "Entities.Centre.Location#Location", b1 => { - Id = "Wal-Yor", - Type = 0 + b1.IsRequired(); + + b1.Property("Phase") + .HasColumnType("int"); + + b1.Property("RegionId") + .IsRequired() + .HasMaxLength(5) + .HasColumnType("nvarchar(5)"); + + b1.Property("Timeline") + .HasColumnType("int"); + + b1.Property("Year") + .HasColumnType("int"); }); + + b.HasKey("Id"); + + b.HasIndex("BoardId"); + + b.ToTable("Centres"); }); modelBuilder.Entity("Entities.Game", b => @@ -3480,523 +177,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.UseTphMappingStrategy(); }); - modelBuilder.Entity("Entities.Region", b => - { - b.Property("Id") - .HasMaxLength(5) - .HasColumnType("nvarchar(5)"); - - b.Property("Name") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("ParentId") - .HasColumnType("nvarchar(5)"); - - b.Property("Type") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("ParentId"); - - b.ToTable("Regions"); - - b.HasData( - new - { - Id = "ADR", - Name = "Adriatic Sea", - Type = 2 - }, - new - { - Id = "AEG", - Name = "Aegean Sea", - Type = 2 - }, - new - { - Id = "Alb", - Name = "Albania", - Type = 1 - }, - new - { - Id = "Ank", - Name = "Ankara", - Type = 1 - }, - new - { - Id = "Apu", - Name = "Apulia", - Type = 1 - }, - new - { - Id = "Arm", - Name = "Armenia", - Type = 1 - }, - new - { - Id = "BAL", - Name = "Baltic Sea", - Type = 2 - }, - new - { - Id = "BAR", - Name = "Barents Sea", - Type = 2 - }, - new - { - Id = "Bel", - Name = "Belgium", - Type = 1 - }, - new - { - Id = "Ber", - Name = "Berlin", - Type = 1 - }, - new - { - Id = "BLA", - Name = "Black Sea", - Type = 2 - }, - new - { - Id = "Boh", - Name = "Bohemia", - Type = 0 - }, - new - { - Id = "BOT", - Name = "Gulf of Bothnia", - Type = 2 - }, - new - { - Id = "Bre", - Name = "Brest", - Type = 1 - }, - new - { - Id = "Bud", - Name = "Budapest", - Type = 0 - }, - new - { - Id = "Bul", - Name = "Bulgaria", - Type = 0 - }, - new - { - Id = "Bul_E", - Name = "Bulgaria (east coast)", - ParentId = "Bul", - Type = 1 - }, - new - { - Id = "Bul_S", - Name = "Bulgaria (south coast)", - ParentId = "Bul", - Type = 1 - }, - new - { - Id = "Bur", - Name = "Burgandy", - Type = 0 - }, - new - { - Id = "Con", - Name = "Constantinople", - Type = 1 - }, - new - { - Id = "Cly", - Name = "Clyde", - Type = 1 - }, - new - { - Id = "Den", - Name = "Denmark", - Type = 1 - }, - new - { - Id = "EAS", - Name = "Eastern Mediterranean", - Type = 2 - }, - new - { - Id = "Edi", - Name = "Edinburgh", - Type = 1 - }, - new - { - Id = "ENG", - Name = "English Channel", - Type = 2 - }, - new - { - Id = "Fin", - Name = "Finland", - Type = 1 - }, - new - { - Id = "Gal", - Name = "Galicia", - Type = 0 - }, - new - { - Id = "Gas", - Name = "Gascony", - Type = 1 - }, - new - { - Id = "Gre", - Name = "Greece", - Type = 1 - }, - new - { - Id = "HEL", - Name = "Heligoland Bight", - Type = 2 - }, - new - { - Id = "Hol", - Name = "Holland", - Type = 1 - }, - new - { - Id = "ION", - Name = "Ionian Sea", - Type = 2 - }, - new - { - Id = "IRI", - Name = "Irish Sea", - Type = 2 - }, - new - { - Id = "Kie", - Name = "Kiel", - Type = 1 - }, - new - { - Id = "Lon", - Name = "London", - Type = 1 - }, - new - { - Id = "Lvn", - Name = "Livonia", - Type = 1 - }, - new - { - Id = "Lvp", - Name = "Liverpool", - Type = 1 - }, - new - { - Id = "LYO", - Name = "Gulf of Lyon", - Type = 2 - }, - new - { - Id = "MAO", - Name = "Mid-Atlantic Ocean", - Type = 2 - }, - new - { - Id = "Mar", - Name = "Marseilles", - Type = 1 - }, - new - { - Id = "Mos", - Name = "Moscow", - Type = 0 - }, - new - { - Id = "Mun", - Name = "Munich", - Type = 0 - }, - new - { - Id = "Naf", - Name = "North Africa", - Type = 1 - }, - new - { - Id = "NAO", - Name = "North Atlantic Ocean", - Type = 2 - }, - new - { - Id = "Nap", - Name = "Naples", - Type = 1 - }, - new - { - Id = "NTH", - Name = "North Sea", - Type = 2 - }, - new - { - Id = "NWG", - Name = "Norwegian Sea", - Type = 2 - }, - new - { - Id = "Nwy", - Name = "Norway", - Type = 1 - }, - new - { - Id = "Par", - Name = "Paris", - Type = 0 - }, - new - { - Id = "Pic", - Name = "Picardy", - Type = 1 - }, - new - { - Id = "Pie", - Name = "Piedmont", - Type = 1 - }, - new - { - Id = "Por", - Name = "Portugal", - Type = 1 - }, - new - { - Id = "Pru", - Name = "Prussia", - Type = 1 - }, - new - { - Id = "Rom", - Name = "Rome", - Type = 1 - }, - new - { - Id = "Ruh", - Name = "Ruhr", - Type = 0 - }, - new - { - Id = "Rum", - Name = "Rumania", - Type = 1 - }, - new - { - Id = "Ser", - Name = "Serbia", - Type = 0 - }, - new - { - Id = "Sev", - Name = "Sevastopol", - Type = 1 - }, - new - { - Id = "Sil", - Name = "Silesia", - Type = 0 - }, - new - { - Id = "SKA", - Name = "Skagerrak", - Type = 2 - }, - new - { - Id = "Smy", - Name = "Smyrna", - Type = 1 - }, - new - { - Id = "Spa", - Name = "Spain", - Type = 0 - }, - new - { - Id = "Spa_N", - Name = "Spain (north coast)", - ParentId = "Spa", - Type = 1 - }, - new - { - Id = "Spa_S", - Name = "Spain (south coast)", - ParentId = "Spa", - Type = 1 - }, - new - { - Id = "Stp", - Name = "St Petersburg", - Type = 0 - }, - new - { - Id = "Stp_N", - Name = "St Petersburg (north coast)", - ParentId = "Stp", - Type = 1 - }, - new - { - Id = "Stp_S", - Name = "St Petersburg (south coast)", - ParentId = "Stp", - Type = 1 - }, - new - { - Id = "Swe", - Name = "Sweden", - Type = 1 - }, - new - { - Id = "Syr", - Name = "Syria", - Type = 1 - }, - new - { - Id = "Tri", - Name = "Trieste", - Type = 1 - }, - new - { - Id = "Tun", - Name = "Tunis", - Type = 1 - }, - new - { - Id = "Tus", - Name = "Tuscany", - Type = 1 - }, - new - { - Id = "Tyr", - Name = "Tyrolia", - Type = 0 - }, - new - { - Id = "TYS", - Name = "Tyrhennian Sea", - Type = 2 - }, - new - { - Id = "Ukr", - Name = "Ukraine", - Type = 0 - }, - new - { - Id = "Ven", - Name = "Venice", - Type = 1 - }, - new - { - Id = "Vie", - Name = "Vienna", - Type = 0 - }, - new - { - Id = "Wal", - Name = "Wales", - Type = 1 - }, - new - { - Id = "War", - Name = "Warsaw", - Type = 0 - }, - new - { - Id = "WES", - Name = "Western Mediterranean", - Type = 2 - }, - new - { - Id = "Yor", - Name = "York", - Type = 1 - }); - }); - modelBuilder.Entity("Entities.Unit", b => { b.Property("Id") @@ -4225,21 +405,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasDiscriminator().HasValue("Support"); }); - modelBuilder.Entity("ConnectionMappings", b => - { - b.HasOne("Entities.Connection", null) - .WithMany() - .HasForeignKey("ConnectionsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Entities.Region", null) - .WithMany() - .HasForeignKey("RegionsId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - modelBuilder.Entity("Entities.Board", b => { b.HasOne("Entities.World", "World") @@ -4279,15 +444,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("World"); }); - modelBuilder.Entity("Entities.Region", b => - { - b.HasOne("Entities.Region", "Parent") - .WithMany("Children") - .HasForeignKey("ParentId"); - - b.Navigation("Parent"); - }); - modelBuilder.Entity("Entities.Unit", b => { b.HasOne("Entities.Board", "Board") @@ -4322,11 +478,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Navigation("World"); }); - modelBuilder.Entity("Entities.Region", b => - { - b.Navigation("Children"); - }); - modelBuilder.Entity("Entities.Unit", b => { b.Navigation("Order"); diff --git a/server/Repositories/WorldRepository.cs b/server/Repositories/WorldRepository.cs index 37c59e1..a57a013 100644 --- a/server/Repositories/WorldRepository.cs +++ b/server/Repositories/WorldRepository.cs @@ -7,10 +7,11 @@ namespace Repositories; -public class WorldRepository(ILogger logger, GameContext context, DefaultWorldFactory defaultWorldFactory) +public class WorldRepository(ILogger logger, GameContext context, MapFactory mapFactory, DefaultWorldFactory defaultWorldFactory) { private readonly ILogger logger = logger; private readonly GameContext context = context; + private readonly MapFactory mapFactory = mapFactory; private readonly DefaultWorldFactory defaultWorldFactory = defaultWorldFactory; public async Task GetWorld(int gameId) @@ -46,11 +47,7 @@ public async Task AddOrders(int gameId, Nation[] players, List orders) game.PlayersSubmitted = []; - var regions = await context.Regions - .Include(r => r.Connections).ThenInclude(c => c.Regions) - .ToListAsync(); - - var adjudicator = new Adjudicator(world, game.HasStrictAdjacencies, regions, defaultWorldFactory); + var adjudicator = new Adjudicator(world, game.HasStrictAdjacencies, mapFactory, defaultWorldFactory); adjudicator.Adjudicate(); world.Iteration++; diff --git a/server/Tests/AdjudicationTestBase.cs b/server/Tests/AdjudicationTestBase.cs index 19b9384..bdf89d0 100644 --- a/server/Tests/AdjudicationTestBase.cs +++ b/server/Tests/AdjudicationTestBase.cs @@ -1,18 +1,15 @@ -using Entities; -using Factories; +using Factories; namespace Tests; public class AdjudicationTestBase { - protected List Regions { get; private set; } + protected MapFactory MapFactory { get; private set; } protected DefaultWorldFactory DefaultWorldFactory { get; private set; } public AdjudicationTestBase() { + MapFactory = new(); DefaultWorldFactory = new(); - - var mapFactory = new MapFactory(); - (Regions, _) = mapFactory.CreateMap(); } } diff --git a/server/Tests/DATC_A.cs b/server/Tests/DATC_A.cs index 1a072ce..2713903 100644 --- a/server/Tests/DATC_A.cs +++ b/server/Tests/DATC_A.cs @@ -21,7 +21,7 @@ public void DATC_A_1() var order = units[0].Move("Pic"); // Act - new Adjudicator(world, false, Regions, DefaultWorldFactory).Adjudicate(); + new Adjudicator(world, false, MapFactory, DefaultWorldFactory).Adjudicate(); // Assert order.Status.Should().Be(OrderStatus.Invalid); @@ -40,7 +40,7 @@ public void DATC_A_2() var order = units[0].Move("IRI"); // Act - new Adjudicator(world, false, Regions, DefaultWorldFactory).Adjudicate(); + new Adjudicator(world, false, MapFactory, DefaultWorldFactory).Adjudicate(); // Assert order.Status.Should().Be(OrderStatus.Invalid); @@ -59,7 +59,7 @@ public void DATC_A_3() var order = units[0].Move("Mun"); // Act - new Adjudicator(world, false, Regions, DefaultWorldFactory).Adjudicate(); + new Adjudicator(world, false, MapFactory, DefaultWorldFactory).Adjudicate(); // Assert order.Status.Should().Be(OrderStatus.Invalid); @@ -78,7 +78,7 @@ public void DATC_A_4() var order = units[0].Move("Kie"); // Act - new Adjudicator(world, false, Regions, DefaultWorldFactory).Adjudicate(); + new Adjudicator(world, false, MapFactory, DefaultWorldFactory).Adjudicate(); // Assert order.Status.Should().Be(OrderStatus.Invalid); @@ -109,7 +109,7 @@ public void DATC_A_5() var germanSupport = units[4].Support(units[3], "Yor"); // Act - new Adjudicator(world, false, Regions, DefaultWorldFactory).Adjudicate(); + new Adjudicator(world, false, MapFactory, DefaultWorldFactory).Adjudicate(); // Assert englishMove.Status.Should().Be(OrderStatus.Invalid); @@ -153,7 +153,7 @@ public void DATC_A_7() var convoy = units[1].Convoy(units[0], "Bel"); // Act - new Adjudicator(world, false, Regions, DefaultWorldFactory).Adjudicate(); + new Adjudicator(world, false, MapFactory, DefaultWorldFactory).Adjudicate(); // Assert move.Status.Should().Be(OrderStatus.Invalid); @@ -185,7 +185,7 @@ public void DATC_A_8() var austrianSupport = units[2].Support(units[2], "Tri"); // Act - new Adjudicator(world, false, Regions, DefaultWorldFactory).Adjudicate(); + new Adjudicator(world, false, MapFactory, DefaultWorldFactory).Adjudicate(); // Assert italianMove.Status.Should().Be(OrderStatus.Success); @@ -212,7 +212,7 @@ public void DATC_A_9() var order = units[0].Move("Ven"); // Act - new Adjudicator(world, false, Regions, DefaultWorldFactory).Adjudicate(); + new Adjudicator(world, false, MapFactory, DefaultWorldFactory).Adjudicate(); // Assert order.Status.Should().Be(OrderStatus.Invalid); @@ -238,7 +238,7 @@ public void DATC_A_10() var italianSupport = units[2].Support(units[1], "Ven"); // Act - new Adjudicator(world, false, Regions, DefaultWorldFactory).Adjudicate(); + new Adjudicator(world, false, MapFactory, DefaultWorldFactory).Adjudicate(); // Assert austrianHold.Status.Should().Be(OrderStatus.Success); @@ -269,7 +269,7 @@ public void DATC_A_11() var italianMove = units[1].Move("Tyr"); // Act - new Adjudicator(world, false, Regions, DefaultWorldFactory).Adjudicate(); + new Adjudicator(world, false, MapFactory, DefaultWorldFactory).Adjudicate(); // Assert austrianMove.Status.Should().Be(OrderStatus.Failure); @@ -300,7 +300,7 @@ public void DATC_A_12() var italianMove = units[2].Move("Tyr"); // Act - new Adjudicator(world, false, Regions, DefaultWorldFactory).Adjudicate(); + new Adjudicator(world, false, MapFactory, DefaultWorldFactory).Adjudicate(); // Assert austrianMove.Status.Should().Be(OrderStatus.Failure);