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

Player #31

Closed
BarrierAntho opened this issue Jul 17, 2023 · 0 comments
Closed

Player #31

BarrierAntho opened this issue Jul 17, 2023 · 0 comments
Assignees
Labels

Comments

@BarrierAntho
Copy link
Collaborator

BarrierAntho commented Jul 17, 2023

Player Bar

🔝 Parent #28 🔝

General

  • Is a rectangle
  • Width is always smaller or equal to the height
  • The height can not equal or bigger of the board's height
  • The width is always equal to a fixed value

Calculation

Left Player Bar Start Position

x = k1
y = (3 * board.height / 6) - (player.width / 2)

Right Player Bar Start Position

x = board.width - k1 - player.width
y = (3 * board.height / 6) - (player.width / 2)

Data Model

classDiagram
    %% Class relation
    Board <.. Player
    Player <.. Power

    %% Class details
    %% Legend:
    %%    Public (+)
    %%    Private (-)
    %%    Protected (#)
    class Player{
        Number id
        String name
        Number posX
        Number posY
        Number width
        Number height
        Color color
        SetColor()
        Move()
    }
Loading

Footnotes

  1. k = Variable depending of the width of the board. 2

@BarrierAntho BarrierAntho self-assigned this Jul 17, 2023
@BarrierAntho BarrierAntho changed the title Player Player Bar Jul 17, 2023
@BarrierAntho BarrierAntho mentioned this issue Jul 17, 2023
@BarrierAntho BarrierAntho changed the title Player Bar Player Jul 17, 2023
@BarrierAntho BarrierAntho mentioned this issue Jul 18, 2023
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant