static void Main(string[] args) { while (true) { Console.WriteLine("Brainfuck コードを書いてください"); Console.Write("> "); var code = Console.ReadLine(); var token = BrainFuck.Tokenize(code); BrainFuck.Run(token); } }
public RLBrain(string Target = "hi") { target = Target; Treshold = 25; ProgramSize = 25; ProgramSizeStep = 25; ProgramMaxSize = 500; //MaxLoopSize = 100; MemorySize = (target.Length * 10) + Treshold; MaxLoopSize = 100; //commands = "<>+-.[]"; // without input //commands = "<>+-.,[]"; // with input Program = new char[ProgramSize]; bf = new BrainFuck(); }
// Use this for initialization void Start() { // 01. CONNECT EPOC = new BrainFuck("INSERT_YOUR_HEADSET_ID"); string client_id = "INSERT_YOUR_CLIENT_ID"; string client_secret = "INSERT_YOUR_CLIENT_SECRET"; EPOC.Connect(client_id, client_secret); EPOC.On("Ready", Ready); EPOC.On("Stream", Stream); Ball = BallObject.GetComponent <Rigidbody>(); }
// Use this for initialization void Start() { // 01. CONNECT // e.g. EPOCPLUS-0000000 EPOC = new BrainFuck("INSERT_YOUR_HEADSET_ID"); // FROM YOUR EMOTIV ACCOUNT string client_id = "INSERT_YOUR_CLIENT_ID"; string client_secret = "INSERT_YOUR_CLIENT_SECRET"; EPOC.Connect(client_id, client_secret); // SETUP EVENTS EPOC.On("Ready", Ready); EPOC.On("Stream", Stream); }
public BackTrackMind(string Target) { target = Target; ProgramSize = 25; ProgramMaxSize = 500; ProgramSizeStep = 25; MaxLoopSize = 100; Treshold = 50; MemorySize = (target.Length * 10) + Treshold; MaxLoopSize = 100; commands = "+><-[]."; // an other ordering CommandsLength = commands.Length; //commands = "<>+-.[]"; // without input //commands = "<>+-.,[]"; // with input Program = new char[ProgramSize]; bf = new BrainFuck(); }
public void TestRunningExecuteMethod() { Assert.ThrowsException <NotImplementedException>(() => { string output = BrainFuck.Execute("Code", "Input"); }); }