[Tfug] random squares

Ben Slote bslote at gmail.com
Sun Oct 21 12:44:25 MST 2007


Hmm,

You're in the same class with me?

I'm just generating a random list of N coordinates, checking for dupes and
coming up with more pairs if necessary.

On 10/21/07, christopher floess <skeptikos at gmail.com> wrote:
>
> Hi, everyone. I have to write a program in java that
> involves a 2d array as a game board. Given a number
> in the constructor, I have to assign that many squares
> to be 'mines'. I know I could use math.random(), but
> would anyone recommend a better way to do this?
>
> ~ Chris
>
>
> --
> Q: What did the zen buddhist say to the hotdog vendor?
>
> A: Make me one with everything ~ Dr. Jonathan Katz
>
> _______________________________________________
> Tucson Free Unix Group - tfug at tfug.org
> Subscription Options:
> http://www.tfug.org/mailman/listinfo/tfug_tfug.org
>



More information about the tfug mailing list