public static void move(State st, int x, int y){

		ObjectInstance agent = st.getObjectsOfTrueClass(AGENTCLASS).get(0);
		List<ObjectInstance> blocks = st.getObjectsOfTrueClass(BLOCKCLASS);
		int curX = agent.getDiscValForAttribute(XATTNAME);
		int curY = agent.getDiscValForAttribute(YATTNAME);
		int nx = curX + x;
		int ny = curY + y;

		//check to see if the agent is at the boundary
		if(nx < MINX || nx > MAXX){
			nx = curX;
		}
		if(ny < MINY || ny > MAXY){
			ny = curY;
		}

		if(MAP[nx][ny] == 1){ //wall cannot move there
			nx = curX;
			ny = curY;
		}

		//check to see if you're moving into a block
		for (int i = 0; i < blocks.size(); i++){
			ObjectInstance block = blocks.get(i);
			int blockX = block.getDiscValForAttribute(XATTNAME);
			int blockY = block.getDiscValForAttribute(YATTNAME);

			if(nx == blockX && ny == blockY){ //block found
				int bx = pushBlockCoords(curX, curY, nx, ny)[0];
				int by = pushBlockCoords(curX, curY, nx, ny)[1];
				if (moveBlock(st, block, bx, by) == false){
					nx = curX;
					ny = curY;
				}
			}	
		}

		agent.setValue(XATTNAME, nx);
		agent.setValue(YATTNAME, ny);
	}