so I have an array
and have defined Entity
and also said enemy
can you help me to move these 2 lines of enemies over to the right 10 down 10 then over to the left 10 and then down 10 in that chronological order
Please I need help SOS
Ok, we've got some code there. But that is just x's and y's. I presume that they relate to location somehow.
But what does "c" refer to?
Can you explain what this code is meant to do using PseudoCode - i.e english?
Something along the lines of:
if (the enemy just moved to the right) then (move the enemy down)
if(boolean is set to true)
then move to the right this many times
then move down
then move left
then move down and loop
x is referring to entity class which defines entity x position and same with the y
Alaric Mustoe wrote:so
if(boolean is set to true)...
No, you're still trying to program it.
Describe the problem to us; don't tell us how you want to solve it - because that clearly isn't working.
Something along the lines that you did earlier: "Can you help me to move these 2 lines of enemies over to the right 10 down 10 then over to the left 10 and then down 10".
But we need to know ALL the rules before we can help you much.
If you already have a formal explanation of the game written out, show it to us - and if not, I suggest you start on it before you write one more line of code.
Also, a few questions:
1. If your battlefield is restricted, what do you want to happen if the rightmost enemy in the line can't move right 10?
2. You also appear to have some obstacles. How to they affect your line movement?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
When you move to the right (or left, or up, or down) what back fills the places vacated by the pieces that are moved?
What happens if the location you are about to move to is already occupied?
What happens when you get to the edge of the playing area and can't move?