Fudge
07/22/2019, 10:44 AM//You declare this:
fun Gun.shoot(with ammo: Ammo){
// logic
}
// And then you can use like this:
val ammo = Ammo()
val gun = Gun()
with(ammo){
gun.shoot()
}
But I cannot remember where it was. Can someone remind me?