#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    8
    Rep Power
    0

    Positioning of walls


    Hello,
    I am contacting you because I need help.
    Then I is an image in this image I made a script that randomly put walls on the image, the problem is that I want the walls arise randomly in a part of the image and not over the entire image.
    So how to say the walls of this position only in this part of the image.
    Here is the picture:
    http://img812.imageshack.us/img812/3801/fondarene.jpg
    So infact it should not go on the walls yellow.

    Thank you in advance.
  2. #2
  3. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,713
    Rep Power
    348
    Can you post the code you are having problems with?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    8
    Rep Power
    0
    Infact I do not code for AC because I do not know how to do I just code for walls:
    public class extends Object implements Global Wall {
    public Wall () {
    super.posX = (int) Math.round (Math.random () * L_ARENE - L_MUR);
    super.posY = (int) Math.round (Math.random () * H_ARENE - H_MUR);
    super.label = new Label (-1, new JLabel ());
    super.label.getJLabel (). setHorizontalAlignment (SwingConstants.CENTER);
    super.label.getJLabel (). setVerticalAlignment (SwingConstants.CENTER);
    super.label.getJLabel (). setBounds (super.posX, super.posY, L_MUR, H_MUR);
    super.label.getJLabel (). setIcon (new ImageIcon (MUR));

    }

    }

    I would like to integrate a code here to tell him or should not go.
  6. #4
  7. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,713
    Rep Power
    348
    Can you make a small complete program that compiles, executes and shows the problem?
    There are too many undefined objects in the posted code to be able to test it.

    Also please wrap your code in code tags to preserve the formatting.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    8
    Rep Power
    0
    It may be complicated there is one code may not counting all the images.
    But the code is that I go there is a place just randomly walls 20 on the picture I show you.
    Me and those I want to do is tell the wall do not go in the yellow.
  10. #6
  11. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,713
    Rep Power
    348
    I can not help you without code that compiles, executes and shows the problem.

    Make a small complete program to show the problem:http://sscce.org/

IMN logo majestic logo threadwatch logo seochat tools logo