I'm Creating a snake and ladder game I found the Image on the Internet for canvas background. for now The movement and everything it's working well,. But when we touch the Ladders we have to go up and after we touch the Snake we go down. here is My blocks for that:
it's running well but I need help to find easier way to do this. Because I will have to click on "DO IT" for the player x and y as I want to detect the x and y of the ladders and snakes.
From what I remember of the game, there is only a small number of places for a player to land on the underlying graph model of the game.
Instead of checking x and y positions, check the graph node names of the current player positions, and keep an edge list for each node for where the next node is and what are the canvas coordinates of that node for sprite movement.