tests: verbessere die Verantwortung der Trefferpunkte-Verarbeitung
This commit is contained in:
+37
-66
@@ -1,87 +1,58 @@
|
||||
@startuml
|
||||
'https://plantuml.com/object-diagram
|
||||
|
||||
object Mech <<Mech>> {
|
||||
object Mech <<Mech>>
|
||||
abstract Area <<Zone>> {
|
||||
next_area: Area
|
||||
item_lines: #
|
||||
armor: #
|
||||
}
|
||||
abstract AreaItem <<Item>> {
|
||||
item_lines: #
|
||||
}
|
||||
|
||||
object InnerStructure <<InnerStructure>> {
|
||||
heater: x
|
||||
}
|
||||
object InnerStructure <<InnerStructure>>
|
||||
object Gyroskope <<Gyroskope>>
|
||||
object Sustainment
|
||||
object Sensors
|
||||
|
||||
object OuterAmor <<Zone>> {
|
||||
armor: #
|
||||
}
|
||||
|
||||
object Head <<Area>> {
|
||||
item_lines: 6
|
||||
inner_armor: #
|
||||
amor: #
|
||||
}
|
||||
object Cockpit <<Cockpit>>
|
||||
object Reaktor <<Reaktor>>
|
||||
object TorsoMiddle <<Area>> {
|
||||
|
||||
object Torso <<Area>> {
|
||||
item_lines: 12
|
||||
inner_armor: #
|
||||
amor: #
|
||||
}
|
||||
object TorsoLeft <<Area>> {
|
||||
|
||||
object SideTorso <<Area>> {
|
||||
item_lines: 12
|
||||
inner_armor: #
|
||||
amor: #
|
||||
}
|
||||
object ArmLeft <<Area>> {
|
||||
|
||||
object Arm <<Area>> {
|
||||
item_lines: 12
|
||||
inner_armor: #
|
||||
amor: #
|
||||
}
|
||||
object LegLeft <<Area>> {
|
||||
|
||||
object Leg <<Area>> {
|
||||
item_lines: 6
|
||||
inner_armor: #
|
||||
amor: #
|
||||
}
|
||||
object TorsoRight <<Area>> {
|
||||
item_lines: 12
|
||||
inner_armor: #
|
||||
amor: #
|
||||
}
|
||||
object ArmRight <<Area>> {
|
||||
item_lines: 12
|
||||
inner_armor: #
|
||||
amor: #
|
||||
}
|
||||
object LegRight <<Area>> {
|
||||
item_lines: 6
|
||||
inner_armor: #
|
||||
amor: #
|
||||
}
|
||||
object JointAL as "Joint"
|
||||
object ActivatorAL as "Activator"
|
||||
object JointLL as "Joint"
|
||||
object ActivatorLL as "Activator"
|
||||
object JointAR as "Joint"
|
||||
object ActivatorAR as "Activator"
|
||||
object JointLR as "Joint"
|
||||
object ActivatorLR as "Activator"
|
||||
|
||||
Area *- "1,*" OuterAmor
|
||||
AreaItem "*" -* Area
|
||||
|
||||
Head <|-- Area
|
||||
Torso <|-- Area
|
||||
SideTorso <|-- Area
|
||||
Arm <|-- Area
|
||||
Leg <|-- Area
|
||||
|
||||
Mech *-- InnerStructure
|
||||
InnerStructure *-- Head
|
||||
InnerStructure *-- TorsoMiddle
|
||||
Mech *- Gyroskope
|
||||
Head *- Cockpit
|
||||
Head *-- Sustainment
|
||||
Head *-- Sensors
|
||||
Mech *- Reaktor
|
||||
Gyroskope .. InnerStructure
|
||||
Reaktor ... InnerStructure
|
||||
TorsoMiddle *-- TorsoLeft
|
||||
TorsoMiddle *-- TorsoRight
|
||||
TorsoLeft *-- ArmLeft
|
||||
TorsoLeft *-- LegLeft
|
||||
TorsoRight *-- ArmRight
|
||||
TorsoRight *-- LegRight
|
||||
ArmLeft *-- JointAL
|
||||
ArmLeft *-- ActivatorAL
|
||||
ArmRight *-- JointAR
|
||||
ArmRight *-- ActivatorAR
|
||||
LegRight *-- JointLR
|
||||
LegRight *-- ActivatorLR
|
||||
LegLeft *-- JointLL
|
||||
LegLeft *-- ActivatorLL
|
||||
InnerStructure *-- Torso
|
||||
Torso *-- SideTorso
|
||||
SideTorso *-- "0|2" Arm
|
||||
SideTorso *-- "2|4" Leg
|
||||
|
||||
@enduml
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
@startuml
|
||||
'https://plantuml.com/object-diagram
|
||||
|
||||
object Mech <<Mech>> {
|
||||
heater: x
|
||||
}
|
||||
|
||||
object Head <<Area>> {
|
||||
item_lines: 6
|
||||
}
|
||||
object Sustainment <<AreaItem>>
|
||||
object Sensors <<AreaItem>>
|
||||
object Cockpit <<Cockpit>> <<AreaItem>>
|
||||
|
||||
object InnerStructure <<InnerStructure>>
|
||||
object Gyroskope <<Gyroskope>> <<AreaItem>>
|
||||
object Reaktor <<Reaktor>> <<AreaItem>>
|
||||
object TorsoMiddle <<Area>> {
|
||||
item_lines: 12
|
||||
}
|
||||
object TorsoLeft <<Area>> {
|
||||
item_lines: 12
|
||||
}
|
||||
object ArmLeft <<Area>> {
|
||||
item_lines: 12
|
||||
}
|
||||
object LegLeft <<Area>> {
|
||||
item_lines: 6
|
||||
}
|
||||
object TorsoRight <<Area>> {
|
||||
item_lines: 12
|
||||
}
|
||||
object ArmRight <<Area>> {
|
||||
item_lines: 12
|
||||
}
|
||||
object LegRight <<Area>> {
|
||||
item_lines: 6
|
||||
}
|
||||
object JointAL as "Joint" <<AreaItem>>
|
||||
object ActivatorAL as "Activator" <<AreaItem>>
|
||||
object JointLL as "Joint" <<AreaItem>>
|
||||
object ActivatorLL as "Activator" <<AreaItem>>
|
||||
object JointAR as "Joint" <<AreaItem>>
|
||||
object ActivatorAR as "Activator" <<AreaItem>>
|
||||
object JointLR as "Joint" <<AreaItem>>
|
||||
object ActivatorLR as "Activator" <<AreaItem>>
|
||||
|
||||
|
||||
Mech *- Gyroskope
|
||||
Head *- Cockpit
|
||||
Head *-- Sustainment
|
||||
Head *-- Sensors
|
||||
|
||||
Mech *-- InnerStructure
|
||||
InnerStructure *-- Head
|
||||
InnerStructure *-- TorsoMiddle
|
||||
Mech *- Reaktor
|
||||
Gyroskope .. TorsoMiddle
|
||||
Reaktor .. TorsoMiddle
|
||||
TorsoMiddle *-- TorsoLeft
|
||||
TorsoMiddle *-- TorsoRight
|
||||
TorsoLeft *-- ArmLeft
|
||||
TorsoLeft *-- LegLeft
|
||||
TorsoRight *-- ArmRight
|
||||
TorsoRight *-- LegRight
|
||||
ArmLeft *-- JointAL
|
||||
ArmLeft *-- ActivatorAL
|
||||
ArmRight *-- JointAR
|
||||
ArmRight *-- ActivatorAR
|
||||
LegRight *-- JointLR
|
||||
LegRight *-- ActivatorLR
|
||||
LegLeft *-- JointLL
|
||||
LegLeft *-- ActivatorLL
|
||||
|
||||
@enduml
|
||||
@@ -0,0 +1,31 @@
|
||||
@startuml
|
||||
'https://plantuml.com/sequence-diagram
|
||||
|
||||
autonumber
|
||||
|
||||
actor Gegner
|
||||
|
||||
actor Selbst
|
||||
database InnerStructure
|
||||
collections Zone
|
||||
entity ZoneEvent
|
||||
|
||||
Gegner -> Selbst: Treffer
|
||||
Selbst -> InnerStructure: verarbeite Treffer
|
||||
InnerStructure -> Zone: suche getroffene Außen-Zone
|
||||
return Zone
|
||||
InnerStructure -> ZoneEvent: erstelle **ZonenEvent**
|
||||
return **ZonenEvent**
|
||||
alt aktuelles **ZoneEvent** hat noch nicht alle Trefferpunkte verarbeitet
|
||||
alt **Zone** hat noch Panzerung
|
||||
InnerStructure -> ZonenEvent: trage Trefferpunkte ab
|
||||
return ZoneEvent
|
||||
else **Zone** hat keine Panzerung
|
||||
InnerStructure -> Zone: hole Weiterleitung-Zone
|
||||
return Zone
|
||||
InnerStructure -> ZoneEvent: erstelle **ZonenEvent** für weitergeleitete **Zone**
|
||||
return ZoneEvent
|
||||
end
|
||||
end
|
||||
|
||||
@enduml
|
||||
@@ -2,6 +2,20 @@ import enum
|
||||
from typing import Any
|
||||
|
||||
|
||||
class ZoneNames(enum.Enum):
|
||||
HEAD = 'Kopf'
|
||||
MIDDLE_TORSO_FRONT = 'Torso Mitte Vorn'
|
||||
MIDDLE_TORSO_REAR = 'Torso Mitte Rücken'
|
||||
RIGHT_TORSO_FRONT = 'Rechter Torso Vorn'
|
||||
RIGHT_TORSO_REAR = 'Rechter Torso Rücken'
|
||||
LEFT_TORSO_FRONT = 'Linker Torso Vorn'
|
||||
LEFT_TORSO_REAR = 'Linker Torso Rücken'
|
||||
RIGHT_LEG = 'Rechtes Bein'
|
||||
RIGHT_ARM = 'Rechter Arm'
|
||||
LEFT_LEG = 'Linkes Bein'
|
||||
LEFT_ARM = 'Linker Arm'
|
||||
|
||||
|
||||
class AreaNames(enum.Enum):
|
||||
HEAD = 'Kopf'
|
||||
MIDDLE_TORSO = 'Torso Mitte'
|
||||
|
||||
Reference in New Issue
Block a user