📄 stringtools.java
字号:
/** /??
字符显示类?/ */
public class StringTools {
/** /?? 定义数字 ?/ */
private static final int N10 = 10;
/** /?? 定义数字 ?/ */
private static final int N16 = 16;
/** /?? 定义数字 ?/ */
private static final int N20 = 20;
/** /?? 定义数字 ?/ */
private static final int N25 = 25;
/** /?? 定义数字 ?/ */
private static final int N30 = 30;
/** /?? 定义数字 ?/ */
private static final int N40 = 40;/** /?? 构造函数 ?/ */ protected StringTools() { }
/** /?? 控制字符显示
?@param gameTime
?@return result ?/ */
protected static String checkTime(final long gameTime) {
String result = null;
if (gameTime <= N10) {
result = "Do you play with your foot?";
}
if (N10 < gameTime && gameTime <= N16) {
result = "come boy,you can do it!";
}
if (N16 < gameTime && gameTime <= N20) {
result = "what a pity!try again.";
}
if (N20 < gameTime && gameTime <= N25) {
result = "very well,you are a real man.";
}
if (N25 < gameTime && gameTime <= N30) {
result = "i know you have talent of this game.";
}
if (N30 < gameTime && gameTime <= N40) {
result = "i can't belive,you are a game master.";
}
if (gameTime > N40) {
result = "oh my god, are you a human?";
}
return result;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -