The bots are playing infinitely.
This commit is contained in:
parent
c7b2d5e8c5
commit
078ba9979e
1 changed files with 4 additions and 4 deletions
|
@ -148,8 +148,8 @@ game(WaitOrStart) ->
|
||||||
|
|
||||||
new_round() ->
|
new_round() ->
|
||||||
Paused = true,
|
Paused = true,
|
||||||
SendStart = false,
|
Start = false,
|
||||||
gen_server:cast({global, pong_bot}, {new_round, Paused, SendStart}).
|
gen_server:cast({global, pong_bot}, {new_round, Paused, Start}).
|
||||||
|
|
||||||
|
|
||||||
set_game_token(GameToken) ->
|
set_game_token(GameToken) ->
|
||||||
|
@ -237,9 +237,9 @@ handle_cast({paused, Paused}, State) ->
|
||||||
NewState = dict:store(paused, Paused, State),
|
NewState = dict:store(paused, Paused, State),
|
||||||
{noreply, NewState};
|
{noreply, NewState};
|
||||||
|
|
||||||
handle_cast({new_round, Paused, SendStart}, State) ->
|
handle_cast({new_round, Paused, Start}, State) ->
|
||||||
State1 = dict:store(paused, Paused, State),
|
State1 = dict:store(paused, Paused, State),
|
||||||
NewState = dict:store(send_start, SendStart, State1),
|
NewState = dict:store(start, Start, State1),
|
||||||
{noreply, NewState};
|
{noreply, NewState};
|
||||||
|
|
||||||
handle_cast({start, Start}, State) ->
|
handle_cast({start, Start}, State) ->
|
||||||
|
|
Reference in a new issue