This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import random | |
import time | |
import copy | |
# import threading | |
class Game: | |
def __init__(self, n: int): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.Char | |
-- Cmd is the tree containing the commands in sequence. | |
data Cmd = Cmd Char Cmd | Loop Cmd Cmd | Empty deriving Show | |
-- Brain is the main datatype that is processed throughout the program. | |
-- It has a strip of numbers with a pointer to point to the index on it | |
-- making it a Turing Machine. It also carries with it the output to be | |
-- piped out to standard output. | |
data Brain = Brain [Int] Int String deriving Show |