Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void init(void)
- {
- int init_value = (d * d) - 1;
- int empty_tile = 0;
- for (int i = 0; i < d; i++)
- {
- for (int j = 0; j < d; j++)
- {
- init_value--;
- board[i][j] = init_value;
- }
- }
- board[d - 1][d - 1] = empty_tile;
- if (d % 2 == 0)
- {
- board[d - 2][d - 2] = 2;
- board[d - 3][d - 3] = 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment