📄 dice.java
字号:
// Description: This class is for the dice of the game, getting player rolls.public class Dice{ // Variables Of class Dice private Gui gui; // The Constructor of class Dice public Dice(){ gui = new Gui(); // Empty // this.gui = gUI1; } // Method of rolling the dice. public int rollDice(){ // Roll the Dice int diceroll = (int)(6*Math.random() + 1); // Range 1-6 diceroll = diceroll; gui.drawDice(diceroll); return diceroll; // End of roll }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -