Ejemplo n.º 1
0
 static void Main(string[] args)
 {
     while (true)
     {
         Console.WriteLine("Brainfuck コードを書いてください");
         Console.Write("> ");
         var code  = Console.ReadLine();
         var token = BrainFuck.Tokenize(code);
         BrainFuck.Run(token);
     }
 }
Ejemplo n.º 2
0
 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();
 }
Ejemplo n.º 3
0
    // 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>();
    }
Ejemplo n.º 4
0
    // 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);
    }
Ejemplo n.º 5
0
 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();
 }
Ejemplo n.º 6
0
 public void TestRunningExecuteMethod()
 {
     Assert.ThrowsException <NotImplementedException>(() => {
         string output = BrainFuck.Execute("Code", "Input");
     });
 }