public abstract class YouLosePhase extends Phase {
protected Map<String, Role> mapRoles(Collection<Role> roles) {
Hashtable<String, Role> roleMap = new Hashtable<String, Role>();
for(Role role : roles) {
YouLoseRole youLoseRole;
if(role == null || !(role instanceof YouLoseRole)) {
throw new IllegalArgumentException();
} else {
youLoseRole = (YouLoseRole)role;
}
roleMap.put(youLoseRole.getId(), youLoseRole);
}
return roleMap;
}