Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package map;
- import java.awt.Color;
- import graphics.Cube;
- public class MapReader {
- int [][] mapi;
- public Cube [] [] c;
- public MapReader(int [][] mapi){
- mapi = new int [24] [32];
- this.mapi = mapi;
- c = new Cube[24] [32];
- Converter();
- }
- public void Converter(){
- int x = 0;
- int y = 0;
- for(int i = 0; i < mapi.length; i++){
- for(int j = 0; j < mapi[i].length; j++){
- switch(mapi[i][j]){
- case 0:
- c[i][j] = new Cube(25, 25, Color.GRAY, x, y);
- break;
- }
- }
- }
- }
- public Cube[][] getCubeMap(){
- return c;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement