Skip to content
/ balls Public
forked from MateuszG2001/TPW

A project written for a concurrent programming class.

License

Notifications You must be signed in to change notification settings

wadiim/balls

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Balls

A GUI application written in C# for a concurrent programming class. It simulates the movement of balls within a rectengular space, although the simulation is not intended to be realistic. The application employs the concept of concurrent programming by implementing each ball as a separate thread.

Features

  • Collisions: The balls can collide with each other. When a collision occurs, the velocities of the colliding balls are simply swapped. This collision implementation does not aim for realistic physics.
  • Collision detection: Two conditions must be met for a collision to be detected between balls. Firstly, they must touch or overlap, and secondly, they need to be getting closer to each other (i.e. the distance between their centers must decrease over time). This second condition prevents the balls from sticking together.
  • Dynamic refresh rate: The refresh rate of each ball is dependent on its speed. Faster-moving balls are updated more frequently, ensuring smoother animations.
  • Layered design pattern: The program employs a layered design pattern, which provides a structured and modular approach to organizing the codebase.

License

Apache License 2.0

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%