Skip to content

Commit

Permalink
correcting the gameover as possible state
Browse files Browse the repository at this point in the history
  • Loading branch information
mbertani-eb committed Oct 28, 2022
1 parent 2577ae3 commit f4aeffc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion development/common/logs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ def __init__(self, data: list) -> None:

@property
def possible_states(self) -> list:
possible_states = [log[STATE] for log in self.logs if STATE in log.keys()]
possible_states = [log[STATE] for log in self.logs
if STATE in log.keys() and log[STATE] != "gameover"]
possible_states.append(ALL_STATES)
return list(set(possible_states))

Expand Down
4 changes: 1 addition & 3 deletions development/templates/development/new_match_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ <h1>Match details</h1>
<select class="form-control" name="valid_move" id="valid_move">
<optgroup label="Validity">
{% for states in move_states %}
{% if states != "gameover" %}
<option value="{{ states }}">{{ states|title }}</option>
{% endif %}
<option value="{{ states }}">{{ states|title }}</option>
{% endfor %}
</optgroup>
</select>
Expand Down

0 comments on commit f4aeffc

Please sign in to comment.