Esempio n. 1
0
 /// <summary>
 /// Authors
 /// Sebastian Horton
 /// resets the fuse, updates the matrix and redraws the map.
 /// </summary>
 public bool resetBomb()
 {
     bombFuse = 2;
     Matrices.bomb[(int)bombPos.X, (int)bombPos.Y] = 0;
     Matrices.updateBlocks();
     Matrices.updateWalkable();
     Map.colourMap();
     bombTimer.Stop();
     bombPlaced = false;
     return(true);
 }
Esempio n. 2
0
        /// <summary>
        /// Authors
        /// Sebastian Horton, Elliot McArthur
        ///constructs the map in the mainwindow.
        ///Also meshes the "pillars" and "blocks" matrices and sets the walkable space at the start of the game.
        /// </summary>
        public Map(Canvas c)
        {
            Matrices.updateBlocks();
            Matrices.updateWalkable();

            for (int x = 0; x < 9; x++)
            {
                for (int y = 0; y < 15; y++)
                {
                    Matrices.map[y, x]        = new Rectangle();
                    Matrices.map[y, x].Height = 64;
                    Matrices.map[y, x].Width  = 64;



                    Canvas.SetTop(Matrices.map[y, x], 64 * x);
                    Canvas.SetLeft(Matrices.map[y, x], 64 * y);
                    c.Children.Add(Matrices.map[y, x]);
                }
            }
            colourMap();
        }