Files
project_game/ladder_mystery_coding_game.py
mdecker6 653bf62cce trying
2025-11-20 09:42:49 -05:00

30 lines
671 B
Python

from retro.game import Game
from retro.agent import Agent
import time
import os
import sys
3
def clear_terminal():
if os.name == "nt":
os.system("cls")
else:
sys.stdout.write("\033c")
sys.stdout.flush()
class RandomKeyAgent(Agent):
def act(self, state):
return None
class MysteryCodingLadderGame(Game):
def __init__(self, agents, state):
super().__init__(agents=agents, state=state)
self.word = "coding" 3
self.index = 0
self.position = 0
self.ladder_height = len(self.word) 0
self.running = True