The Artima Developer Community
Sponsored Link

Java Answers Forum
Simple question

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Chris Staplehurst

Posts: 2
Nickname: allymceff
Registered: Feb, 2003

Simple question Posted: Feb 18, 2003 3:53 PM
Reply to this message Reply
Advertisement
I am making two blobs on the screen, however i want the option of having 2 x axis in where they both start.The values are 30 and 470 , the y axis im ok with.

int xleftright = Math.abs(generator.nextInt()) % 2 + 1 ;

that will make the int either be one or two, i want to make another int(x_pos) to be able to be random in which value it chooses, compredae? either 30 or 470 values, i have tried the if else statement to try to attach it to the int be to no avail, any help would be great.

~Chris

Topic: truncating Previous Topic   Next Topic Topic: newbie Servlet Help

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use