?? mbacsystem.java
字號:
/**
* @(#)MBACSystem.java
* @The system of all the permanent information.
*
* @Link Scholes
* @version 1.00 2008/7/21
*/
package System;
import Data.*;
public class MBACSystem
{
private Map map;
private MapList mapList;
private Score score;
//construct a system with all things defaulted
public MBACSystem()
{
map = new Map();
mapList = new MapList();
score = new Score();
}
//get the dificulty of the current map
public int getMapDifficulty()
{
return map.getDifficulty();
}
//get the proportions of four kinds of food of the current map
public int[] getMapFood()
{
return map.getFood();
}
//get the info of the current map
public int[][] getMapInfo()
{
return map.getInfo();
}
//get the name of the current map
public String getMapName()
{
return map.getName();
}
//set the current map with specified name,info and proportions of four kinds of food
public void setMap(String s,int a[][],int b[])
{
map.setMap(s,a,b);
}
//save the current map
public void saveMap()
{
map.save();
mapList.addMap(map.getName());
}
//load the map with specified kind(original/extended) and name
public void loadMap(boolean b,String s)
{
map.load(b,s);
}
//get the current map list
public String[] getList()
{
return mapList.getList();
}
//return whether the current map list contains the specifed map
public boolean hasMap(String s)
{
return mapList.hasMap(s);
}
//get the rankings of specified kind(normal/survival)
public String[] getRankings(boolean b)
{
return score.getRankings(b);
}
//get the temporary ranking of the specified score in the specified kind(normal/survival)
public int getTempRanking(boolean b,int n)
{
return score.getTempRanking(b,n);
}
//update the ranking with specified kind(normal/survival),player name,map name/stage and score
public void update(boolean b,String s,String t,int n)
{
score.update(b,s,t,n);
}
//reset the ranking with defaulted value
public void reset()
{
score.reset();
}
} //end class MBACSystem
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -