Skip to content

Instantly share code, notes, and snippets.

@ehasin
ehasin / chess.py
Last active November 28, 2019 16:44 — forked from rsheldiii/chess.py
chess program for python
"""CONVENTIONS:
positions are done row-column from the bottom left and are both numbers. This corresponds to the alpha-number system in traditional chess while being computationally useful. they are specified as tuples
"""
import sys
import itertools
WHITE = "white"
BLACK = "black"
class Game:
#ive decided since the number of pieces is capped but the type of pieces is not (pawn transformations), I've already coded much of the modularity to support just using a dictionary of pieces