Exemple #1
0
            public void CreatingAi(int Ans)
            {
                string a = " ", m = " ";
                int    b = 0;

                this.Ans = Ans;
                for (int i = 0; i < Feeling.Count(); i++)
                {
                    W.Add(0);
                }
                TextReader tw = new StreamReader(Book[Ans]);

                for (int i = 0; i < 5; i++)
                {
                    a = tw.ReadLine();
                    if (a != null)
                    {
                        for (int j = 0; j < a.Length - 1; j++)
                        {
                            if (a[j] != ' ')
                            {
                                m += a[j];
                            }
                            else
                            {
                                W[b] = Convert.ToInt32(m);
                                b++;
                                m = " ";
                            }
                        }
                    }
                }
                tw.Close();
            }
Exemple #2
0
 public void Check(Chislo[,] Net)
 {
     Res = 0;
     for (int i = 0; i < Feeling.Count(); i++)
     {
         Feeling[i].Signalisation(Net);
         if (Feeling[i].Signal == true)
         {
             Res += W[i];
         }
     }
 }