Constructor
new Submarine(constants, state, type)
Constructs an instance of the Submarine class.
Parameters:
Name | Type | Description |
---|---|---|
constants |
SubmarineConstants | The constant parameters defining the submarine's characteristics. |
state |
SubmarineState | The variable state of the submarine. |
type |
SubmarineType | The type of the submarine. |
- Source:
Methods
getConstants() → {SubmarineConstants}
Retrieves the constant parameters of the submarine.
- Source:
Returns:
The constant parameters of the submarine.
- Type
- SubmarineConstants
getState() → {SubmarineState}
Retrieves the variable state of the submarine.
- Source:
Returns:
The variable state of the submarine.
- Type
- SubmarineState
getType() → {SubmarineType}
Retrieves the type of the submarine.
- Source:
Returns:
The type of the submarine.
- Type
- SubmarineType
setConstants(constants)
Sets the constant parameters of the submarine.
Parameters:
Name | Type | Description |
---|---|---|
constants |
SubmarineConstants | The new constant parameters of the submarine. |
- Source:
setState(state)
Sets the variable state of the submarine.
Parameters:
Name | Type | Description |
---|---|---|
state |
SubmarineState | The new variable state of the submarine. |
- Source: