-
Notifications
You must be signed in to change notification settings - Fork 0
/
GloabalVariable.c
133 lines (93 loc) · 7.55 KB
/
GloabalVariable.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#pragma once
#include "MacroNHeader.h"
#include "structDeclar.h"
land* land_list[NODE_NUM];
int land_owner[NODE_NUM]; //랜드의 소유권 : 중립지대 -1 유저 0 AI 1
int newtral_land[4]; /*중립지대에 해당하는 랜드의 인덱스. land_assign함수에서 할당함. */
int capital[NODE_NUM]; /*수도 노드와 연결되었는지를 알려주는 배열 */
int capital_of_player[] = { 1, 24 };
int remaining_turns = GAME_TURN_NUM;
land_link* validLand[2];
land_link* stack_pointer = NULL;
int stack[NODE_NUM]; /*수도 노드와 연결되었는지 확인하기 위해 필요한 스택*/
int top = -1;
char map[MAP_ROW][MAP_COL];
char* ptr = (char*)map;
player* User;
player* Ai;
int money = 10000;
int set = 0; // 업그레이드 테크트리가 생성되었는지 확인해주는 변수. 0은 생성이 안된 상황.
card* temp[8];
char USER[] = { 'U', 's', 'e', 'r', 0 };
char AI[] = { 'A', 'I', 0 };
char* PlayerList[] = {USER, AI};
char ATT_POWER[] = {'A', 't', 'a', 't', 'c', 'k', ' ', 'p', 'o', 'w', 'e', 'r', 0};
char DEF_POWER[] = { 'D','E','F', ' ', 'p', 'o', 'w', 'e', 'r', 0};
char CARD_AVAIL[] = {'A','v','a','i','l','a','b','l','e',' ', 'C','a','r','d',' ','U','s','a','g','e',' ', 'N','u','m','b','e','r'};
char* StatsList[] = { ATT_POWER, DEF_POWER, CARD_AVAIL};
int NODE1[] = { 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 115, 125, 225, 235, 335, 345, 445, 455, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565 };
int NODE2[] = { 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 133, 143, 243, 253, 353, 363, 463, 473, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583 };
int NODE3[] = { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 151, 161, 261, 271, 371, 381, 481, 491, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601 };
int NODE4[] = { 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 169, 179, 279, 289, 389, 399, 499, 509, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619 };
int NODE5[] = { 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 187, 197, 297, 307, 407, 417, 517, 527, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637 };
int NODE6[] = { 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 205, 215, 315, 325, 425, 435, 535, 545, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655 };
int NODE7[] = { 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1105, 1115, 1215, 1225, 1325, 1335, 1435, 1445, 1545, 1546, 1547, 1548, 1549, 1550, 1551, 1552, 1553, 1554, 1555 };
int NODE8[] = { 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1123, 1133, 1233, 1243, 1343, 1353, 1453, 1463, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 1570, 1571, 1572, 1573 };
int NODE9[] = { 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1141, 1151, 1251, 1261, 1361, 1371, 1471, 1481, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591 };
int NODE10[] = { 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1159, 1169, 1269, 1279, 1379, 1389, 1489, 1499, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609 };
int NODE11[] = { 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1177, 1187, 1287, 1297, 1397, 1407, 1507, 1517, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627 };
int NODE12[] = { 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1195, 1205, 1305, 1315, 1415, 1425, 1525, 1535, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645 };
int NODE13[] = { 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 2095, 2105, 2205, 2215, 2315, 2325, 2425, 2435, 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542, 2543, 2544, 2545 };
int NODE14[] = { 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2113, 2123, 2223, 2233, 2333, 2343, 2443, 2453, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 2560, 2561, 2562, 2563 };
int NODE15[] = { 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2131, 2141, 2241, 2251, 2351, 2361, 2461, 2471, 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 2580, 2581 };
int NODE16[] = { 2039, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 2149, 2159, 2259, 2269, 2369, 2379, 2479, 2489, 2589, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599 };
int NODE17[] = { 2057, 2058, 2059, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2167, 2177, 2277, 2287, 2387, 2397, 2497, 2507, 2607, 2608, 2609, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617 };
int NODE18[] = { 2075, 2076, 2077, 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2185, 2195, 2295, 2305, 2405, 2415, 2515, 2525, 2625, 2626, 2627, 2628, 2629, 2630, 2631, 2632, 2633, 2634, 2635 };
int NODE19[] = { 2975, 2976, 2977, 2978, 2979, 2980, 2981, 2982, 2983, 2984, 2985, 3085, 3095, 3195, 3205, 3305, 3315, 3415, 3425, 3525, 3526, 3527, 3528, 3529, 3530, 3531, 3532, 3533, 3534, 3535 };
int NODE20[] = { 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3000, 3001, 3002, 3003, 3103, 3113, 3213, 3223, 3323, 3333, 3433, 3443, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 3550, 3551, 3552, 3553 };
int NODE21[] = { 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 3020, 3021, 3121, 3131, 3231, 3241, 3341, 3351, 3451, 3461, 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568, 3569, 3570, 3571 };
int NODE22[] = { 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 3139, 3149, 3249, 3259, 3359, 3369, 3469, 3479, 3579, 3580, 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589 };
int NODE23[] = { 3047, 3048, 3049, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3157, 3167, 3267, 3277, 3377, 3387, 3487, 3497, 3597, 3598, 3599, 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607 };
int NODE24[] = { 3065, 3066, 3067, 3068, 3069, 3070, 3071, 3072, 3073, 3074, 3075, 3175, 3185, 3285, 3295, 3395, 3405, 3505, 3515, 3615, 3616, 3617, 3618, 3619, 3620, 3621, 3622, 3623, 3624, 3625 };
int* NODE[] = { NULL, NODE1 , NODE2 , NODE3 , NODE4 , NODE5 , NODE6 , NODE7 , NODE8 , NODE9 , NODE10, NODE11, NODE12,
NODE13, NODE14, NODE15, NODE16, NODE17, NODE18, NODE19, NODE20, NODE21, NODE22, NODE23, NODE24 };
int EDGE_ROW1[] = { 238, 239, 240 };
int EDGE_ROW2[] = { 256, 257, 258 };
int EDGE_ROW3[] = { 274, 275, 276 };
int EDGE_ROW4[] = { 292, 293, 294 };
int EDGE_ROW5[] = { 310, 311, 312 };
int EDGE_ROW6[] = { 328, 329, 330 };
int EDGE_ROW7[] = { 1228, 1229, 1230 };
int EDGE_ROW8[] = { 1246, 1247, 1248 };
int EDGE_ROW9[] = { 1264, 1265, 1266 };
int EDGE_ROW10[] = { 1282, 1283, 1284 };
int EDGE_ROW11[] = { 1300, 1301, 1302 };
int EDGE_ROW12[] = { 1318, 1319, 1320 };
int EDGE_ROW13[] = { 2218, 2219, 2220 };
int EDGE_ROW14[] = { 2236, 2237, 2238 };
int EDGE_ROW15[] = { 2254, 2255, 2256 };
int EDGE_ROW16[] = { 2272, 2273, 2274 };
int EDGE_ROW17[] = { 2290, 2291, 2292 };
int EDGE_ROW18[] = { 2308, 2309, 2310 };
int EDGE_ROW19[] = { 3208, 3209, 3210 };
int EDGE_ROW20[] = { 3226, 3227, 3228 };
int EDGE_ROW21[] = { 3244, 3245, 3246 };
int EDGE_ROW22[] = { 3262, 3263, 3264 };
int EDGE_ROW23[] = { 3280, 3281, 3282 };
int EDGE_ROW24[] = { 3298, 3299, 3300 };
int* EDGE_ROW[] = { NULL,EDGE_ROW1, EDGE_ROW2, EDGE_ROW3, EDGE_ROW4, EDGE_ROW5, EDGE_ROW6,
EDGE_ROW7, EDGE_ROW8, EDGE_ROW9, EDGE_ROW10, EDGE_ROW11, EDGE_ROW12,
EDGE_ROW13, EDGE_ROW14, EDGE_ROW15, EDGE_ROW16, EDGE_ROW17, EDGE_ROW18,
EDGE_ROW19, EDGE_ROW20, EDGE_ROW21, EDGE_ROW22, EDGE_ROW23, EDGE_ROW24 };
int EDGE_COL[] = { 0, 780, 798, 816, 834, 852, 870,
1770, 1788, 1806, 1824, 1842, 1860,
2760, 2778, 2796, 2814, 2832, 2850 };
int Att_index[NODE_NUM] = { 0,
227, 245, 263, 281, 299, 317,
1217, 1235, 1253, 1271, 1289, 1307,
2207, 2225, 2243, 2261, 2279, 2297,
3197, 3215, 3233, 3251, 3269, 3287
};
int newtral_index[] = { 11, 13, 15, 17 }; /*중립지대임을 표시하기 위해 추가적으로 char를 할당해야 하는 인덱스 */
struct basiccard cardlist[8];
int level = 1;