예제 #1
0
 public ActionResult ShowGame()
 {
     FieldModel model = new FieldModel();
     if (model.EnemyFrog == null)
     {
         model.Init();
     }
     return View(model);
 }
예제 #2
0
 public ActionResult ShowGameMove(FieldModel model)
 {
     ModelState.Clear();
     model.Radius--;
     if (model.Bullets == null)
     {
         model.Bullets = new List<Bullet>();
     }
     int oldBullets = model.BulletsCount;
     model.CalculateMyFrogMove();
     model.CalculateEnemyFrogMove();
     model.ShootMyFrog();
     model.ShootEnemyFrog();
     model.PlayMyMove();
     model.PlayEnemyMove();
     model.MoveAllBullets(oldBullets);
     model.CollisionDetector();
     if (model.EnemyFrog.IsAlive == false || model.EnemyFrog.IsAlive == false)
     {
         return View("Final", model);
     }
     return View("ShowGame",model);
 }
예제 #3
0
 public ActionResult Final(FieldModel model)
 {
     return View(model);
 }