Description: This is a suggested enhancement to the definition and usage of the PlayerAction enum in the game environment. Currently, socket_env.py maintains its own list of action commands that is nearly identical to the enum already defined in enums/player_action.py. This is an unnecessary duplication of information and creates confusion about the correct action names, since there are slight differences between the two representations.
|
class PlayerAction(IntEnum): |
|
NOP = 0, |
|
NORTH = 1, |
|
SOUTH = 2, |
|
EAST = 3, |
|
WEST = 4, |
|
INTERACT = 5, |
|
TOGGLE = 6, |
|
CANCEL = 7, |
|
PICKUP = 8, |
|
RESET = 9, |
|
ACTION_COMMANDS = ['NOP', 'NORTH', 'SOUTH', 'EAST', 'WEST', 'INTERACT', 'TOGGLE_CART', 'CANCEL', 'SELECT','RESET'] |
Solution: Consistent action names should be used throughout the game environment and all code in the game environment should use the common representation of player actions defined in enums/player_action.py.
Description: This is a suggested enhancement to the definition and usage of the
PlayerActionenum in the game environment. Currently,socket_env.pymaintains its own list of action commands that is nearly identical to the enum already defined inenums/player_action.py. This is an unnecessary duplication of information and creates confusion about the correct action names, since there are slight differences between the two representations.propershopper/enums/player_action.py
Lines 4 to 14 in 026316b
propershopper/socket_env.py
Line 17 in 026316b
Solution: Consistent action names should be used throughout the game environment and all code in the game environment should use the common representation of player actions defined in
enums/player_action.py.