Skip to content

Commit bcada3d

Browse files
committed
Add types to scores
1 parent 9e23c8a commit bcada3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

resources/code/ping_pong/ping_pong_statem.erl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
postcondition/3]).
99

1010
-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(PLAYER, ping_pong).
1618
-define(MASTER, ping_pong).

0 commit comments

Comments
 (0)