Mercurial > atc
view atc_single.py @ 35:c0c52fb4a7fd
Moved most of single player game code into new class Game()
This will simplify code management between single/multi-player game
modes
author | Josef "Jeff" Sipek <jeffpc@optonline.net> |
---|---|
date | Thu, 18 Aug 2005 00:14:13 -0500 |
parents | 4ea8bb26bc11 |
children | c93c3c910c85 |
line wrap: on
line source
#/* # * ATC - Air Traffic Controller simulation game # * # * Copyright (C) 2004, 2005 Josef "Jeff" Sipek <jeffpc@optonline.net> # * # * 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 2 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, write to the Free Software # * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # * # * @(#) %M% %I% %E% %U% # */ import pygame import sys import atc_colors import atc_utils import atc_plane import atc_message import atc_game from atc_maps import * def single(screen): """ Main fn to run the single player game """ g = atc_game.Game(screen) while g.run(): pass def cmd_plane(cmd): parts = cmd.split(': ') if (parts.__len__()>1): return parts[0] return None def cmd_cmd(cmd): parts = cmd.split(': ') if (parts.__len__()>1): return parts[1] return None if (__name__ == '__main__'): print "Don't do it!"