Exemple #1
0
 public void Laadstation(int posX, int posY, Energie en)
 {
     if (bposX == posX && bposY == posY)
     {
         en.opladen();
     }
 }
Exemple #2
0
 public InSight()
 {
     F = new Energie();
 }
Exemple #3
0
        public static void Main(string[] args)
        {
            Console.BackgroundColor = ConsoleColor.DarkRed; // mars :-)
            Console.Clear();
            Console.CursorVisible = false; // cursor weg
            
            //Barier grens = new Barier();

            Mars mars = new Mars();
            Basisstation station = new Basisstation();
            Energie energie = new Energie();
            InSight rover = new InSight();
            GenerateWater water = new GenerateWater(mars.grootteX, mars.grootteY);
            rover.ToonInSight();
            mars.toonMars();

            //grens.test(rover);
            station.toonBasis();
            water.Plaats();


            while (true)
            {
                if (Console.KeyAvailable)
                {
                    var command = Console.ReadKey().Key;

                    switch (command)
                    {
                        case ConsoleKey.DownArrow: //naar benedenbewegen
                            rover.moveDown();
                            break;
                        case ConsoleKey.UpArrow:
                            rover.moveUp();
                            break;
                        case ConsoleKey.LeftArrow:
                            rover.moveLeft();
                            break;
                        case ConsoleKey.RightArrow:
                            rover.moveRight();
                            break;
                        case ConsoleKey.T:
                            water.WaterZien();
                            break;
                        case ConsoleKey.Y:
                            water.WaterNietZien();
                            break;
                        case ConsoleKey.Enter:
                            rover.boor();
                            break;
                        case energie.afgaanOverrots
                    }
                    Console.Clear();
                    rover.ToonInSight();
                    mars.toonMars();

                    mars.RotsenTonen();


                    station.toonBasis();

                }
            }
        }