The Challenge: |---->Program a 2d tank application in the language of your choice that adheres to the following:
#-The tank must rotate using the left and right directional keys.
#-The tank must loosely resemble a tank.
#-The tank must move forward or backward respectively from the direction it is facing using the up and down directional keys.
#-Pressing spacebar must fire a 'shot' in the direction the tank is facing.
#-The perspective of the user must be fixed and facing down at the tank.
#-The tank, shot, and ground must each have their own color. (all shots may have the same color)
<------You have 24 hours!------> GET TO WORK!
Name:
Anonymous2010-05-21 14:49
I didn't even use any classes.
import sys, os
import pygame
import math
import random
import time
from pygame.locals import *
if not pygame.font : print "Fonts's turned off"
if not pygame.mixer : print "Sound's turned off"
if not pygame.key : print "Input's turned off"
pygame.init ()
pygame.font.init()
clock = pygame.time.Clock()
def input(events):
for event in events:
if event.type == QUIT:
sys.exit (0)
else :
print event