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0, 5, 0, 0, 0, 5, 0, 5, 1},
  		{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  		};
  		return B[a][b];
  	}
  }
  void maps(int mat, int baris, int kolom){
  	if(mat==0){
  		bg(baris, kolom);
  	}
  	if(mat==1){
  		wall(baris, kolom);
  	}
  	if(mat==5){
  		egg(baris, kolom);
  	}
  	if(mat==9){
  		 ghost(baris, kolom);
  	}
  	if(mat==7){
  		door(baris, kolom);
  	}
  	if(mat==3){
  		wall2(baris, kolom);
  	}
  	if(mat==2){
  		gift(baris, kolom);
  	}
  }
  
  void egg(int mat, int baris, int kolom){
  	if(mat==5){
  		egg(baris, kolom);
  	}
  }
  void ghost(int mat, int baris, int kolom){
  	if(mat==9){
  		 ghost(baris, kolom);
  	}
  }
  void door(int mat, int baris, int kolom){
  	if(mat==7){
  		door(baris, kolom);
  	}
  }
  void wall2(int mat, int baris, int kolom){
  	if(mat==3){
  		wall2(baris, kolom);
  	}
  }
  void gift(int mat, int baris, int kolom){
  	if(mat==2){
  		gift(baris, kolom);
  	}
  }
  
  void bg(int i, int j){
  	readimagefile("assets//img//inGame//maps//Background.gif", img_mtrx);
  }
  void wall(int i, int j){
  	readimagefile("assets//img//inGame//maps//LBWALLS.jpeg", img_mtrx);
  }
  void egg(int i, int j){
  	readimagefile("assets//img//inGame//maps//telor_maps.jpg", img_mtrx);
  }
  void ghost(int i, int j){
  	readimagefile("assets//img//inGame//maps//ketakutan.jpg", img_mtrx);
  }
  void door(int i, int j){
  	readimagefile("assets//img//inGame//maps//panto.jpeg", img_mtrx);
  }
  void wall2(int i, int j){
  	readimagefile("assets//img//inGame//maps//purple.jpg", img_mtrx);
  }
  void gift(int i, int j){
  	readimagefile("assets//img//inGame//maps//lb_bonus.jpg", img_mtrx);
  }
  
  
  void run(int i, int j, int p){
  	if(p==1){
  		readimagefile("assets//img//inGame//player//char//karakter1.gif", img_mtrx);
  	}else if(p==2){
  		readimagefile("assets//img//inGame//player//char//karakter2.gif", img_mtrx);
  	}else if(p==3){
  		readimagefile("assets//img//inGame//player//char//karakter1.jpg", img_mtrx);
  	}else if(p==4){
          readimagefile("assets//img//inGame//player//char//karakter2.jpg", img_mtrx);
  	}
  }
  void naik(int i, int j, int p){
  	if(p==5){
  		readimagefile("assets//img//game//player//char//karakter1.gif", img_mtrx);
  	}
  }
  
  
  