I've been given an assignment the hand in on Wednesday and it is to create a Ludo game. I have the jist of everything working but I cannot figure out how to make the player pawns take a set path. so obviously the board is in a + looking shape and the pawns move around the board. Is there anyway I can set it so that they all follow that path.
My idea would be to have a int[][] pos of each "tile" and depending on which player you are, it starts at a different position in the list. So e.g:
pos[0][5]
pos[5][10]<First tile a red pawn should start
pos[10][15]
pos[15][20]<First tile a blue pawn should start
pos[20][25]
and then loop through this list of positions until the win condition is satisfied.
This is my idea but I was hoping there maybe another way
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…