Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- board = []
- def build_board():
- for i in range(0,8):
- board.append(["☐"] * 8)
- board[1] = ("♟" * 8)
- board[6] = ("♙" * 8)
- board[0] = ["♜","♞","♝","♛","♚","♝","♞","♜"]
- board[7] = ["♖","♘","♗","♕","♔","♗","♘","♖"]
- def print_board(board):
- for row in board:
- print ("|".join(row))
- build_board()
- print_board(board)
- RESULT:
- ♜|♞|♝|♛|♚|♝|♞|♜
- ♟|♟|♟|♟|♟|♟|♟|♟
- ☐|☐|☐|☐|☐|☐|☐|☐
- ☐|☐|☐|☐|☐|☐|☐|☐
- ☐|☐|☐|☐|☐|☐|☐|☐
- ☐|☐|☐|☐|☐|☐|☐|☐
- ♙|♙|♙|♙|♙|♙|♙|♙
- ♖|♘|♗|♕|♔|♗|♘|♖
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement