changed type of energy from int to float

float is better for changing energy per timeslice