|
-
June 13th, 2009, 08:44 AM
#1
another assignment going crazy...
hi,
the point of this assignment is to make 2 classes, on to check for a "high street" and a "low street" there are 5 dices, the high street is 23456 the low street is 12345. i cannot use an array in one of the two classes. in the other i can use one so i use a sorted array. but i am really stuck and i am getting a **** headache. can anyone give me atleast a hint or tip get me in the right direction or just tell me how todo it so i can finish this stupid assignment and work on my own C++ projects. thanks.
Code:
using System;
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace w1
{
public partial class Form1 : Form
{
class Dobbel
{
public uint[] stenen = new uint[5];
public Dobbel()
{
Thread.Sleep(1000);
Random s = new Random();
for(int i = 0; i < 5; ++i)
{
Thread.Sleep(1000);
stenen[i] = (uint)s.Next(1, 6);
}
}
};
class GroteStraat
{
public bool b;
GroteStraat(Dobbel d)
{
ArrayList s = (ArrayList)d.stenen;
s.Sort();
foreach (uint i in s)
{
}
}
};
public Form1()
{
InitializeComponent();
}
private void btnDobbel_Click(object sender, EventArgs e)
{
Dobbel d1 = new Dobbel();
picD1.Image = Properties.Resources.Dobbel(d1.stenen[0]);
picD2.Image = Properties.Resources.Dobbel(d1.stenen[1]);
picD3.Image = Properties.Resources.Dobbel(d1.stenen[2]);
picD4.Image = Properties.Resources.Dobbel(d1.stenen[3]);
picD5.Image = Properties.Resources.Dobbel(d1.stenen[4]);
Dobbel d2 = new Dobbel();
picD6.Image = Properties.Resources.Dobbel(d2.stenen[0]);
picD7.Image = Properties.Resources.Dobbel(d2.stenen[1]);
picD8.Image = Properties.Resources.Dobbel(d2.stenen[2]);
picD9.Image = Properties.Resources.Dobbel(d2.stenen[3]);
picD10.Image = Properties.Resources.Dobbel(d2.stenen[4]);
}
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|