implement PlayerPurpose as enum instead of int constants