more cool stuff

chess, woah
This commit is contained in:
cutsweettea
2025-10-15 12:46:55 -04:00
parent 52ee1d7a8b
commit cb8e6e9b5a
12 changed files with 663 additions and 0 deletions

14
chess/player.py Normal file
View File

@@ -0,0 +1,14 @@
from enum import Enum
class Player(Enum):
BLACK = 0
WHITE = 1
def next(self):
cls = self.__class__
members = list(cls)
index = members.index(self) + 1
if index >= len(members):
index = 0
return members[index]