示例#1
0
        [Test()]         //Tests the rover, can be moved
        public void Motor()
        {
            Battery     B  = new MyGame.Battery(6);
            GameControl GC = new MyGame.GameControl();
            Rover       R  = GC.CreateEquipedRover(3f, 3f);

            R._motor.ConnectBattery(R.SelectBattery());
            R._motor.Move(Direction.Up);
            Assert.Equals(R.Location, GameMain.newPoint2D(3f, 2f));
            R._motor.Move(Direction.Down);
            Assert.Equals(R.Location, GameMain.newPoint2D(3f, 3f));
            R._motor.Move(Direction.Left);
            Assert.Equals(R.Location, GameMain.newPoint2D(2f, 3f));
            R._motor.Move(Direction.Right);
            Assert.Equals(R.Location, GameMain.newPoint2D(3f, 3f));
        }
示例#2
0
 public Drill(int PowerAmount, GameControl GC, string Name) : base(PowerAmount, GC, Name)
 {
     _wear = 0;
 }
示例#3
0
 public SolarPanel(GameControl GC, string Name) : base(1, GC, Name)
 {
 }
示例#4
0
 public Motor(GameControl GC, string Name) : base(1, GC, Name)
 {
 }
 public Device(int PowerAmount, GameControl GC, string Name)
 {
     PGC          = GC;
     PpowerAmount = PowerAmount;
     _name        = Name;
 }
示例#6
0
 public Radar(GameControl GC, RadarType RT, string Name) : base(4, GC, Name)
 {
     _myType = RT;
 }
        public static void Main()
        {
            GameControl TheGame = new GameControl();

            TheGame.GameLoop();
        }