Click here to Skip to main content
15,904,346 members
Home / Discussions / C#
   

C#

 
GeneralRe: how create quick spark game.. Pin
harish chander baswapuram3-Nov-09 2:34
harish chander baswapuram3-Nov-09 2:34 
i have started it off with..making cards with paint..no matter what the card is ...but the focus is on number ...just chk dis out ...i have used random class which generates sequence of numbers on its cards..the user has to click on his deck of his cards ...he has to click on a card if its greater and click on a card whose number is lower than the other card...i am placing the code which i got..
public void Flip()
{
    int j;
    Random r;
    int temp;
    int[] arr = new int[7];
    r = new Random();
    for (j = 0; j < 6; j++)
    {
        int found = 0;
        while (true)
        {
            temp = r.Next(1,7);
            //MessageBox.Show(temp.ToString());
            found = 0;
            for (int i = 0; i <= j; i++)
            {
                // MessageBox.Show("entered " + i.ToString());
                if (temp == arr[i])
                {
                    found = 1;
                }
            }
            if (found == 0)
            {
                arr[j] = temp;
                //MessageBox.Show("Generated new random number as " + temp.ToString());
                break;
            }
        }

            pictureBox1.Image = imageList1.Images[arr[0]];
            pictureBox2.Image = imageList1.Images[arr[1]];
           // pictureBox3.Image = imageList1.Images[arr[2]];
           // pictureBox4.Image = imageList1.Images[arr[3]];

    }
    //MessageBox.Show("The generated random numbers are as follows");
    for (j = 0; j < 7; j++)
    {
        this.Text += arr[j].ToString();
    }

}

GeneralRe: how create quick spark game.. Pin
harish chander baswapuram3-Nov-09 2:35
harish chander baswapuram3-Nov-09 2:35 
GeneralRe: how create quick spark game.. Pin
harish chander baswapuram3-Nov-09 3:37
harish chander baswapuram3-Nov-09 3:37 
GeneralRe: how create quick spark game.. Pin
harish chander baswapuram3-Nov-09 17:43
harish chander baswapuram3-Nov-09 17:43 
GeneralRe: how create quick spark game.. [modified] Pin
khoalo5-Jun-10 7:24
khoalo5-Jun-10 7:24 
Questiontransform vt100 string to ordinary human readable string Pin
deostroll30-Oct-09 1:03
deostroll30-Oct-09 1:03 
AnswerRe: transform vt100 string to ordinary human readable string Pin
Henry Minute30-Oct-09 2:02
Henry Minute30-Oct-09 2:02 
AnswerRe: transform vt100 string to ordinary human readable string Pin
OriginalGriff30-Oct-09 2:58
mveOriginalGriff30-Oct-09 2:58 
AnswerRe: transform vt100 string to ordinary human readable string Pin
PIEBALDconsult30-Oct-09 6:05
mvePIEBALDconsult30-Oct-09 6:05 
Questionhow can I retrieve the start menu folder and desktop folder in windows vista using c#? Pin
deftsoft30-Oct-09 0:40
deftsoft30-Oct-09 0:40 
AnswerRe: how can I retrieve the start menu folder and desktop folder in windows vista using c#? Pin
Covean30-Oct-09 0:50
Covean30-Oct-09 0:50 
GeneralRe: how can I retrieve the start menu folder and desktop folder in windows vista using c#? Pin
deftsoft30-Oct-09 0:58
deftsoft30-Oct-09 0:58 
GeneralRe: how can I retrieve the start menu folder and desktop folder in windows vista using c#? Pin
Covean30-Oct-09 1:06
Covean30-Oct-09 1:06 
GeneralRe: how can I retrieve the start menu folder and desktop folder in windows vista using c#? [modified] Pin
deftsoft30-Oct-09 1:08
deftsoft30-Oct-09 1:08 
GeneralRe: how can I retrieve the start menu folder and desktop folder in windows vista using c#? Pin
Covean30-Oct-09 1:47
Covean30-Oct-09 1:47 
GeneralRe: how can I retrieve the start menu folder and desktop folder in windows vista using c#? Pin
deftsoft30-Oct-09 2:19
deftsoft30-Oct-09 2:19 
GeneralRe: how can I retrieve the start menu folder and desktop folder in windows vista using c#? Pin
dan!sh 30-Oct-09 2:28
professional dan!sh 30-Oct-09 2:28 
GeneralRe: how can I retrieve the start menu folder and desktop folder in windows vista using c#? Pin
deftsoft30-Oct-09 2:42
deftsoft30-Oct-09 2:42 
GeneralRe: how can I retrieve the start menu folder and desktop folder in windows vista using c#? Pin
Covean30-Oct-09 2:33
Covean30-Oct-09 2:33 
GeneralRe: how can I retrieve the start menu folder and desktop folder in windows vista using c#? Pin
deftsoft30-Oct-09 2:43
deftsoft30-Oct-09 2:43 
GeneralRe: how can I retrieve the start menu folder and desktop folder in windows vista using c#? Pin
Covean30-Oct-09 3:10
Covean30-Oct-09 3:10 
GeneralRe: how can I retrieve the start menu folder and desktop folder in windows vista using c#? Pin
Dave Kreskowiak30-Oct-09 3:58
mveDave Kreskowiak30-Oct-09 3:58 
QuestionHow to change the button color on its click and then restore it when you click on other button? Pin
Swapnil 200929-Oct-09 23:16
Swapnil 200929-Oct-09 23:16 
AnswerRe: How to change the button color on its click and then restore it when you click on other button? Pin
SeMartens29-Oct-09 23:42
SeMartens29-Oct-09 23:42 
GeneralRe: How to change the button color on its click and then restore it when you click on other button? Pin
Swapnil 200929-Oct-09 23:57
Swapnil 200929-Oct-09 23:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.