Skip to content

Commit 697d6dd

Browse files
committed
Add more types
1 parent 01bfe35 commit 697d6dd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

resources/code/ping_pong/master_statem.erl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
-export([initial_state/0, command/1, precondition/2, next_state/3,
88
postcondition/3]).
99

10-
-type name() :: atom().
10+
-type name() :: atom().
11+
-type score() :: non_neg_integer().
1112

1213
-record(state, {players = [] :: [name()],
13-
scores = dict:new() :: dict:dict() | [{_,_}]}).
14+
scores = dict:new() :: dict:dict(name(), score())
15+
| [{name(), score()}]}).
1416

1517
-define(MASTER, ping_pong).
1618
-define(NAMES, [bob, alice, john, mary, ben]).

0 commit comments

Comments
 (0)