All pastes #352266 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-02-12 18:39 UTC
rendered paste body
public partial class Form1 : Form
    {
        double chance = 0d;
        private double[,] shotChance = 
            {
                {-1, .8, .6, .4, .1, .01},
                {.8, -1, .8, .6, .4, .02},
                {.8, .8, -1, .8, .6, .03},
                {.8, .8, .8, -1, .8, .04},
                {.8, .8, .8, .8, -1, .2},
            };//end array

        public Form1()
        {
            InitializeComponent();
           
            lstKicker.SelectedIndex = 0;
            lstTarget.SelectedIndex = 0;

            
        }

        public void changeStatus(object sender, System.EventArgs e)
        {

            int kicker = 0;
            int target = 0;

            kicker = lstKicker.SelectedIndex;
            target = lstTarget.SelectedIndex + 1;
     
           // MessageBox.Show(target.ToString());
           
            chance = shotChance[kicker, target];

            lblChance.Text = chance.ToString();

        }//end changeStatus event
    }