freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

數(shù)據(jù)結(jié)構(gòu)課程設(shè)計迷宮算法的實(shí)現(xiàn)_java(編輯修改稿)

2024-09-02 22:13 本頁面
 

【文章內(nèi)容簡介】 for (int i = 0。 i rows。 i++) { for (int j = 0。 j cols。 j++) { buttons[i][j].setSelected(brick[i][j])。 } } } // 根據(jù)現(xiàn)在按鈕情況設(shè)置brick[][]數(shù)組,用于move()內(nèi)前面 public static void readBricks() { for (int i = 0。 i rows。 i++) { for (int j = 0。 j cols。 j++) { brick[i][j] = buttons[i][j].isSelected()。 } } } // 開始走 public static void move() { if (walking != null) { ()。 } clean()。 readBricks()。 //readToFile()。 walking = new Walking(brick)。 } /** // 用于把繪制好地圖數(shù)據(jù)寫入文件 public static void readToFile() { String out = 。 for (int i = 0。 i rows。 i++) { out += {。 for (int j = 0。 j cols。 j++) { if (brick[i][j]) { out += true,。 } else { out += false,。 } } out += },\r\n。 } (out, E:/)。 } */ // 復(fù)制二維數(shù)組 public static boolean[][] copyBoolean(boolean[][] in) { int row = , col = in[0].length。 boolean[][] out = new boolean[row][col]。 for (int i = 0。 i row。 i++) { for (int j = 0。 j col。 j++) { out[i][j] = in[i][j]。 } } return out。 }}2) UI模塊——實(shí)現(xiàn)整個控制面板內(nèi)組件的布局管理;3)Walking模塊——實(shí)現(xiàn)走迷宮的算法;4)Applete模塊——設(shè)置控制面板。三、詳細(xì)設(shè)計1.UI模塊package mg。import .*。import .*。import .*。import .*。/** * pTitle: maze39。s MainUI /p * * pDescription: /p * * pDate: 20060831 /p */public class UI extends JPanel { private static final long serialVersionUID = 5924032800440919028L。 static JPanel jPanel_state, jPanel_map, jPanel_control。 static JLabel jLabel_state。 static JButton jButton_move, jButton_clean, jButton_blank, jButton_reset。 static JSlider jSlider。//添加面板,向面板里添加各個組件 public UI() { super(new BorderLayout())。 // add add(jPanel_control(), )。//布局管理器,從左到右設(shè)置按鈕 } public static JPanel jPanel_control() { jLabel_state = new JLabel( Move now?)。 ()。//將Move now標(biāo)簽添加 //在面板的左下角 jSlider = new JSlider(, 5, 400, )。//建立一個水平方向的滑竿 (new Dimension(5, 5))。//滑桿的大小 (new Color(208, 220, 255))。 (new ChangeListener() { public void stateChanged(ChangeEvent e) { = ((JSlider) ()).getValue()。 }//處理changeEvent時間,當(dāng)用戶滑動桿時速度會改變 })。//為各個按鈕添加監(jiān)視器 jButton_move = new JButton(Move!)。 (new ActionListener_button())。 (move)。 jButton_clean = new JButton(Clean)。 (new ActionListener_button())。 (clean)。 jButton_blank = new JButton(Blank)。 (new ActionListener_button())。 (blank)。 jButton_reset = new JButton(Reset)。 (new ActionListener_button())。 (reset)。 jPanel_control = new JPanel()。 // Option: X_AXIS Y_AXIS LINE_AXIS PAGE_AXIS jPanel_control .setLayout(new BoxLayout(jPanel_control, ))。 //jPanel_control = new JPanel(new FlowLayout())。 (new Color(208, 220, 255))。 (jLabel_state)。 (())。//從左到右設(shè)置按鈕 (jSlider)。 (jButton_move)。 (jButton_clean)。 (jButton_blank)。 (jButton_reset)。 return jPanel_control。 }//監(jiān)視器接口 static class ActionListener_button implements ActionListener { public void actionPerformed(ActionEvent e) { if (().equals(move)) { ()。 } else if (().equals(clean)) { ()。 } else if (().equals(blank)) { ()。 } else if (().equals(reset)) { ()。 } } }}package 。import .*。import .*。import .*。import .*。/** * pTitle: maze39。s MainUI /p * * pDescription: /p * * pDate: 20060831 /p */public class UI extends JPanel { private static final long serialVersionUID = 5924032800440919028L。 static JPanel jPanel_state, jPanel_map, jPanel_control。 static JLabel jLabel_state。 static JButton jButton_move, jButton_clean, jButton_blank, jButton_reset。 static JSlider jSlider。//添加面板,向面板里添加各個組件 public UI() { super(new BorderLayout())。 // add add(jPanel_control(), )。//布局管理器,從左到右設(shè)置按鈕 } public static JPanel jPanel_control() { jLabel_state = new JLabel( Move now?)。 ()。//將Move now標(biāo)簽添加 //在面板的左下角 jS
點(diǎn)擊復(fù)制文檔內(nèi)容
數(shù)學(xué)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1