moving a shape
Hi,
I have a maze and I want to make it possible for a charachter (an image) to run through the maze. Not taking the walls in acount, he may run through walls, i don't mind i'll program that later.
The maze itself is actually a 2D array filled with 1, 0 values. 1 represents a wall, 0 floor. I have the array run through by two for loops to change the 1 values to wallimages and the 0 values to floorimages. Everything from the maze is drawn in my paintComponent(Graphics g) method.
But I think that's not the main point; my main question is how can I make an image and when I press a button or something, the location of the image is changed. I always have to be able to know the current position of the image though.
Greetz Daan

