public boolean candir(int dir, STPGame game) { //0 pushup, 1 pushdown, 2 pushleft, 3 pushright
		Rectangle test = null;
		if (dir == 0) {
			test = new Rectangle(x,y+21,20,1);
		} else if (dir == 1) {
			test = new Rectangle(x,y-2,20,1);
		} else if (dir == 2) {
			test = new Rectangle(x+21,y,1,20);
		} else if (dir == 3) {
			test = new Rectangle(x-2,y,1,20);
		}
		
		for (Rectangle r : game.staticslist) {
			if (test.intersects(r)) {
				return false;
			}
		}
		for (Enemy e : game.enemylist) {
			//System.out.println("testin");
			if (test.intersects(e.hitbox)) {
				return false;
			}
		}
		
		return true;
	}