
It looks like you're new here. If you want to get involved, click one of these buttons!
I tried this game using a programming language
Am I going correct?
public class SnakeAndLadderGame {
// Let us play the game in 10 x 10 board
static final int N = 10;
// An entry in table 'table' is -1 to indicate
// there is no snake or ladder at that cell
static int[][] table = new int[N][N];
// This function returns minimum number of dice
// throws required to Reach last cell from 0'th cell
static int getMinDiceThrows(int moves[], int n)
{
for (int i=0; i<N; i++)
for (int j=0; j<N; j++)
table[i][j] = -1;
// The first entry is always 0
table[0][0] = 0;
// Fill the table entries in bottom up manner
for (int i=0; i<N; i++)
{
for (int j=0; j<N; j++)