⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 allmap.java

📁 J2ME下开发的用于手机的推箱子游戏源代码
💻 JAVA
字号:
/*
 * AllMap.java
 *
 * Created on 2007年12月1日, 上午2:13
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package gamepackage;

/**
 *
 * @author bense
 */
public class AllMap {
    

    private int[][][] all=new int[][][]{
        {
        {0,1,1,1,1,1,1,1,0},
        {0,1,0,4,2,2,2,1,0},
        {0,1,0,0,0,1,1,1,1},
        {1,1,1,3,0,0,0,0,1},
        {1,0,0,0,1,3,1,0,1},
        {1,0,3,0,1,0,0,0,1},
        {1,0,0,0,1,1,1,1,1},
        {1,1,1,1,1,1,0,0,0}
        },
              
        {
        {1,1,1,1,1,0,0,0,0},
        {1,4,0,0,1,0,0,0,0},
        {1,0,3,3,1,0,1,1,1},
        {1,0,3,0,1,0,1,2,1},
        {1,1,1,0,1,1,1,2,1},
        {0,1,1,0,0,0,0,2,1},
        {0,1,0,0,0,1,0,0,1},
        {0,1,0,0,0,1,1,1,1},
        {0,1,1,1,1,1,0,0,0}
        },
                
        {
        {0,1,1,1,1,0,0,0},
        {0,1,0,0,1,1,1,0},
        {0,1,4,3,0,0,1,0},
        {1,1,1,0,1,0,1,1},
        {1,2,1,0,1,0,0,1},
        {1,2,3,0,0,1,0,1},
        {1,2,0,0,0,3,0,1},
        {1,1,1,1,1,1,1,1}
        },
                
        {
        {0,1,1,1,1,1,1,1,0,0},
        {0,1,0,0,0,0,0,1,1,1},
        {1,1,3,1,1,1,0,0,0,1},
        {1,0,4,0,3,0,0,3,0,1},
        {1,0,2,2,1,0,3,0,1,1},
        {1,1,2,2,1,0,0,0,1,0},
        {0,1,1,1,1,1,1,1,1,0}
        },
                
        {
        {0,1,1,1,1,0,0,1,1,1,1,1},
        {1,1,0,0,1,0,0,1,0,0,0,1},
        {1,0,3,0,1,1,1,1,3,0,0,1},
        {1,0,0,3,2,2,2,2,4,3,0,1},
        {1,1,0,0,0,0,1,0,0,0,1,1},
        {0,1,1,1,1,1,1,1,1,1,0,0}
        },
                
        {
        {1,1,1,1,1,1,1,0,0},
        {1,0,0,0,0,0,1,0,0},
        {1,0,3,3,3,1,1,0,0},
        {1,0,0,1,2,2,1,1,1},
        {1,1,0,4,2,2,3,0,1},
        {0,1,0,0,0,0,0,0,1},
        {0,1,1,1,1,1,1,1,1}
        },
                
        {
        {1,1,1,1,0,0},
        {1,0,0,1,1,1},
        {1,0,3,3,2,1},
        {1,4,0,3,2,1},
        {1,0,3,0,2,1},
        {1,0,1,0,2,1},
        {1,1,1,1,1,1}
        },
                
        {
        {0,0,1,1,1,1,1,0},
        {1,1,1,0,0,4,1,0},
        {1,0,0,3,2,0,1,1},
        {1,0,0,2,3,2,0,1},
        {1,1,1,0,3,3,0,1},
        {0,0,1,0,0,0,1,1},
        {0,0,1,1,1,1,1,1}
        },
                
        {
        {0,0,1,1,1,1,0,0},
        {0,0,1,2,2,1,0,0},
        {0,1,1,0,2,1,1,0},
        {0,1,0,0,3,0,1,0},
        {1,1,0,3,0,2,1,1},
        {1,0,0,1,3,3,0,1},
        {1,0,0,4,0,0,0,1},
        {1,1,1,1,1,1,1,1}                   
        },
                
        {
        {0,0,1,1,1,1,1,0,0,0,0},
        {0,0,1,0,0,0,1,0,0,0,0},
        {1,1,1,3,2,3,1,1,1,1,1},
        {1,0,0,0,2,0,3,0,0,0,1},
        {1,0,1,1,3,1,1,0,4,0,1},
        {1,0,0,0,2,0,1,1,1,1,1},
        {1,1,1,0,2,0,1,0,0,0,0},
        {0,0,1,0,0,0,1,0,0,0,0},
        {0,0,1,1,1,1,1,0,0,0,0}
        },
                
        {
        {0,1,1,1,1,0},
        {1,1,0,0,1,0},
        {1,4,3,0,1,0},
        {1,1,3,0,1,1},
        {1,1,0,3,0,1},
        {1,2,3,0,0,1},
        {1,2,2,3,2,1},
        {1,1,1,1,1,1}
        },
        {
        {0,0,0,1,1,1,1,1,1,1},
        {0,0,1,1,0,0,1,0,4,1},
        {0,0,1,0,0,0,1,0,0,1},
        {0,0,1,3,0,3,0,3,0,1},
        {0,0,1,0,3,1,1,0,0,1},
        {1,1,1,0,3,0,1,0,1,1},
        {1,2,2,2,2,2,0,0,1,0},
        {1,1,1,1,1,1,1,1,1,0}
        },
        
        {
        {0,0,0,1,1,1,1,1,1,0},
        {0,1,1,1,0,0,0,0,1,0},
        {1,1,2,0,3,1,1,0,1,1},
        {1,2,2,3,0,3,0,0,4,1},
        {1,2,2,0,3,0,3,0,1,1},
        {1,1,1,1,1,1,0,0,1,0},
        {0,0,0,0,0,1,1,1,1,0}                    
        },
        
        {
        {0,0,1,1,1,1,1,1},
        {0,0,1,0,0,0,0,1},
        {1,1,1,3,3,3,0,1},
        {1,4,0,3,2,2,0,1},
        {1,0,3,2,2,2,1,1},
        {1,1,1,1,0,0,1,0},
        {0,0,0,1,1,1,1,0}            
        },
        
        {
        {0,1,1,1,1,1,1,1,1,1},
        {1,1,0,0,0,0,0,0,0,1},
        {1,0,0,0,1,3,1,3,0,1},
        {1,0,3,3,0,0,2,3,2,1},
        {1,0,4,1,1,1,2,2,2,1},
        {1,1,1,1,0,1,1,1,1,1}           
        },
                
        {
        {0,0,0,1,1,1,1,1,1},
        {1,1,1,1,2,0,0,4,1},
        {1,0,0,3,3,3,0,0,1},
        {1,2,1,1,2,1,1,2,1},
        {1,0,0,0,3,0,0,0,1},
        {1,0,0,3,2,1,0,1,1},
        {1,1,1,1,0,0,0,1,0},
        {0,0,0,1,1,1,1,1,0}
        },
                
        {
        {0,0,1,1,1,1,1,1,1,1,1,1},
        {1,1,1,0,0,0,2,0,0,0,0,1},
        {1,0,0,0,1,1,3,1,1,0,0,1},
        {1,0,4,3,2,0,2,0,2,3,1,1},
        {1,1,0,3,1,1,3,1,1,0,1,0},
        {0,1,0,0,0,0,2,0,0,0,1,0},
        {0,1,1,1,1,1,1,1,1,1,1,0}           
        },
                
        {
        {0,1,1,1,1,1,1,0},
        {0,1,2,0,2,2,1,0},
        {0,1,2,0,3,2,1,0},
        {1,1,1,0,0,3,1,1},
        {1,0,3,0,0,3,0,1},
        {1,0,1,3,1,1,0,1},
        {1,0,0,0,4,0,0,1},
        {1,1,1,1,1,1,1,1}           
        },
                
        {
        {0,0,0,1,1,1,1,1,1,1,1,1},
        {0,0,0,1,0,0,0,1,0,0,0,1},
        {0,0,0,1,0,0,0,0,0,0,0,1},
        {1,1,1,1,1,3,1,1,1,0,1,1},
        {1,0,0,0,2,2,2,0,0,0,1,0},
        {1,0,1,0,1,3,1,1,1,3,1,1},
        {1,0,3,0,0,4,0,3,0,0,0,1},
        {1,1,1,1,1,0,0,1,0,0,0,1},
        {0,0,0,0,1,1,1,1,1,1,1,1}
        },
                
        {
        {0,1,1,1,1,1,1,1,1,1,0},
        {0,1,0,0,1,1,0,0,0,1,0},
        {0,1,0,0,0,3,0,0,0,1,0},
        {0,1,3,0,1,1,1,0,3,1,0},
        {0,1,0,1,2,2,2,1,0,1,0},
        {1,1,0,1,2,2,2,1,0,1,1},
        {1,0,3,0,0,3,0,0,3,0,1},
        {1,0,0,0,0,0,1,0,4,0,1},
        {1,1,1,1,1,1,1,1,1,1,1}
        },
        
        {
        {0,0,1,1,1,1,1,1,1,1},
        {0,0,1,0,0,0,1,2,0,1},
        {0,1,1,0,0,3,2,2,2,1},
        {0,1,0,0,3,0,1,5,2,1},
        {1,1,0,1,1,3,1,0,1,1},
        {1,0,0,0,3,0,0,3,0,1},
        {1,0,0,0,1,0,0,0,0,1},
        {1,1,1,1,1,1,1,4,0,1},
        {0,0,0,0,0,0,1,1,1,1}
        },
        
        {
        {1,1,1,1,1,1,1,1,0},
        {1,0,0,0,0,0,0,1,0},
        {1,0,1,3,3,0,0,1,0},
        {1,0,2,2,2,1,0,1,0},
        {1,1,2,2,2,3,0,1,1},
        {0,1,0,1,1,0,3,0,1},
        {0,1,3,0,0,3,0,0,1},
        {0,1,0,0,1,0,0,4,1},
        {0,1,1,1,1,1,1,1,1},
        },
        
        {
        {0,0,1,1,1,1,1,0,0,0},
        {1,1,1,0,0,0,1,1,1,1},
        {1,0,0,0,3,0,3,0,0,1},
        {1,0,3,0,0,0,3,0,4,1},
        {1,1,1,3,3,1,1,1,1,1},
        {0,0,1,0,0,2,2,1,0,0},
        {0,0,1,2,2,2,2,1,0,0},
        {0,0,1,1,1,1,1,1,0,0}               
        },
        
        {
            {0,0,0,1,1,1,1,1,0},
            {0,0,0,1,0,4,0,1,0},
            {0,0,0,1,3,3,3,1,0},
            {1,1,1,1,0,0,0,1,0},
            {1,0,0,0,2,1,3,1,1},
            {1,0,3,2,3,2,0,2,1},
            {1,0,0,1,2,1,2,1,1},
            {1,1,1,1,1,1,1,1,0}
                    
        },
        
        {
            {0,1,1,1,1,1,0,0,0},
            {0,1,0,0,0,1,1,1,1},
            {1,1,0,1,3,0,0,0,1},
            {1,0,3,0,0,3,3,0,1},
            {1,0,1,3,1,2,5,2,1},
            {1,0,0,0,4,2,2,2,1},
            {1,1,1,1,1,1,1,1,1}          
        },
        
        {
            {1,1,1,1,1,1,1,1},
            {1,0,0,1,0,0,0,1},
            {1,0,3,2,2,3,0,1},
            {1,4,3,2,5,0,1,1},
            {1,0,3,2,2,3,0,1},
            {1,0,0,1,0,0,0,1},
            {1,1,1,1,1,1,1,1}          
        },
        
        {
            {0,0,1,1,1,1,1,1,0,0},
            {0,0,1,0,0,0,0,1,1,1},
            {0,0,1,0,3,0,0,0,0,1},
            {1,1,1,0,3,0,1,1,0,1},
            {1,2,2,2,0,3,0,0,0,1},
            {1,2,2,2,3,1,3,0,1,1},
            {1,1,1,1,0,1,0,3,0,1},
            {0,0,0,1,0,0,4,0,0,1},
            {0,0,0,1,1,1,1,1,1,1}          
        },
        
        {
            {0,1,1,1,1,0,0,0,0,0},
            {0,1,0,0,1,1,1,1,1,0},
            {1,1,3,0,1,1,0,0,1,0},
            {1,0,0,3,4,3,0,0,1,0},
            {1,0,0,0,1,1,3,0,1,0},
            {1,1,1,2,1,1,0,1,1,1},
            {0,1,2,2,2,3,0,3,0,1},
            {0,1,1,2,2,0,0,0,0,1},
            {0,0,1,1,1,1,1,1,1,1}
        },
        
        {
            {1,1,1,1,1,1,1,1,0},
            {1,2,2,2,2,2,2,1,0},
            {1,0,0,3,0,1,0,1,1},
            {1,0,3,0,1,0,3,0,1},
            {1,1,3,0,3,0,3,0,1},
            {0,1,0,0,4,0,0,0,1},
            {0,1,1,1,1,1,1,1,1}          
        },
        
        {
            {0,0,0,1,1,1,1,1,1,1,1},
            {1,1,1,1,0,0,0,0,2,0,1},
            {1,0,0,3,0,3,0,3,2,0,1},
            {1,0,0,2,1,1,1,1,2,1,1},
            {1,0,3,2,3,0,3,0,4,1,0},
            {1,0,0,2,0,0,1,1,1,1,0},
            {1,1,1,1,1,1,1,0,0,0,0}
        },
        
        {
            {0,1,1,1,1,1,1,0},
            {1,1,0,0,0,0,1,0},
            {1,0,0,1,1,3,1,0},
            {1,0,0,2,2,0,1,1},
            {1,0,3,5,5,3,0,1},
            {1,1,0,2,2,0,0,1},
            {0,1,3,1,1,0,0,1},
            {0,1,0,4,0,0,1,1},
            {0,1,1,1,1,1,1,0}
        },
                
        {
            {0,0,0,0,0,1,1,1,1,1},
            {0,1,1,1,1,1,0,0,0,1},
            {0,1,0,2,2,0,3,1,0,1},
            {0,1,0,1,2,5,0,0,0,1},
            {1,1,0,5,2,1,3,0,1,1},
            {1,0,3,0,0,3,0,0,1,0},
            {1,0,0,0,1,1,0,4,1,0},
            {1,1,1,1,1,1,1,1,1,0}
                    
        },
        
        {
            {0,0,0,0,1,1,1,1,0,0,0,0},
            {1,1,1,1,1,0,0,1,1,1,1,1},
            {1,0,0,0,0,3,0,0,0,3,0,1},
            {1,0,0,3,1,3,1,1,0,0,0,1},
            {1,1,1,0,1,2,5,2,0,1,1,1},
            {0,0,1,0,2,2,2,0,4,1,0,0},
            {0,0,1,1,0,1,3,1,1,1,0,0},
            {0,0,0,1,0,0,0,1,0,0,0,0},
            {0,0,0,1,1,1,1,1,0,0,0,0}
        },
        
        {
            {1,1,1,1,1,0,0,0,0,0},
            {1,0,0,0,1,1,1,1,1,1},
            {1,0,3,0,2,2,0,3,0,1},
            {1,1,3,0,2,2,3,3,4,1},
            {0,1,0,0,2,2,0,3,0,1},
            {0,1,1,1,1,1,1,1,1,1}
        },
        
        {
            {0,0,1,1,1,1,1,0,0,0,0,0},
            {0,0,1,0,0,0,1,1,1,1,1,1},
            {1,1,1,3,1,2,0,0,0,0,0,1},
            {1,0,3,0,2,2,2,1,0,3,0,1},
            {1,4,0,3,2,1,5,3,0,0,0,1},
            {1,1,1,1,0,0,0,0,1,1,1,1},
            {0,0,0,1,1,1,1,1,1,0,0,0}
        },
        
        {
            {0,1,1,1,1,1,1,1,0},
            {1,1,0,0,2,0,0,1,1},
            {1,0,2,3,4,3,2,0,1},
            {1,0,0,3,1,3,0,0,1},
            {1,0,2,3,0,3,2,0,1},
            {1,1,0,0,2,0,0,1,1},
            {0,1,1,1,1,1,1,1,0}
        },
        
        {
            {0,1,1,1,1,1,1,0},
            {1,1,0,0,0,0,1,1},
            {1,0,3,0,3,3,0,1},
            {1,2,2,2,2,2,2,1},
            {1,0,3,3,0,3,0,1},
            {1,1,1,0,4,1,1,1},
            {0,0,1,1,1,1,0,0}
        },
        
        {
            {0,1,1,1,1,1,1,1,0,0},
            {0,1,2,2,2,2,0,1,0,0},
            {1,1,1,2,2,2,3,1,1,1},
            {1,0,0,3,2,3,0,3,0,1},
            {1,0,3,3,0,0,1,3,0,1},
            {1,0,0,0,0,1,0,0,0,1},
            {1,1,1,1,0,4,0,1,1,1},
            {0,0,0,1,1,1,1,1,0,0}
        },
        
        {
            {0,0,0,1,1,1,1,1,1,0,0},
            {0,0,0,1,0,2,2,2,1,0,0},
            {1,1,1,1,2,2,2,2,1,0,0},
            {1,0,0,1,1,1,3,0,1,1,1},
            {1,0,3,0,3,0,0,3,3,0,1},
            {1,4,0,3,0,3,0,0,0,0,1},
            {1,0,0,0,1,1,1,0,0,0,1},
            {1,1,1,1,1,0,1,1,1,1,1}
        },
        
        {
            {0,0,0,1,1,1,1,1,0},
            {1,1,1,1,2,0,0,1,1},
            {1,0,3,2,3,2,0,0,1},
            {1,4,3,1,0,1,3,0,1},
            {1,0,3,2,0,2,0,0,1},
            {1,1,1,1,3,0,3,0,1},
            {0,0,1,2,0,2,0,0,1},
            {0,0,1,1,1,1,1,1,1}
        },
        
        {
            {0,0,0,0,1,1,1,1,1,0,0,0},
            {0,0,0,1,1,0,0,0,1,1,1,1},
            {0,0,0,1,0,2,2,5,0,3,0,1},
            {1,1,1,1,0,1,2,1,0,0,0,1},
            {1,0,0,0,0,2,5,2,1,4,1,1},
            {1,0,1,3,1,1,3,1,1,0,1,0},
            {1,0,0,0,0,0,3,0,3,0,1,0},
            {1,1,0,0,1,0,0,0,1,1,1,0},
            {0,1,1,1,1,1,1,1,1,0,0,0}
        },
        
        {
            {1,1,1,1,1,1,0,0,0},
            {1,0,0,0,0,1,0,0,0},
            {1,0,3,0,0,1,1,1,1},
            {1,0,3,5,2,2,5,2,1},
            {1,0,5,2,2,5,3,0,1},
            {1,1,1,1,0,0,3,0,1},
            {0,0,0,1,0,4,0,0,1},
            {0,0,0,1,1,1,1,1,1}
                    
        }
        
    };
    public int getBoxLength(int index,int val){
        int m=0;
        for(int i=0;i<all[index].length;i++){
            for(int j=0;j<all[index][0].length;j++)
            if(all[index][i][j]==val){
                m++;
            }
                
        }    
        return m;
    }
    public int[][] getMap(int index){
        return all[index];
    }
    /** Creates a new instance of AllMap */
    public AllMap() {
    }
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -