for(int y=0;y<heightInTiles;y++){ for(int x=0;x<widthInTiles;x++) { int trans_x = x - widthInTiles/2; int trans_y = y - heightInTiles/2; trans[y][x] = map[(int)(trans_x*sin_angle+trans_y*cos_angle)+heightInTiles/2][(int)(trans_x*cos_angle - trans_y * sin_angle)+widthInTiles/2]; } } map = trans;
	public void rotate(int angle) {		Tile [][] trans;				if(angle == ROTATE_90 || angle == ROTATE_270) {			trans = new Tile[widthInTiles][heightInTiles];		} else {			trans = new Tile[heightInTiles][widthInTiles];		}						//TODO: write the rest of this	}