def roles(self): """An iterator of the game roles. Yields: Role: A game role. """ with Frame(): role_variable = Term() role_query_term = self._role_functor(role_variable) with self._stateless_query(role_query_term) as q: while q.next_solution(): yield Role._from_atom(role_variable.get_atom())