示例#1
0
        private void StartGame()
        {
            removeOld();

            milis = DateTimeOffset.Now.ToUnixTimeMilliseconds();
            id++;
            bombs  = new GridElement[15];
            player = new GridElement(0, 0, r.Next(0, 10), 1);

            // Setting location of the bombs
            for (var i = 0; i < bombs.Length; i++)
            {
                bombs[i] = new GridElement(i + 1, r.Next(1, 10), r.Next(0, 10), 0);
            }

            drawBombs();
            player.draw(MainGrid);  // Draws the player car
        }
示例#2
0
 public bool checkCollision(GridElement e)
 {
     return(this.column == e.column && this.row == e.row);
 }