Пример #1
0
 public Board(BattleShipUI bsu)
 {
     IsOccupied = new int[10][];
     for (int i = 0; i < IsOccupied.Length; i++)
     {
         IsOccupied[i] = new int[10];
     }
     G = new Grid();
     FillGrid();
     this.Bsu = bsu;
 }
Пример #2
0
        public PlayerShip(int size, PlayingBoard b, UIElement imageToShow, double originalPositionX, double originalPositionY, Canvas canvas, BattleShipUI bsu) : base(b, size)
        {
            this.ImageToShow       = imageToShow;
            this.originalPositionX = originalPositionX;
            this.originalPositionY = originalPositionY;
            this.canvas            = canvas;
            this.bsu = bsu;

            imageToShow.AddHandler(Grid.MouseLeftButtonDownEvent, new MouseButtonEventHandler(Grab));
            imageToShow.AddHandler(Grid.MouseLeftButtonUpEvent, new MouseButtonEventHandler(Drop));
            imageToShow.AddHandler(Grid.MouseRightButtonDownEvent, new MouseButtonEventHandler(Turn));
            imageToShow.AddHandler(Grid.MouseMoveEvent, new MouseEventHandler(Move));
        }
Пример #3
0
 public RadarBoard(BattleShipUI bsu) : base(bsu)
 {
 }
Пример #4
0
 public PlayingBoard(BattleShipUI bsu) : base(bsu)
 {
 }