From 645a27fa9d7c7d8a4f9131c032da468386fed116 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Sat, 28 Jun 2014 10:24:09 -0400 Subject: Licensed code under GPL3, map under CC-BY-SA-4.0 --- gtnw.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'gtnw.c') diff --git a/gtnw.c b/gtnw.c index 1be73a0..f86766c 100644 --- a/gtnw.c +++ b/gtnw.c @@ -1,3 +1,23 @@ +/* + * WarGames - a WOPR emulator written in C + * Copyright (C) 2014 Franklin Wei + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Contact the author at contact@fwei.tk + */ + #include "gtnw.h" #include "location.h" #include "map.h" @@ -7,12 +27,15 @@ #include #include #include + static bool surrender=false; static int winner=0; /* on surrender */ + static unsigned int max(long long a, long long b) { return a>b?a:b; } + /* simulate a missile launch */ static void fire_missile(struct location_t* city) { @@ -395,5 +418,3 @@ void global_thermonuclear_war(void) } } } - - -- cgit v1.1