As a step towards initial support for energy in the game, lets implement batteries: - [x] Every unit & building has a battery. The battery has maximum capacity in Joules and current energy level in Joules. - [x] The battery discharges at a constant rate (a constant in the code). - [ ] Movement of unit is blocked once the energy goes to 0. - [ ] Attacking is blocked once the energy goes below X (a constant in the code). - [ ] Manufacturing is blocked once the energy goes below Y (a constant in the code). Note that charging is not handled as part of this issue.
As a step towards initial support for energy in the game, lets implement batteries:
Note that charging is not handled as part of this issue.