GameTester<T extends Game<Event>> class

GameTester lets you test an event and check it's outcome

Just call event with your event, and a function that recieves a game and error and check the properties you want

Constructors

GameTester(Reader read, Map<PlayerID, Reader> readers, List<Player> _players, GameCode code)

Properties

backendReader → Reader
latefinal
code → GameCode
final
error → GameError<Game<Event>>?
Returns the current error state
no setter
game → T
Returns the current game state
no setter
hashCode int
The hash code for this object.
no setterinherited
read → Reader
final
readers Map<PlayerID, Reader>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

event(Event event, dynamic outcome(T, GameError<Game<Event>>?)) → void
Event lets you test the outcome of an event
nextRound(dynamic expectation(T)) → void
Advances to the next round, and checks the expectation of the game after the round has advanced
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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