Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. public void target(int rings)
  2. {
  3. for(int i = 0; i < rings; i++)
  4. {
  5. if(i%2 == 0)
  6. {
  7. plane.setForegroundColor(Color.RED);
  8. }
  9. else
  10. {
  11. plane.setForegroundColor(Color.WHITE);
  12. }
  13. int diameter = (int)(WIDTH*.9*(rings-i)/rings);
  14. plane.fillCircle(WIDTH/2-diameter/2,HEIGHT/2-diameter/2, diameter);
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement