Exemple #1
0
        public Bitmap Visit(Destroyers.MediumShip mediumShip, FlyingDirection direction)
        {
            ShipL = ProxyImageFactory.GetProxyImage(@"..\..\Images\mediumShipL.png");
            ShipB = ProxyImageFactory.GetProxyImage(@"..\..\Images\mediumShipB.png");
            ShipF = ProxyImageFactory.GetProxyImage(@"..\..\Images\mediumShipF.png");
            ShipR = ProxyImageFactory.GetProxyImage(@"..\..\Images\mediumShipR.png");

            return(DirectionSwitcher(direction));
        }
Exemple #2
0
        public Bitmap GetShipByType(int maxSpeed, FlyingDirection direction)
        {
            switch (maxSpeed)
            {
            case 50:
                IShipType smallShipType = new Visitor.Rangers.SmallShip();
                return(smallShipType.Display(new ShipTypeDisplayVisitor(), direction));

            case 30:
                IShipType mediumShipType = new Visitor.Destroyers.MediumShip();
                return(mediumShipType.Display(new ShipTypeDisplayVisitor(), direction));

            case 20:
                IShipType bigShipType = new Visitor.Destroyers.BigShip();
                return(bigShipType.Display(new ShipTypeDisplayVisitor(), direction));
            }
            return(null);
        }