RaspberryRocketeer/frontend
dhain d98cd7b10e Refactor & Bug Fix
`game.ts`
 - fixed score on new game

`Obstacle.ts`
 - made distanceBetweenPipes and startX public
 - moved initialization of distanceBetweenPipes and startX to game.setupGame()

`Pipe.ts`
 - created move() method to move the pipe

 `Raspberry.ts`
  - added constant variables for Raspberry size
2023-01-10 09:37:12 +01:00
..
model Refactor & Bug Fix 2023-01-10 09:37:12 +01:00
resources added PressStart2P-Regular.ttf font 2023-01-10 09:09:06 +01:00
.gitignore initial commit 2022-11-29 09:32:09 +01:00
game.ts Refactor & Bug Fix 2023-01-10 09:37:12 +01:00
global.d.ts p5 working 2022-11-29 10:11:11 +01:00
index.html p5 working 2022-11-29 10:11:11 +01:00
package-lock.json p5 working 2022-11-29 10:11:11 +01:00
package.json p5 working 2022-11-29 10:11:11 +01:00
README.md Formatted files, added types and updated class diagram 2022-12-06 10:36:14 +01:00
tsconfig.json removed "module": "ES2020", 2022-12-13 08:36:05 +01:00

classDiagram
Entity <|-- Raspberry
Entity <|-- Obstacle
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{
-number lift
-number gravity
-static number maxVelocity
+number velocity

-applyGravity()
-forceBoundaries()
-boost()
+update()
}

class Obstacle{
-Entity pipeTop
-Entity pipeBottom
-number distanceBetweenPipes
-number padding
-number speed
-static number startX

-randomRange()
+resetPosition()
+update()
+draw()
}

class Pipe {
+update()
}

class Position{
+int x
+int y
}