CS349|SE382 Assignment 1

      NAME: Gaurav Jain
    USERID: g2jain
STUDENT ID: 20128491

My program uses the following keys:
	Key	Purpose
	--  -------
	q	Quit the program
	j   Move the runner left
	l   Move the runner right
	i   Move the runner up
	k   Move the runner down
	f   Make the game run faster
	s   Make the game run slower
	p   Pause/Unpause the game
	g   Forcibly kill random goon - designed to make game easier if needed
	c   Increase the life of runner by 1 - designed to stretch the game if needed
	a 	Advance to next level - player can choose to advance as and when he wisher (or automatically when he has
		collected all gold bags in that level)

My program uses the mouse in the following ways:
	My program uses the mouse to dynamically create a level. Basically you can click on any level component (space, ladder, floor or bar) and the level will cycle through these components allowing you to change the level on the fly. This is a very unique feature that allows the user to customize the level as he/she is playing it. The user can have a lot of fun with this feature, as you can "trap" the goons, and re-design the level to your advantage. The program ensures that the player cannot change the components on top of the goon or runner, thus allowing the player to only change their surroundings. According to the way the program is setup, when a player clicks on free space, the program puts a ladder in that block (40x30). If the player clicks on the floor it becomes a ladder, a ladder becomes a bar, and a bar changes back to free space. This complete cycle allows the user to pretty much create a new level to his/her liking.
	
For the enhancements of my own choosing, I:
	- The program supports multiple levels. Currently four different levels are created and the player advances to the next level when all the gold bags have been picked up. The player can also choose to advance by pressing a. The program dynamically loads runner and goon starting locations from a txt file based on the level we are on. Different levels have different number of goons.
	- The player can choose to kill random goons by clicking on g. This is provided for amateur players that like to reduce the difficulty of the game as they are playing it
	- The player can choose to increase the runners life by 1 by pressing c. This is provided for a similar reason as above, and for players that are addicted to the game and would like to stretch it.
	- The goons use an AI algorithm to determine the best possible path to reach the runner. 
	
	
For the enhancements for new UI territory, I:
	- Using several bitmaps and Clip mask I was able to animate my runner and goons. They react to their surroundings and behave based on what component of the level they are on
	- Since I don't repaint the entire window every time, I am able to minimize the flicker that occurs. Only the sections of the window that are damaged are repainted.
	- The mouse enhancement described above.
	
To implement the above enhancements, I had to learn how to:
	- Use bitmaps with X. 
	- Learn how to use Clip mask to prevent overlapping of goons and runners when they come close to each other
	- How to repaint only a certain section of the screen and developed algorithms to determine the correct coordinates.
	- Use the tool bitmap provided in Unix.
	
My program uses the following resources that I did not develop:
	- xbm files created using bitmap (I created the xbm files however)

