refactored main plus small changes

This commit is contained in:
steffen-illium
2021-05-27 15:31:45 +02:00
parent 827c2b9ac2
commit 8768d9b75f
5 changed files with 141 additions and 13 deletions

View File

@ -64,6 +64,9 @@ def check_agent_move(state, dim, action):
or y_new >= agent_slice.shape[0]
)
# Check for collision with level walls
valid = valid and not state[LEVEL_IDX][x_new, y_new]
return (x, y), (x_new, y_new), valid