Exemple #1
0
        public Bitmap Visit(Destroyers.BigShip bigShip, FlyingDirection direction)
        {
            ShipL = ProxyImageFactory.GetProxyImage(@"..\..\Images\bigShipL.png");
            ShipB = ProxyImageFactory.GetProxyImage(@"..\..\Images\bigShipB.png");
            ShipF = ProxyImageFactory.GetProxyImage(@"..\..\Images\bigShipF.png");
            ShipR = ProxyImageFactory.GetProxyImage(@"..\..\Images\bigShipR.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);
        }