Chess wwe
unknown
plain_text
2 years ago
1.3 kB
4
Indexable
# Define the WWE Superstar pieces pieces = { 'John Cena': 'P', 'The Rock': 'P', 'Stone Cold Steve Austin': 'P', 'Triple H': 'P', 'Undertaker': 'P', 'Brock Lesnar': 'P', 'Randy Orton': 'P', 'Seth Rollins': 'P', 'Roman Reigns': 'P', 'AJ Styles': 'P', 'Braun Strowman': 'P', 'Shawn Michaels': 'K', 'Kane': 'K', 'Big Show': 'K', 'Mark Henry': 'K', 'Vince MCMAHON': 'Q', 'Shane McMahon': 'Q', 'Stephanie McMahon': 'Q' } # Define the initial chess board board = [ ['R', 'N', 'B', 'Q', 'K', 'B', 'N', 'R'], ['P', 'P', 'P', 'P', 'P', 'P', 'P', 'P'], ['.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.'], ['p', 'p', 'p', 'p', 'p', 'p', 'p', 'p'], ['r', 'n', 'b', 'q', 'k', 'b', 'n', 'r'] ] # Map the WWE Superstar pieces to their chess representations for i, row in enumerate(board): for j, piece in enumerate(row): if piece in ['P', 'K', 'Q']: board[i][j] = [k for k, v in pieces.items() if v == piece][0] # Print the board def print_board(board): for row in board: print(' '.join(row)) print_board(board)
Editor is loading...