Ejemplo n.º 1
0
        public ScoreBoard(Game5 p)
        {
            InitializeComponent();
            parent = p;
            int t_scores = parent.t_counter > DEFINE.MAX_TIME ? 0 : (DEFINE.MAX_TIME - parent.t_counter) * DEFINE.TIME_SCALE;
            int s_scores = parent.s_counter > DEFINE.MAX_STEP ? 0 : (DEFINE.MAX_STEP - parent.s_counter) * DEFINE.STEP_SCALES;

            this.r_Time.Text   = Convert.ToString(parent.t_counter);
            this.r_Step.Text   = Convert.ToString(parent.s_counter);
            this.r_Scores.Text = Convert.ToString((t_scores + s_scores));
            this.Show();
        }
Ejemplo n.º 2
0
        private void b_game5_Click(object sender, EventArgs e)
        {
            sound_enter.Play();
            if (r_CardType.SelectedItem == null)
            {
                message.Text = "Please select a card style";
                return;
            }
            else if (!(r_Easy.Checked || r_Medium.Checked || r_Hard.Checked || r_Custom.Checked))
            {
                message.Text = "Please select a level";
                return;
            }
            else
            {
                // set card source
                for (int n = 0; n < r_CardType.Items.Count; n++)
                {
                    if (this.r_CardType.SelectedItem.Equals(this.r_CardType.Items[n]))
                    {
                        if (n < 10)
                        {
                            Game5.C_FOLDER = "T0" + n.ToString();
                        }
                        else
                        {
                            Game5.C_FOLDER = "T" + n.ToString();
                        }
                    }
                }

                // set plane size
                int row, col;
                if (r_Easy.Checked)
                {
                    row = 2;
                    col = 2;
                }
                else if (r_Medium.Checked)
                {
                    row = 3;
                    col = 6;
                }
                else if (r_Hard.Checked)
                {
                    row = 4;
                    col = 8;
                }
                else
                {
                    row = (int)r_Row.Value;
                    col = (int)r_Col.Value;
                }
                DEFINE.COL_SIZE = col;
                DEFINE.ROW_SIZE = row;
            }
            Game5 t = new Game5(this);

            // set delay
            t.autoFlipBack = r_AutoFlip.Checked;
            t.correctDelay = r_CorrectDelay.Checked;
            wmp.close();
        }