This discussion is archived
2 Replies Latest reply: Apr 8, 2013 12:07 AM by gimbal2 RSS

Misc. questions about java and "cleaner" ways to do stuff

1001534 Newbie
Currently Being Moderated
Heya. I started coding java not long ago and now I feel ready for try make a little game :)
I'm aiming for making a bingo game!

So what I was thinking is:
Is there a way to make a parell process? Like Those two scripts runs on same time?
And what would the best way to do something like storing the numbers that is said and which one isn't
like if you could do: Var NUMBERS = (1,2,3,4,5,6,7,8...etc) and then take a random number from this variable

I am new and I wondered how you could do these :)
  • 1. Re: Misc. questions about java and "cleaner" ways to do stuff
    TPD-Opitz-Consulting-com Expert
    Currently Being Moderated
    998531 wrote:
    I'm aiming for making a bingo game!

    So what I was thinking is:
    Is there a way to make a parell process? Like Those two scripts runs on same time?
    Sure. http://download.oracle.com/javase/tutorial/essential/concurrency/
    But I don't see how this would help here.
    And what would the best way to do something like storing the numbers that is said and which one isn't
    like if you could do: Var NUMBERS = (1,2,3,4,5,6,7,8...etc) and then take a random number from this variable
    I'd do it the sam wa it is in real live:
    Have on collection holding all possible numbers (one Object for each). http://download.oracle.com/javase/tutorial/collections/
    Than take on of it randomly an move it to a second collection.

    bye
    TPD
  • 2. Re: Misc. questions about java and "cleaner" ways to do stuff
    gimbal2 Guru
    Currently Being Moderated
    998531 wrote:
    Is there a way to make a parell process? Like Those two scripts runs on same time?
    Scripts? Are you sure you're programming Java and not javascript? Java is a compiled language, not a scripted language.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points