Beispiel #1
0
 private static MachineRegister randomRegister()
 {
     Random random = new Random();
     MachineRegister register = new MachineRegister();
     register.init(random.Next(0, 5), random.Next(0, 5), random.Next(0, 5));
     return register;
 }
Beispiel #2
0
 public MachineTester()
 {
     this.register = new MachineRegister();
     this.counter = 0;
 }
Beispiel #3
0
 public Machine()
 {
     this.register = new MachineRegister();
     this.state = MachineState.IDLE;
 }
Beispiel #4
0
 private static int summation(MachineRegister register, String message)
 {
     Console.WriteLine("  - " + message);
     register.C = register.A + register.B;
     return register.C;
 }
Beispiel #5
0
 private static int subtraction(MachineRegister register, String message)
 {
     Console.WriteLine(message);
     register.A = register.B - register.C;
     return register.A;
 }
Beispiel #6
0
 private static MachineRegister mockRegister()
 {
     MachineRegister register = new MachineRegister();
     register.init(5, 7, 0);
     return register;
 }