comparison Test/Example/FizzBuzz/Counter.cs @ 33:7575980bffc9

update
author riono <e165729@ie.u-ryukyu.ac.jp>
date Tue, 20 Apr 2021 18:42:17 +0900
parents 6399d784c6d1
children 1236da135f79
comparison
equal deleted inserted replaced
32:3a7a71ee8738 33:7575980bffc9
1 using System;
1 using Christie_net.annotation; 2 using Christie_net.annotation;
2 using Christie_net.codegear; 3 using Christie_net.codegear;
3 4
4 namespace Christie_net.Test.Example.FizzBuzz { 5 namespace Christie_net.Test.Example.FizzBuzz {
5 public class Counter: CodeGear { 6 public class Counter: CodeGear {
6 [Take] private int num; 7 [Take] private int num;
7 8
8 public override void Run(CodeGearManager cgm) { 9 public override void Run(CodeGearManager cgm) {
9 if (num <= 100) { 10 if (num <= 100) {
11 Console.WriteLine("call");
10 GetDgm("FizzBuzz").Put("num", num); 12 GetDgm("FizzBuzz").Put("num", num);
11 cgm.GetLocalDGM().Put("num", num+1); 13 cgm.GetLocalDGM().Put("num", num+1);
12 cgm.Setup(new Counter()); 14 cgm.Setup(new Counter());
13 } else { 15 } else {
14 GetDgm("FizzBuzz").Put("num", -1); 16 GetDgm("FizzBuzz").Put("num", -1);