This repository contains a test case for a Pygame project. The test case is designed to test the movement of a player, Star Generation, Collision Detection, Score Calculation, Game Over Condition and Key Input in a game.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need to have Python and Pygame installed on your machine. You can install Pygame using pip: pip install pygame
Clone the repository to your local machine:
To run the tests, navigate to the project directory and run the following command:
#the Test includes the following test; #1.Player Movement: Test the player's ability to move left and right within the game window. Check that the player's movement is bounded within the window's width.
#2.Star Generation: Test the generation of stars at random positions at the top of the window and their fall downwards. Check that the number of stars generated increases over time.
#3.Collision Detection: Test the game's ability to detect when a star collides with the player. When a collision occurs, the game should stop and display the game over screen.To test the game's ability to detect when a star does not collide with the player
#4.Score Calculation: Test the game's ability to correctly calculate the score based on the elapsed time and the number of stars collected.
#5.Game Over Condition: Test the game's ability to correctly handle the game over condition when the player collides with a star. The game should reset the game state and allow the player to restart the game.To test the game's ability to correctly handle the game over condition when the player does not collide with a star.
#6.Key Input: Test the game's ability to correctly handle key inputs for player movement and game control (pausing and restarting the game).
- Namgyel Huk - Initial work - NamgyelHuk708
This project is licensed under the MIT License - see the LICENSE.md file for details