Example #1
0
        public Bitmap Visit(Rangers.SmallShip smallShip, FlyingDirection direction)
        {
            ShipL = ProxyImageFactory.GetProxyImage(@"..\..\Images\smallShipL.png");
            ShipB = ProxyImageFactory.GetProxyImage(@"..\..\Images\smallShipB.png");
            ShipF = ProxyImageFactory.GetProxyImage(@"..\..\Images\smallShipF.png");
            ShipR = ProxyImageFactory.GetProxyImage(@"..\..\Images\smallShipR.png");

            return(DirectionSwitcher(direction));
        }
Example #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);
        }