This site requires JavaScript, please enable it in your browser!
Greenfoot back
inkpenKingpin
inkpenKingpin wrote ...

2014/11/29

One step forward, two steps back algorithm

1
2
inkpenKingpin inkpenKingpin

2014/11/30

#
Alright, So I set n = 1, and now it moves backwards.
danpost danpost

2014/11/30

#
It goes backwards because the value of 'n' never changes. The only code you have that adjusts its value is in the 'direction' method; but, it is never being called.
inkpenKingpin inkpenKingpin

2014/11/30

#
Do you have the link to the other thread danpost?
danpost danpost

2014/11/30

#
It is called Treasure Hunt.
inkpenKingpin inkpenKingpin

2014/11/30

#
Thanks
You need to login to post a reply.
1
2