Corrected error in turn-based implementation