GameConfig class

Some general config parameters for a game of gameType

Custom options can be added to the options map, but must be in a json compatible form

Annotations
  • @freezed

Constructors

GameConfig({required GameType gameType, PlayerID? adminID, @Default(NameSet.Basic) NameSet nameSet, @Default(false) bool customNames, @Default(15) int rounds, @Default(1) int minPlayers, @Default(10) int maxPlayers, @Default(true) bool autoStart, Map<String, dynamic>? options})
const
factory
GameConfig.fromJson(Map<String, dynamic> map)
factory

Properties

adminID String?
no setterinherited
autoStart bool
no setterinherited
copyWith → $GameConfigCopyWith<GameConfig>
no setterinherited
customNames bool
no setterinherited
gameType String
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
maxPlayers int
no setterinherited
minPlayers int
no setterinherited
nameSet NameSet
no setterinherited
options Map<String, dynamic>?
options must be json serializable
no setterinherited
rounds int
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited