TaherFattahi's picture
init: tetris neural network model with q learning
03b0d13
raw
history blame contribute delete
264 Bytes
import tetris
def BoardState(gs:tetris.GameState) -> list[int]:
"""Represents the board as a state of flattened integers."""
ToReturn:list[int] = []
for row in gs.board:
for col in row:
ToReturn.append(int(col))
return ToReturn