Skip to content

Commit

Permalink
Add ColorName literal type
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Aug 2, 2023
1 parent 60d38d5 commit 48bd065
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chess/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

Color = bool
COLORS = [WHITE, BLACK] = [True, False]
COLOR_NAMES = ["black", "white"]
ColorName = Literal["white", "black"]
COLOR_NAMES: List[ColorName] = ["black", "white"]

PieceType = int
PIECE_TYPES = [PAWN, KNIGHT, BISHOP, ROOK, QUEEN, KING] = range(1, 7)
Expand Down

0 comments on commit 48bd065

Please sign in to comment.