# Arup Guha
# 4/23/2016
# Donald's Walk simulation - he moves around completely randomly!

import random
import math
import time
import pygame, sys
from pygame.locals import *

pygame.init()
DISPLAYSURF = pygame.display.set_mode((1000, 600))
pygame.display.set_caption("Donald's Walk")
WHITE = pygame.Color(255,255,255)
BLUE = pygame.Color(0,0,255)
clock = pygame.time.Clock()

donald = pygame.image.load("donald.jpg")
donaldX = 450
donaldY = 250

curT = time.clock()

while True:
    
    for event in pygame.event.get():
        if event.type == QUIT:
            pygame.quit()
            sys.exit()    
     
    DISPLAYSURF.fill(WHITE)
    DISPLAYSURF.blit(donald,(donaldX, donaldY))

    pygame.display.update()

    # Move the drops for the next iteration and remove useless ones.
    clock.tick(30)
    dx = random.randint(-25, 25)
    dy = random.randint(-25, 25)
    donaldX += dx
    donaldY += dy;

