refactor(room_manager): enable any state to transition to terminating
@@ -12,6 +12,7 @@ import (
var validStatusTransitions = map[game_room.GameRoomStatus]map[game_room.GameRoomStatus]struct{}{
game_room.GameStatusPending: {
game_room.GameStatusReady: struct{}{},
+ game_room.GameStatusTerminating: struct{}{},
game_room.GameStatusUnready: struct{}{},
game_room.GameStatusError: struct{}{},
},
@@ -28,6 +29,7 @@ var validStatusTransitions = map[game_room.GameRoomStatus]map[game_room.GameRoom
},
game_room.GameStatusOccupied: {
game_room.GameStatusReady: struct{}{},
+ game_room.GameStatusTerminating: struct{}{},
game_room.GameStatusUnready: struct{}{},
game_room.GameStatusError: struct{}{},
},
