@@ -12,14 +12,14 @@ public static class ModuleFactory
12
12
ProducerType . Producer1 => new CivilProducer1 ( ) ,
13
13
ProducerType . Producer2 => new CivilProducer2 ( ) ,
14
14
ProducerType . Producer3 => new CivilProducer3 ( ) ,
15
- _ => throw new System . NotImplementedException ( )
15
+ _ => new NullProducer ( )
16
16
} ,
17
17
ShipType . FlagShip => producerType switch
18
18
{
19
19
ProducerType . Producer1 => new FlagProducer1 ( ) ,
20
- _ => throw new System . NotImplementedException ( )
20
+ _ => new NullProducer ( )
21
21
} ,
22
- _ => throw new System . NotImplementedException ( )
22
+ _ => new NullProducer ( )
23
23
} ;
24
24
public static IConstructor FindIConstructor ( ShipType shipType , ConstructorType constructorType ) => shipType switch
25
25
{
@@ -28,67 +28,67 @@ public static class ModuleFactory
28
28
ConstructorType . Constructor1 => new CivilConstructor1 ( ) ,
29
29
ConstructorType . Constructor2 => new CivilConstructor2 ( ) ,
30
30
ConstructorType . Constructor3 => new CivilConstructor3 ( ) ,
31
- _ => throw new System . NotImplementedException ( )
31
+ _ => new NullConstructor ( )
32
32
} ,
33
33
ShipType . FlagShip => constructorType switch
34
34
{
35
35
ConstructorType . Constructor1 => new FlagConstructor1 ( ) ,
36
- _ => throw new System . NotImplementedException ( )
36
+ _ => new NullConstructor ( )
37
37
} ,
38
- _ => throw new System . NotImplementedException ( )
38
+ _ => new NullConstructor ( )
39
39
} ;
40
40
public static IArmor FindIArmor ( ShipType shipType , ArmorType armorType ) => shipType switch
41
41
{
42
42
ShipType . CivilShip => armorType switch
43
43
{
44
44
ArmorType . Armor1 => new CivilArmor1 ( ) ,
45
- _ => throw new System . NotImplementedException ( )
45
+ _ => new NullArmor ( )
46
46
} ,
47
47
ShipType . WarShip => armorType switch
48
48
{
49
49
ArmorType . Armor1 => new WarArmor1 ( ) ,
50
50
ArmorType . Armor2 => new WarArmor2 ( ) ,
51
51
ArmorType . Armor3 => new WarArmor3 ( ) ,
52
- _ => throw new System . NotImplementedException ( )
52
+ _ => new NullArmor ( )
53
53
} ,
54
54
ShipType . FlagShip => armorType switch
55
55
{
56
56
ArmorType . Armor1 => new FlagArmor1 ( ) ,
57
57
ArmorType . Armor2 => new FlagArmor2 ( ) ,
58
58
ArmorType . Armor3 => new FlagArmor3 ( ) ,
59
- _ => throw new System . NotImplementedException ( )
59
+ _ => new NullArmor ( )
60
60
} ,
61
- _ => throw new System . NotImplementedException ( )
61
+ _ => new NullArmor ( )
62
62
} ;
63
63
public static IShield FindIShield ( ShipType shipType , ShieldType shieldType ) => shipType switch
64
64
{
65
65
ShipType . CivilShip => shieldType switch
66
66
{
67
67
ShieldType . Shield1 => new CivilShield1 ( ) ,
68
- _ => throw new System . NotImplementedException ( )
68
+ _ => new NullShield ( )
69
69
} ,
70
70
ShipType . WarShip => shieldType switch
71
71
{
72
72
ShieldType . Shield1 => new WarShield1 ( ) ,
73
73
ShieldType . Shield2 => new WarShield2 ( ) ,
74
74
ShieldType . Shield3 => new WarShield3 ( ) ,
75
- _ => throw new System . NotImplementedException ( )
75
+ _ => new NullShield ( )
76
76
} ,
77
77
ShipType . FlagShip => shieldType switch
78
78
{
79
79
ShieldType . Shield1 => new FlagShield1 ( ) ,
80
80
ShieldType . Shield2 => new FlagShield2 ( ) ,
81
81
ShieldType . Shield3 => new FlagShield3 ( ) ,
82
- _ => throw new System . NotImplementedException ( )
82
+ _ => new NullShield ( )
83
83
} ,
84
- _ => throw new System . NotImplementedException ( )
84
+ _ => new NullShield ( )
85
85
} ;
86
86
public static IWeapon FindIWeapon ( ShipType shipType , WeaponType weaponType ) => shipType switch
87
87
{
88
88
ShipType . CivilShip => weaponType switch
89
89
{
90
90
WeaponType . LaserGun => new CivilLaserGun ( ) ,
91
- _ => throw new System . NotImplementedException ( )
91
+ _ => new NullWeapon ( )
92
92
} ,
93
93
ShipType . WarShip => weaponType switch
94
94
{
@@ -97,7 +97,7 @@ public static class ModuleFactory
97
97
WeaponType . ShellGun => new WarShellGun ( ) ,
98
98
WeaponType . MissileGun => new WarMissileGun ( ) ,
99
99
WeaponType . ArcGun => new WarArcGun ( ) ,
100
- _ => throw new System . NotImplementedException ( )
100
+ _ => new NullWeapon ( )
101
101
} ,
102
102
ShipType . FlagShip => weaponType switch
103
103
{
@@ -106,8 +106,8 @@ public static class ModuleFactory
106
106
WeaponType . ShellGun => new FlagShellGun ( ) ,
107
107
WeaponType . MissileGun => new FlagMissileGun ( ) ,
108
108
WeaponType . ArcGun => new FlagArcGun ( ) ,
109
- _ => throw new System . NotImplementedException ( )
109
+ _ => new NullWeapon ( )
110
110
} ,
111
- _ => throw new System . NotImplementedException ( )
111
+ _ => new NullWeapon ( )
112
112
} ;
113
113
}
0 commit comments