int mag = 100; // madnitude that coins are to be thrown
int rand = 30; // max variation to be subtracted from magnitide
- Sector::current()->add_object(new HeavyCoin(position, Vector (2.5,-4.5)*(mag-gameRandom.rand(rand))));
- Sector::current()->add_object(new HeavyCoin(position, Vector (2,-5)*(mag-gameRandom.rand(rand))));
- Sector::current()->add_object(new HeavyCoin(position, Vector (1.5,-5.5)*(mag-gameRandom.rand(rand))));
- Sector::current()->add_object(new HeavyCoin(position, Vector (1,-6)*(mag+gameRandom.rand(rand))));
- Sector::current()->add_object(new HeavyCoin(position, Vector (0.5,-6.5)*(mag-gameRandom.rand(rand))));
- Sector::current()->add_object(new HeavyCoin(position, Vector (-2.5,-4.5)*(mag-gameRandom.rand(rand))));
- Sector::current()->add_object(new HeavyCoin(position, Vector (-2,-5)*(mag-gameRandom.rand(rand))));
- Sector::current()->add_object(new HeavyCoin(position, Vector (-1.5,-5.5)*(mag-gameRandom.rand(rand))));
- Sector::current()->add_object(new HeavyCoin(position, Vector (-1,-6)*(mag+gameRandom.rand(rand))));
- Sector::current()->add_object(new HeavyCoin(position, Vector (-0.5,-6.5)*(mag-gameRandom.rand(rand))));
+ Sector::current()->add_object(std::make_shared<HeavyCoin>(position, Vector (2.5,-4.5)*(mag-gameRandom.rand(rand))));
+ Sector::current()->add_object(std::make_shared<HeavyCoin>(position, Vector (2,-5)*(mag-gameRandom.rand(rand))));
+ Sector::current()->add_object(std::make_shared<HeavyCoin>(position, Vector (1.5,-5.5)*(mag-gameRandom.rand(rand))));
+ Sector::current()->add_object(std::make_shared<HeavyCoin>(position, Vector (1,-6)*(mag+gameRandom.rand(rand))));
+ Sector::current()->add_object(std::make_shared<HeavyCoin>(position, Vector (0.5,-6.5)*(mag-gameRandom.rand(rand))));
+ Sector::current()->add_object(std::make_shared<HeavyCoin>(position, Vector (-2.5,-4.5)*(mag-gameRandom.rand(rand))));
+ Sector::current()->add_object(std::make_shared<HeavyCoin>(position, Vector (-2,-5)*(mag-gameRandom.rand(rand))));
+ Sector::current()->add_object(std::make_shared<HeavyCoin>(position, Vector (-1.5,-5.5)*(mag-gameRandom.rand(rand))));
+ Sector::current()->add_object(std::make_shared<HeavyCoin>(position, Vector (-1,-6)*(mag+gameRandom.rand(rand))));
+ Sector::current()->add_object(std::make_shared<HeavyCoin>(position, Vector (-0.5,-6.5)*(mag-gameRandom.rand(rand))));
remove_me();
}