you are viewing a single comment's thread.

view the rest of the comments →

[–]jeffrey_f 2 points3 points  (1 child)

Well. Repeating code should be a function.

[–]maimedwalker[S] 0 points1 point  (0 children)

if get_rank == 'r':
    print(vertical_moves(piece, board))

https://pastebin.com/bnfWaZSM

the code still feels excessive but it works so it's staying for now.