game finished

This commit is contained in:
Administrator 2022-08-28 19:09:48 +03:00
parent 9a885b7bd7
commit eac39de2be

View File

@ -147,7 +147,8 @@ def get_fields(request):
another_field = player2.field
game_finished = 'o' not in player.field or 'o' not in player2.field
if not game_finished:
another_field = list(another_field.replace('o', ' '))
another_field = another_field.replace('o', ' ')
another_field = list(another_field)
return JsonResponse({
'my_field': [my_field[x * 10: (x + 1) * 10] for x in range(0, 10)],
'opponent_field': [another_field[x * 10: (x + 1) * 10] for x in range(0, 10)],