- Implemented a new
BasicPowerDistributionStrategy
class that implements theIPowerDistributionStrategy
interface. - This strategy distributes power proportionally among available batteries based on their capacity.
- Introduced dependency injection using Microsoft.Extensions.DependencyInjection.
- Services are now configured in the
Program.cs
file, improving modularity and testability.
- Modified
BatteryPool
class to use theIPowerDistributionStrategy
. - Implemented
IBatteryPool
interface for better abstraction.
- The algorithm now handles busy batteries, fully charged, and fully discharged batteries.
- Implements a two-pass approach for initial distribution and adjustment for remaining power.
- Added unit tests for
BasicPowerDistributionStrategy
to ensure correct power distribution. - Implemented tests for handling busy batteries and proportional distribution.
- Reorganized the codebase to follow better separation of concerns.
- Introduced abstractions (interfaces) for key components to improve extensibility.