public void polymorphMove() { Crate crate = new Crate(currentField); Truck truck = new Truck(currentField); Wall wall = new Wall(); wall.Move(Direction.Right); crate.Move(Direction.Right); truck.Move(Direction.Right); }
public void MoveTruck(ConsoleKey ck) { if (ck == ConsoleKey.RightArrow || ck == ConsoleKey.LeftArrow || ck == ConsoleKey.DownArrow || ck == ConsoleKey.UpArrow) { Truck.Move(ck); if (Employee != null) { Employee.Move(ck); } } }