-
Notifications
You must be signed in to change notification settings - Fork 2
/
test_callback.ex
63 lines (43 loc) · 1.11 KB
/
test_callback.ex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
defmodule Gossip.TestCallback do
@moduledoc false
defmodule Core do
@moduledoc false
@behaviour Gossip.Client.Core
@impl true
def user_agent(), do: "Test Client"
@impl true
def channels(), do: ["gossip"]
@impl true
def players(), do: []
@impl true
def authenticated(), do: :ok
@impl true
def message_broadcast(_message), do: :ok
end
defmodule Players do
@moduledoc false
@behaviour Gossip.Client.Players
@impl true
def player_sign_in(_game_name, _player_name), do: :ok
@impl true
def player_sign_out(_game_name, _player_name), do: :ok
@impl true
def player_update(_game_name, _player_names), do: :ok
end
defmodule Tells do
@moduledoc false
@behaviour Gossip.Client.Tells
@impl true
def tell_receive(_from_game, _from_player, _to_player, _message), do: :ok
end
defmodule Games do
@moduledoc false
@behaviour Gossip.Client.Games
@impl true
def game_update(_game), do: :ok
@impl true
def game_connect(_game), do: :ok
@impl true
def game_disconnect(_game), do: :ok
end
end