added functionality to calculate a tank's current state