Open DK0280705 opened 1 year ago
This will be the basic implementation of Ship
object design
classDiagram
Vessel <|-- Player
Vessel <|-- Enemy
class Vessel {
-Collision2D _collision
-Engine _engine
-int _direction
+virtual void fish()
+bool is_moving()
+enum get_gear()
+void set_gear(enum gear)
+float get_engine()
+void set_engine(int direction)
+float get_drag_force()
}
class Player {
-uint32_t _fish_count
+void fish()
}
class Enemy {
-uint32_t _fish_count
+void fish()
}
Vessel_engine
object design.
classDiagram
note for Vessel_engine "Engine power is in Kilowatt\nEngine thrust is in Newton"
class Vessel_engine {
-float _engine_power
-float _engine_thrust
-float _thrust_ratio
+float get_power()
+float get_thrust(enum gear)
}
To create definite objects of the game, we need to make a class design. We also need a complete control flow of the game. This can be further discussed through the comment.