Exemplo n.º 1
0
        public BattleShipUI()
        {
            InitializeComponent();
            pb = new PlayingBoard(this);
            pb.Load();
            rb = new RadarBoard(this);
            rb.Load();
            p  = new HumanPlayer(rb);
            dp = new NotSmartPlayer(pb);

            Grid[] tempShips = { ShipSize30, ShipSize31, ShipSize2, ShipSize4, ShipSize5 };
            for (int i = 0; i < tempShips.Length; i++)
            {
                originalShipPositionX[i] = Canvas.GetLeft(tempShips[i]);
                originalShipPositionY[i] = Canvas.GetTop(tempShips[i]);
                allShips[i] = new PlayerShip(tempShips[i].RowDefinitions.Count, pb, tempShips[i], originalShipPositionX[i], originalShipPositionY[i], LayoutRoot, this);
            }
        }
Exemplo n.º 2
0
 public HumanPlayer(RadarBoard rb) : base(rb)
 {
 }