I have a board game where you have entities on a tiled map and you can only move forward, left, and right. Each tile represents a position of the entity, and based on the entity's angle and position, I need to make a method that processes the move. For example if the entity has decided to move left, my function needs to perform a left movement.
An example:
My ship is currently on the tile where the arrow starts and the entity selected to move left, the arrow represents how the entity should move, with a motion.
So it slowly goes up and then slowly starts to go left and changing its rotation.
My question is, how can I make such a function which will know the entity's position, current angle (rotation), and where it should move to, and then with these parameters, it will process the movement animation motion to the target tile?
I am trying to solve this for a long time now, but no luck. Thank you a lot!