aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md7
-rw-r--r--games.c2
-rw-r--r--games.h2
-rw-r--r--location.h30
4 files changed, 24 insertions, 17 deletions
diff --git a/README.md b/README.md
index 7ee5b5b..89c9fa0 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,8 @@
==WarGames==
-Program to simulate the W.O.P.R. from WarGames, with WORKING Global Thermonuclear War! \ No newline at end of file
+Program to simulate the W.O.P.R. from WarGames, with WORKING Global Thermonuclear War!
+For the uninitiated, the logon is "joshua"
+Say hi, and that you are fine.
+Then, say "love to" when Joshua asks to play a game
+Then, type "later"
+Then, enjoy the ASCII masterpiece! \ No newline at end of file
diff --git a/games.c b/games.c
index 41973e6..94d1581 100644
--- a/games.c
+++ b/games.c
@@ -92,11 +92,11 @@ void global_thermonuclear_war(void)
{
map[targets[i].y][targets[i].x]='X';
}
- usleep(SLEEP_TIME*100);
clear();
for(int i=0;i<sizeof(map)/sizeof(char*);++i)
{
print_string(map[i]);
print_string("\n");
}
+ unsigned int us_pop=200000000, ussr_pop=250000000;
}
diff --git a/games.h b/games.h
index d9a885a..a0909d0 100644
--- a/games.h
+++ b/games.h
@@ -1 +1,3 @@
void global_thermonuclear_war(void);
+#define GTN_USSR_MISSILES_PER_TURN 8
+#define GTN_USA_MISSILES_PER_TURN 4
diff --git a/location.h b/location.h
index fc72b16..3d8ad5f 100644
--- a/location.h
+++ b/location.h
@@ -4,25 +4,25 @@ struct location_t {
const char* name;
int x;
int y; /* x,y-coords on the map */
+ int population; /* around 1980 */
enum player_t owner;
-};
+};
struct location_t world[]={
/* US cities */
- {"las vegas", 5, 7, USA},
- {"seattle", 3, 2, USA},
- {"new york", 34, 5, USA},
- {"new orleans", 25, 10, USA},
- {"washington", 33, 6, USA},
- {"washington dc", 33, 6, USA},
- {"winston-salem", 30, 7, USA},
- {"san francisco", 1, 6, USA},
- {"chicago", 24, 4, USA},
- {"miami", 33, 11, USA},
+ {"las vegas", 5, 7, 150000, USA},
+ {"seattle", 3, 2, 0, 500000, USA},
+ {"new york", 34, 5, 7000000, USA},
+ {"new orleans", 25, 10, 500000, USA},
+ {"washington dc", 33, 6, 650000, USA},
+ {"winston-salem", 30, 7, 150000, USA},
+ {"san francisco", 1, 6, 700000, USA},
+ {"chicago", 24, 4, 3000000, USA},
+ {"miami", 33, 11, 1000000, USA},
/* Soviet cities */
/* NOTE: These cities are not accurate! */
- {"murmansk", 74, 1, USSR},
- {"moscow", 70, 5, USSR},
- {"minsk", 66, 4, USSR},
- {"chelyabinsk", 64, 8, USSR}
+ {"murmansk", 74, 1, 500000, USSR},
+ {"moscow", 70, 5, 8000000, USSR},
+ {"minsk", 66, 4, 1500000, USSR},
+ {"chelyabinsk", 64, 8, 1250000, USSR}
};