A game that features math solutions to simulate air puck.
To use this program, clone the repository
https://github.com/pietjanssen/TINWIS01-7-Puck-Game.git
And install the modules required using:
pip install -r requirements.txt
In order to run the program, you will need run main.py
python main.py
You can add an amount (default=2) using the parameter -amount
python main.py -amount 10
In order to move and let the pucks interact with eachother, every puck has it's own position, velocity, force, mass and Kinetic Energy.
A list consisting of an x coordinate and y coordinate. This position is always smaller than the screen size, so it fits the screen.
Example: [960, 100]
v = m/s
A list consisting of a x velocity and y velocity.
Example: [1, -1]
F = N
A starting power that accelerates the pucks by it's amount.
The user can input the following buttons to apply a force to a puck:
Apply a force up to the white puck
Apply a force to the left to the white puck
Apply a force to the right to the white puck
Apply a force down to the white puck
Apply a random force in a random direction to all pucks
m = kg
The mass of a puck. The mass of each puck determines how "heavy" a puck is. The heavier the puck, the more force it needs to accelerate
E = J
The energy of a puck determines how much each puck impacts the other puck in movement.
*Taken from https://en.wikipedia.org/wiki/Elastic_collision