|
-
Dec 4th, 2012, 12:32 PM
#1
Thread Starter
Addicted Member
Generating numbers
Hello is there some algorithm which can generate random numbers in int[,](two dimentional array).
Let's say I have these numbers :

lets say that the blue circle is the current position in the array where the loop have to enter a number,but first I have to check all four directions(current =>down,up,left,right) and if the random number don't exist in these four directions then to enter it in.
My problem is that I don't know how to check all the drections without throwing a error and I don't want to use try & catch.
Thx in advance.
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
|