You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
613 B
33 lines
613 B
6 months ago
|
#! /usr/bin/python
|
||
|
|
||
|
field =[
|
||
|
[1,0,0,0,0,0,0,0,0,0,0,0],
|
||
|
[0,1,0,0,0,0,0,0,0,0,0,0],
|
||
|
[0,0,1,0,0,0,0,0,0,0,0,0],
|
||
|
[0,0,0,1,0,0,0,0,0,0,0,0],
|
||
|
[0,0,0,0,1,0,0,0,0,0,0,0],
|
||
|
[0,0,0,0,0,1,0,0,0,0,0,0],
|
||
|
[0,0,0,0,0,0,1,0,0,0,0,0],
|
||
|
[0,0,0,0,0,0,0,1,0,0,0,0]
|
||
|
]
|
||
|
|
||
|
def print_field():
|
||
|
for line in range(0,len(field)):
|
||
|
curline = field[line]
|
||
|
|
||
|
# print(f'line={line}')
|
||
|
for col in range(0,len(curline)):
|
||
|
# print(f'col={col}')
|
||
|
if curline[col] == 0:
|
||
|
print('o ', end='')
|
||
|
else:
|
||
|
print('x ', end='')
|
||
|
print('\n',end='')
|
||
|
|
||
|
def main():
|
||
|
print_field()
|
||
|
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
main()
|