unit tests for player attack manager and refoctor common validation functionality into validation helper