📄 timecalculator.java
字号:
public class TimeCalculator{int minutes=0;int seconds=0; public void calcTimeforMaze(int totalDimonds, int xSize, int ySize)//some kinda method that determines the time a player has for each level based on the level size and dimonds. { if(xSize/ySize < 1)//this method should be changed in order to provide a more relistic time system. { minutes+=(ySize/xSize)*1+1; } else minutes+=(ySize/xSize)*1+1; if(totalDimonds >6 && totalDimonds*.10 + seconds <= 60) minutes+=(ySize/xSize)*1+1; else { minutes+=1; } if(minutes ==0) minutes=2; }//end method public int getMinutes() { return minutes; } public int getSeconds() { return seconds; }}//end class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -