Exemplo n.º 1
0
 /// <summary>
 /// Add points from a PointSource to the player's score
 /// </summary>
 /// <param name="source">Source.</param>
 public void AddPoints(PointSource source)
 {
     if (currentPlayer == 1)
     {
         AddPoints((int)source);
         if (source == PointSource.SMALLDOT)
         {
             p1SmallDotsEaten++;
         }
         if (source == PointSource.POWER_PELLET)
         {
             p1LargeDotsEaten++;
         }
     }
     else
     {
         AddPoints((int)source);
         if (source == PointSource.SMALLDOT)
         {
             p2SmallDotsEaten++;
         }
         if (source == PointSource.POWER_PELLET)
         {
             p2LargeDotsEaten++;
         }
     }
     CheckForExtraLife();
 }
Exemplo n.º 2
0
        public void InitializeTest()
        {
            MainModel target2 = new MainModel();

            target2.LoadCatchments(@"D:\DK_information\TestData\FileStructure\id15_NSTmodel.shp");

            PointSource target = new PointSource();
            DateTime    Start  = new DateTime();
            DateTime    End    = new DateTime();

            target.ShapeFile = new SafeFile()
            {
                FileName = @"D:\DK_information\Overfladevand\Punktkilder\spredt_pkt.shp"
            };
            target.DBFFile = new SafeFile()
            {
                FileName = @"D:\DK_information\Overfladevand\Punktkilder\spredt_data_final.dbf"
            };

            target.Initialize(Start, End, target2.AllCatchments.Values);
        }