[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)); }
public Drill(int PowerAmount, GameControl GC, string Name) : base(PowerAmount, GC, Name) { _wear = 0; }
public SolarPanel(GameControl GC, string Name) : base(1, GC, Name) { }
public Motor(GameControl GC, string Name) : base(1, GC, Name) { }
public Device(int PowerAmount, GameControl GC, string Name) { PGC = GC; PpowerAmount = PowerAmount; _name = Name; }
public Radar(GameControl GC, RadarType RT, string Name) : base(4, GC, Name) { _myType = RT; }
public static void Main() { GameControl TheGame = new GameControl(); TheGame.GameLoop(); }