Link to the code:
So I did everything good till the energy transfer, somehow it’s not working as intended,
1)at the first transfer the energy was good, it went from 80 to 100 with a transfer of 52, and the instance that I took energy from, had a value of 48, all good,
2) then I did a task of the instance I took energy from and energy when from 48 to 38. //after every task it takes 10 energy.
3)I tried to transfer 39 energy to see if it goes to 0 or -1, since it had 38, and it worked and the energy was -1%, all good, then I decided to check currenty battery level of both instances that one was good, -1, but somehow the instance I was giving the energy has a value of 38, and even if I change the % to transfer it still gives the value of 38?.