Page 1 of 1

Jumping

Posted: Mon Nov 09, 2020 1:39 pm
by Ruffsta
ok the object here is pick the selected red peg and JUMP over the other red peg into the selected empty spot and remove the red red peg that was JUMPED over..

jumping can only be up, down, left and right - you cannot jump diagonal.. and you must select a red peg that can jump over another as well as pick an empty spot that the selected red peg can go into..

Image

Re: Jumping

Posted: Sun Dec 06, 2020 3:56 am
by TheLegoShaper
make a variable then assign the variable where the argument wanting the number of pixels of the jump. run a for loop to the variable in the direction x or you want the instance to jump to. That is what I think.

Re: Jumping

Posted: Sun Dec 06, 2020 11:26 am
by Ruffsta
it needs to know what spots are open - (BLACK) and it also needs to know that it must jump over another occupied spot up, down, left and right only - (RED)..

looking for someone to make a working example and i can do the rest..