📄 wall.java
字号:
// FrontEnd Plus GUI for JAD
// DeCompiled : Wall.class
import java.util.Random;
import java.util.Vector;
public class Wall
{
public static final byte W_EAST = 0;
public static final byte W_SOUTH = 1;
public static final byte W_WEST = 2;
public static final byte W_NORTH = 3;
public static final short TOTAL_TILE_COUNT = 136;
private byte m_btKongCount;
private byte m_btWind;
private byte m_abtWall[];
private short m_stNextTileIndex;
public Wall()
{
m_btKongCount = 0;
m_btWind = 0;
m_abtWall = new byte[136];
m_stNextTileIndex = 0;
for(short word0 = 0; word0 < m_abtWall.length; word0++)
m_abtWall[word0] = (byte)((word0 / 36) * 10 + (word0 % 36) / 4 + 1);
shuffle();
}
public byte getKongTile()
{
return m_abtWall[135 - m_btKongCount++];
}
public Vector getFanTiles(boolean flag)
{
Vector vector = new Vector();
for(short word0 = 131; word0 > 129 - 2 * m_btKongCount; word0--)
if(flag || word0 % 2 != 0)
{
byte byte0 = m_abtWall[word0] != 9 ? m_abtWall[word0] != 19 ? m_abtWall[word0] != 29 ? m_abtWall[word0] != 34 ? m_abtWall[word0] != 37 ? (byte)(m_abtWall[word0] + 1) : 35 : 31 : 21 : 11 : 1;
vector.addElement(new Byte(byte0));
}
return vector;
}
public byte[] deal()
{
return (new byte[] {
m_abtWall[m_stNextTileIndex++], m_abtWall[m_stNextTileIndex++], m_abtWall[m_stNextTileIndex++], m_abtWall[m_stNextTileIndex++]
});
}
public byte nextTile()
{
return m_abtWall[m_stNextTileIndex++];
}
public byte getWind()
{
return m_btWind;
}
public void setWind(byte byte0)
{
m_btWind = byte0;
}
public void nextWind()
{
m_btWind = (byte)(++m_btWind % 4);
}
public byte getTile(short word0)
{
return m_abtWall[word0];
}
public byte getKongCount()
{
return m_btKongCount;
}
public void shuffle()
{
Random random = new Random();
for(short word0 = 0; word0 < m_abtWall.length; word0++)
{
short word1 = (short)(Math.abs(random.nextInt()) % 136);
byte byte0 = m_abtWall[word0];
m_abtWall[word0] = m_abtWall[word1];
m_abtWall[word1] = byte0;
}
m_stNextTileIndex = 0;
m_btKongCount = 0;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -