Exemplo n.º 1
0
        public Grid(Graphics g, NewGame newGame, Font font, Font titleFont)
        {
            this.isOver = false;
            this.matrix = new Shape[5, 5];
            Random r = new Random();
            this.newGame = newGame;
            this.font = font;
            this.titleFont = titleFont;

            for (int i = 0; i < 5; ++i)
            {
                for (int j = 0; j < 5; j++)
                {

                    matrix[i, j] = new Shape(0);
                }
            }

            this.matrix[r.Next(5), r.Next(5)] = new Shape(r.Next(4) + 1);
            graphics = g;
            paintMatrix();
        }
Exemplo n.º 2
0
 private void myButton1_Click(object sender, EventArgs e)
 {
     //New Game
     NewGame newGame = new NewGame(fontRankings,fontButtonSelected,TIMER_GAME,1);
     newGame.ShowDialog();
     //MessageBox.Show("New Game");
 }
Exemplo n.º 3
0
        public void newLevel(int level)
        {
            int time = LEVELONE_TIME;
            if (level == 2)
            {
                time = 100;

            }
            if (level == 3)
                time = 60;

            NewGame newgameLevel = new NewGame(this.newGame.gr.font, this.newGame.gr.titleFont, time, level);

            newgameLevel.ShowDialog();
            this.newGame.Close(); //stavi hide ..check /******************/
        }