• API
• FAQ
• Tools
• Archive
daily pastebin goal
20%
SHARE
TWEET

# Untitled

a guest Aug 13th, 2017 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. // Put 4 into [2][2]
2. // If number 4 is in quadrant 4 move it to game [2][1]
3. void search4 (int game [3][3])
4. {
5.      if (game [1][0] == 4 || game [2][0] == 4)
6.      {
7.          while (game [2][1] != 4)
9.      }
10.      search4q4 (game);
11. }
12.
13. // Rotate quadrant 3 to put number 4 in game [2][1]
14. void search4q4 (int game [3][3])
15. {
16.      while (game [2][2] != 4)
18. }
19.
20. // Put 7 into [1][2]
21. void search7 (int game [3][3])
22. {
23.      if (game [1][0] == 7 || game [2][0] == 7)
24.      {
25.            while (game [2][1] != 7)
27.      }
28.      // If number 4 is in game [2][1] move it to game [2][1]
29.      if (game[2][1] == 7)
30.      {
31.            change11_21 (game);
32.            change20_21 (game);
33.            change10_20 (game);
34.            change10_11 (game);
35.            change11_12 (game);
36.            change12_22 (game);
37.            change21_22 (game);
38.            change20_21 (game);
39.            change10_20 (game);
40.            change10_11 (game);
41.            change11_21 (game);
42.            change20_21 (game);
43.            change10_20 (game);
44.            change10_11 (game);
45.      }
46.      // Rotate quadrant 3 to move number 4 into game [1][2]
47.      while (game [1][2] != 7)
49. }
50.
51. // Move 4 and 7 into game [1][0] and game [2][0]
52. void move4_7 (int game [3][3])
53. {
54.      change11_21 (game);
55.      change21_22 (game);
56.      change12_22 (game);
57.      change11_12 (game);
58.      change10_11 (game);
59.      change10_20 (game);
60.      change20_21 (game);
61.      change21_22 (game);
62.      change12_22 (game);
63.      change11_12 (game);
64.      change10_11 (game);
65.      change10_20 (game);
66.      change20_21 (game);
67.      change11_21 (game);
68. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top