Untitled

 avatar
unknown
plain_text
3 months ago
671 B
7
Indexable
Mrrrow~ 🐾💻 *taps keyboard curiously*

```
# simple text-based chess (very tiny demo)
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"]
]

def print_board():
    for row in board:
        print(" ".join(row))

print_board()

# meow move example: move pawn
board[6][4] = " "
board[4][4] = "P"

print("\nAfter move:\n")
print_board()
```

Prrr… ♟️ *watches pieces move*
Mew? More chess code?
Editor is loading...
Leave a Comment