Skip to content

A behavior for players that may administer a game #771

@jkomoros

Description

@jkomoros

There are some actions, like reassign teams, reorder players, WaitForEnoughPlayers, that only some players should be able to do.

A prebaked behaviors.GameAdministrator that has a MayAdministerGame bool. If true, then actions like the above are allowed to proceed. If false, then those moves are only allowed if the move has been explicitly configured to allow anyone to do the action, or some other test. (Conceivably you might want a different bit for the different prebaked moves)

If behaviors.GameAdministrator is included, by default player 0 is set to administrator only. But the admin can also assign another person to be admin.

Ideally delegate.GroupMembership and related machinery could be used in Legal methods.

Related to #491. See also #770. See also #768

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions