Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- def print_field(field):
- print "".join(field[0:8])
- print "".join(field[8:16])
- print "".join(field[16:24])
- print "".join(field[24:32])
- print "".join(field[32:40])
- print "".join(field[40:48])
- print "".join(field[48:56])
- print "".join(field[56:64])
- field = list("TSLDKLSTBBBBBBBB00000000000000000000000000000000BBBBBBBBTSLKDLST")
- fieldnames = []
- pos = 0
- for letter in list("abcdefgh"):
- for number in list("12345678"):
- fieldnames += [str(letter+number), pos]
- pos += 1
- do = "b4-c6"
- if "-" in do:
- pos1 = do[0:2]
- pos2 = do[3:5]
- for f in fieldnames:
- if f[0] == pos2:
- if field[f[1]] not "0":
- for f1 in fieldnames:
- if f1[0] == pos1:
- pos1 = f1[1]
- for f2 in fieldnames:
- if f2[0] == pos2:
- pos2 = f2[1]
- field[pos2] = field[pos1]
- field[pos1] = "0"
- print_field(field)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement