Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game Class Design #13

Open
DK0280705 opened this issue Jul 9, 2023 · 2 comments
Open

Game Class Design #13

DK0280705 opened this issue Jul 9, 2023 · 2 comments
Assignees
Labels
development The development process

Comments

@DK0280705
Copy link
Member

DK0280705 commented Jul 9, 2023

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.

@DK0280705
Copy link
Member Author

DK0280705 commented Jul 9, 2023

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()
    }
Loading

@Hanif012 Hanif012 added the development The development process label Jul 12, 2023
@DK0280705
Copy link
Member Author

DK0280705 commented Jul 20, 2023

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)
    }

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development The development process
Projects
None yet
Development

No branches or pull requests

2 participants