@@ -19,16 +19,9 @@ start([], Ctx = #texas{gid = Id, seats = S, pot = P}) ->
19
19
RewardedSeats = RewardedCtx # texas .seats ,
20
20
KickedCtx = kick_poor_players (seat :lookup (? PS_READY , RewardedSeats ), RewardedCtx ),
21
21
22
- ResetCtx = KickedCtx # texas {
23
- board = [],
24
- pot = pot :new (),
25
- deck = deck :new (),
26
- seats = reset_seat (seat :get (KickedCtx # texas .seats ), KickedCtx # texas .seats )
27
- },
22
+ game :broadcast (# notify_game_end { game = Id }, KickedCtx ),
28
23
29
- game :broadcast (# notify_game_end { game = Id }, ResetCtx ),
30
-
31
- {stop , ResetCtx }.
24
+ {stop , KickedCtx }.
32
25
33
26
dispatch (_R , _Ctx ) ->
34
27
ok .
@@ -37,11 +30,6 @@ dispatch(_R, _Ctx) ->
37
30
% %% private
38
31
% %%
39
32
40
- reset_seat ([], Seats ) -> Seats ;
41
- reset_seat ([H |T ], Seats ) ->
42
- reset_seat (T , seat :set (H # seat {hand = hand :new ()}, Seats )).
43
-
44
-
45
33
show_cards ([], _Ctx ) -> ok ;
46
34
show_cards ([# seat {pid = PId , identity = Identity , hand = Hand , sn = SN }|T ], Ctx = # texas {gid = Id }) ->
47
35
game :broadcast (# notify_cards { game = Id , player = PId , sn = SN , cards = Hand # hand .cards }, Ctx , [Identity ]),
0 commit comments