Skip to content

Latest commit

 

History

History
73 lines (44 loc) · 1.87 KB

README.md

File metadata and controls

73 lines (44 loc) · 1.87 KB

CSF101_CAP2_Pygame

This repository contains a Pygame project along with test cases performed using pytest.

Project Overview

The Pygame project in this repository is designed to [brief description of your Pygame project]. It includes functionalities such as [mention key features or gameplay mechanics].

Getting Started

To run the Pygame project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/Namgay282004/CSF101_CAP2_Pygame.git
  2. Navigate to the project directory:

    cd CSF101_CAP2_Pygame
  3. Install the required dependencies:

    # Ensure you have Python and pip installed
    pip install -r requirements.txt
  4. Run the Pygame project:

    python main.py

Running Tests

This project includes a set of test cases to ensure the correctness of its functionalities. The tests are written using pytest. To run the tests, follow these steps:

  1. Install pytest:

    pip install pytest
  2. Run the tests:

    pytest test_airplane.py

The output will indicate whether the tests passed or if there were any failures. A successful test run should display dots (.) for each passing test.

Test Cases

The test cases cover various aspects of the Pygame project, including:

  • Initialization of the game.
  • Loading of images.
  • Game logic related to aeroplane movement, key input handling, gift falling, scoring, boy's movement, initial positions, and more.

Feel free to explore the test_airplane.py file for a detailed look at each test case.

Contributing

If you would like to contribute to this project, feel free to fork the repository and submit a pull request. Your contributions are welcome!

License

This project is licensed under the MIT License.