19506jk / Nirvana

Written from Louis & Danny's code
Apache License 2.0
2 stars 1 forks source link

Player cannot move properly, keeps on hitting the wall #5

Closed 19506jk closed 10 years ago

rainybreeze777 commented 10 years ago

Bug fixed Cause: In Interaction.java, function setDirection, the conditionals are attempting to compare strings by using the operator ==, which will always fail because of differing literals, instead of the given function string.equals(string); as a result, the tc and tr values always hold the value 0, which is reprensented as a VERTIW at (0,0), thus the error message "keep walking into the wall".

Solution: Replaced all == comparisons with equals().