Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members

Debris.cs

Go to the documentation of this file.
00001 /*
00002 SimImmuno version 1.0
00003 Copyright (C) 2005 sebeuh.ajsinfo.net
00004 
00005 SimImmuno est libre, vous pouvez le redistribuer et/ou le modifier
00006 selon les termes de la Licence Publique Générale GNU publiée par la
00007 Free Software Foundation (version 2).
00008 
00009 SimImmuno est distribué car potentiellement utile, mais SANS AUCUNE GARANTIE,
00010 ni explicite ni implicite, y compris les garanties de commercialisation
00011 ou d'adaptation dans un but spécifique. Reportez-vous à la
00012 Licence Publique Générale GNU pour plus de détails.
00013 
00014 Texte de la license officielle (anglais) :
00015 http://simimmuno.ajsinfo.net/text.aspx?code=no&txt_file=GPL.txt
00016 Traduction francaise (non-officielle) :
00017 http://simimmuno.ajsinfo.net/text.aspx?code=no&txt_file=GPL-fr.txt
00018 */
00019 using System;
00020 
00021 namespace SimImmuno
00022 {
00023         [Serializable]
00024         public class Debris : Cellule
00025         {
00026                 public Debris(int x, int y) : base(x,y)
00027                 {
00028                         Life = 1000;
00029                 }
00030 
00031                 public Debris(int x, int y, int life) : base(x,y)
00032                 {
00033                         Life = life;
00034                 }
00035 
00036                 new public void Action()
00037                 {
00038                         Mouvement();
00039                         return;
00040                 }
00041 
00042                 private void Mouvement()
00043                 {
00044                         int tmp = rnd.Next(2);
00045                         int x,y;
00046                         if(tmp == 0)
00047                         {
00048                                 x = this.Location.X + rnd.Next(-5,5);
00049                                 y = this.Location.Y + rnd.Next(-5,5);
00050                         }
00051                         else
00052                         {
00053                                 x = this.Location.X - rnd.Next(-5,5);
00054                                 y = this.Location.Y - rnd.Next(-5,5);
00055                         }
00056                         this.Location.X = x;
00057                         this.Location.Y = y;
00058                 }
00059         }
00060 }

Generated on Sat Jun 4 15:03:41 2005 for SimImmuno by  doxygen 1.4.2