Commit Graph

10 Commits

Author SHA1 Message Date
Karma Riuk
082acc4451 Added random color generation to the polygons, also made so that the
color of the vector indicating speed is the same as the color of the
polygon, but a little lighter
2023-06-13 13:50:07 +02:00
Karma Riuk
89e250dcba Removed the passing of the mass through parameters. Now the mass is
determined by the area of the polygon
2023-05-19 16:31:38 +02:00
Karma Riuk
a424fec9a9 Now when polygons collide, they get moved by the overlap to ensure that
they don't get stuck in the following frames, it works very well and
Carza is happy :))))))
2023-05-19 15:24:11 +02:00
Karma Riuk
92e51a96be Added the destroy method for the polygons 2023-05-19 10:18:49 +02:00
Karma Riuk
398cae3b24 Added toString method to polygons, together with fields "label" and
"collided_with"
2023-05-17 13:21:06 +02:00
Karma Riuk
d0de911344 got the speed working (yay) but the angular velocity that results is superrrr low, thus not creating any rotation after impact, wierd... 2023-04-02 21:53:21 +02:00
Karma Riuk
7dc54ddfe5 Made the angular speed a double 2023-03-25 14:03:07 +01:00
Karma Riuk
4d14f2a30b Added wall bouncing logic (flawed); added bounding box computation and display 2023-03-25 10:57:32 +01:00
Karma Riuk
48a1b3ade4 Added the possibility to set the fields of the polygon class in a functional programming style 2023-03-14 23:09:48 +01:00
Karma Riuk
9fd87b7f29 Simple implementation of polygons, you can create them in the init and draw them 2023-03-14 21:46:36 +01:00