view Test/Example/FizzBuzz/Counter.cs @ 46:41aae40a611c

bug fix
author riono <e165729@ie.u-ryukyu.ac.jp>
date Fri, 07 Jan 2022 19:38:49 +0900
parents 98ee1ee1efb7
children 61ec3dd0995c
line wrap: on
line source

using System;
using System.Threading;
using Christie_net.annotation;
using Christie_net.codegear;

namespace Christie_net.Test.Example.FizzBuzz {
public class Counter: CodeGear {
    [Take] private int cunt;
    
    public override void Run(CodeGearManager cgm) {
        if (cunt <= 100) {
            Console.WriteLine("cunt;" + cunt);
            GetDgm("FizzBuzz").Put("num", cunt);
            cgm.GetLocalDGM().Put("cunt", cunt+1);
            cgm.Setup(new Counter());
        } else {
            GetDgm("FizzBuzz").Put("num", -1);
            cgm.GetLocalDGM().Finish();
        }
    }
}
}