awitaminosis commited on
Commit
4cf694c
·
1 Parent(s): cb3cd0f
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -27,7 +27,9 @@ def greet_json():
27
  counter = 0
28
  for i in range(9):
29
  char = 'X' if state[i] == 0 else '0'
30
- html_content += '<div><span class="char">' + char + '</span></div>'
 
 
31
 
32
 
33
 
@@ -45,7 +47,7 @@ def change_step():
45
  elif step == 'X':
46
  step = '0'
47
 
48
- @app.post('/turn/{pos}')
49
  def turn(pos):
50
  change_step()
51
  state[int(pos)] = int(not state[int(pos)])
 
27
  counter = 0
28
  for i in range(9):
29
  char = 'X' if state[i] == 0 else '0'
30
+ if i in [0,3,6]:
31
+ html_content += '<br><br><br><br><br>'
32
+ html_content += '<div ><span class="char"><a target="_blank" href="/turn/'+str(i)+'">' + char + '</a></span></div>'
33
 
34
 
35
 
 
47
  elif step == 'X':
48
  step = '0'
49
 
50
+ @app.get('/turn/{pos}')
51
  def turn(pos):
52
  change_step()
53
  state[int(pos)] = int(not state[int(pos)])