Click here to Skip to main content
15,887,175 members
Home / Discussions / C#
   

C#

 
GeneralBinding Collection to Datagrid Pin
thematt19-Nov-02 2:41
thematt19-Nov-02 2:41 
GeneralRe: Binding Collection to Datagrid Pin
leppie19-Nov-02 10:59
leppie19-Nov-02 10:59 
GeneralRe: Binding Collection to Datagrid Pin
thematt20-Nov-02 2:19
thematt20-Nov-02 2:19 
Questionhow to display the image formats (. gif) in crystal reports Pin
crodling18-Nov-02 20:24
crodling18-Nov-02 20:24 
Generalwhere to find basic discuss or tutorial about... Pin
zhoujun18-Nov-02 19:15
zhoujun18-Nov-02 19:15 
GeneralRe: where to find basic discuss or tutorial about... Pin
leppie19-Nov-02 0:08
leppie19-Nov-02 0:08 
GeneralRe: where to find basic discuss or tutorial about... Pin
zhoujun19-Nov-02 13:19
zhoujun19-Nov-02 13:19 
GeneralRandom Numbers Pin
Member 1810818-Nov-02 18:37
Member 1810818-Nov-02 18:37 
WTF | :WTF: I am writing a simple graphics game that creates a 20x20 board of different color Squares that have can be the following colors: Blue, Green, or Red now i know how to get a basic random number with in a range

Random rnd = new Random();

rnd.Next(4)

i have this in a switch statement for each indiviual block class when it is created to assign a random color to the block;

now i know the basic call to Random uses the system clock as the seed to create the number but the problem is the 20x20 board takes no time at all to create and draw durring program execution that instead of a nice chaotic 3 color checker board i get a series of stripes that break to the next color. it looks kinda like this

RRRRGGGGGRRRRBBBBGG
RRRRGGGGGRRRRBBBBGG
RRRRGGGGRRRRBBBBBGG
RRRRGGGGRRRRBBBBBGG
RRRRGGGGRRRRBBBBGGG
RRRGGGGGRRRRBBBBGGG
RRRGGGGGRRRRBBBBGGG

ok so you get the idea not much of a challenge for a game!

this is what i want

RGBRBBRGBRGRBBGR
BGRBRRBGGRBBRBRB
GRBBGRBGBGRRBGRB

ok again you get the idea.

now how do i make the random number well more random i guess

any help is greatly appreciated

Ryan
GeneralRe: Random Numbers Pin
David Stone18-Nov-02 19:08
sitebuilderDavid Stone18-Nov-02 19:08 
GeneralRe: Random Numbers Pin
Senkwe Chanda18-Nov-02 20:58
Senkwe Chanda18-Nov-02 20:58 
GeneralRe: Random Numbers Pin
Member 1810818-Nov-02 21:49
Member 1810818-Nov-02 21:49 
GeneralRe: Random Numbers Pin
James T. Johnson19-Nov-02 14:46
James T. Johnson19-Nov-02 14:46 
GeneralRe: Random Numbers Pin
Member 1810819-Nov-02 20:54
Member 1810819-Nov-02 20:54 
GeneralRe: Random Numbers Pin
LongRange.Shooter19-Nov-02 11:03
LongRange.Shooter19-Nov-02 11:03 
Generalmake it dead. Pin
imran_rafique18-Nov-02 15:19
imran_rafique18-Nov-02 15:19 
GeneralRe: make it dead. Pin
Rickard Andersson2018-Nov-02 20:48
Rickard Andersson2018-Nov-02 20:48 
GeneralRe: make it dead. Pin
imran_rafique19-Nov-02 16:24
imran_rafique19-Nov-02 16:24 
GeneralMagic TabPage question Pin
m_mond18-Nov-02 15:16
m_mond18-Nov-02 15:16 
GeneralRe: Magic TabPage question Pin
leppie19-Nov-02 0:04
leppie19-Nov-02 0:04 
GeneralVisible Property Not Working Pin
Jamie Nordmeyer18-Nov-02 7:35
Jamie Nordmeyer18-Nov-02 7:35 
GeneralRe: Visible Property Not Working Pin
David Stone18-Nov-02 8:48
sitebuilderDavid Stone18-Nov-02 8:48 
GeneralRe: Visible Property Not Working Pin
Jamie Nordmeyer18-Nov-02 9:32
Jamie Nordmeyer18-Nov-02 9:32 
GeneralRe: Visible Property Not Working Pin
David Stone18-Nov-02 10:22
sitebuilderDavid Stone18-Nov-02 10:22 
GeneralCOM+ Pin
Mazdak18-Nov-02 5:50
Mazdak18-Nov-02 5:50 
GeneralXML questions ... Pin
LongRange.Shooter18-Nov-02 5:28
LongRange.Shooter18-Nov-02 5:28 

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.