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

Test Plan #29

Closed
15 of 42 tasks
Coteh opened this issue May 31, 2020 · 1 comment · Fixed by #31
Closed
15 of 42 tasks

Test Plan #29

Coteh opened this issue May 31, 2020 · 1 comment · Fixed by #31
Assignees
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@Coteh
Copy link
Owner

Coteh commented May 31, 2020

Tests to be added (list to be updated, and issues can be created in the future for cases I've missed):

Integration Tests

Player

  • Player bounces from surface
  • Player falls down faster if space is held
  • Player can move left
  • Player can move right
  • Player can stick to ground when fast falling
  • Jump height is increased when player fast falls and releases when on ground
  • Player eventually falls to ground after charged jump
  • Player can collect pickup
  • Player is knocked back when hitting falling obstacle
  • Player cannot move past horizontal boundaries will be covered under Level

Background

  • Background scrolls down as player goes up
  • Background loads new tile if scrolled down past threshold

Lava

  • Lava moves up
  • Lava can be sped up
  • Lava can be slowed down temporarily
  • Lava speed is increased when further away from player

Moving Blocks

  • Block can move horizontally
  • Block's horizontal speed is reversed when hitting side of game's dimensions

Block Chunks

  • Blocks can be generated from chunk
  • Different chunk types can be selected when creating chunk
  • Chunk despawns when all blocks in chunk pass bottom of camera by theshold

Falling Obstacles

  • Obstacle can fall down
  • Obstacle despawns when it passes bottom of camera by threshold
  • Obstacle spawns above top of camera

Score System

  • Score can be updated
  • Score update is triggered when player moves up past threshold
  • High score is updated when score surpasses high score
  • High score is saved to local storage

Game Over

  • Displays "Game Over" text
  • If user beats high score, high score message appears
  • If user does not beat high score, high score message won't appear
  • Displays button to play again
  • Game is able to restart when play again button is clicked

Level

  • Player cannot move past left bounds
  • Player cannot move past right bounds

Unit Tests

ChunkHelper

randomOffset

  • Returns lowest offset
  • Returns highest offset
  • Returns an offset between lowest and highest offsets

randomSpeed

  • Returns lowest speed
  • Returns highest speed
  • Returns a speed between lowest and highest speed
  • Returns negative speed if sign is flipped

Remainder of classes TDB since the rest of them rely on Phaser constructs, and it's not certain how difficult it'll be to mock out Phaser functionality to be worth it.

@Coteh Coteh self-assigned this Jun 4, 2020
@Coteh Coteh added the enhancement New feature or request label Jun 15, 2020
@Coteh Coteh mentioned this issue Jun 23, 2020
42 tasks
@Coteh
Copy link
Owner Author

Coteh commented Jun 23, 2020

Due to increased complexity of writing integration tests with Phaser, I have split the remaining work into a new issue: #47.

I will continue work there.

@Coteh Coteh added the wontfix This will not be worked on label Oct 20, 2023
@Coteh Coteh closed this as completed Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant