Formatted files, added types and updated class diagram
This commit is contained in:
parent
4d22976621
commit
f272d3a44f
6 changed files with 52 additions and 32 deletions
|
|
@ -2,32 +2,47 @@
|
|||
classDiagram
|
||||
Entity <|-- Raspberry
|
||||
Entity <|-- Obstacle
|
||||
Entity: -Position position
|
||||
Entity: -int width
|
||||
Entity: -int height
|
||||
Entity: -update()
|
||||
Entity: -draw()
|
||||
Entity <|-- Pipe
|
||||
Entity: -number fill
|
||||
Entity: +Position position
|
||||
Entity: +number width
|
||||
Entity: +number height
|
||||
Entity: +abstract update()
|
||||
Entity: +draw()
|
||||
Entity: -detectCollision(Entity other)
|
||||
|
||||
class Raspberry{
|
||||
-input()
|
||||
-number lift
|
||||
-number gravity
|
||||
-static number maxVelocity
|
||||
+number velocity
|
||||
|
||||
-applyGravity()
|
||||
-forceBoundaries()
|
||||
-boost()
|
||||
+update()
|
||||
}
|
||||
|
||||
class Obstacle{
|
||||
-Entity pipeTop
|
||||
-Entity pipeBottom
|
||||
-int distanceBetweenPipes
|
||||
-int padding
|
||||
-resetPosition()
|
||||
-number distanceBetweenPipes
|
||||
-number padding
|
||||
-number speed
|
||||
-static number startX
|
||||
|
||||
-randomRange()
|
||||
+resetPosition()
|
||||
+update()
|
||||
+draw()
|
||||
}
|
||||
|
||||
class Pipe {
|
||||
+update()
|
||||
}
|
||||
|
||||
class Position{
|
||||
-int _x
|
||||
-int _y
|
||||
|
||||
+get x()
|
||||
+set x()
|
||||
+get y()
|
||||
+set y()
|
||||
+int x
|
||||
+int y
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue