MCPcopy Create free account
hub / github.com/TanaStudy/Java-Study / go

Method go

8. Demo/Java/src/main/LeetCode/Tetris/Main.java:82–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80 }
81 /*开始游戏*/
82 public void go() {// 开始游戏
83 while (true) {//游戏开始直到游戏失败才结束,否则一直执行
84 if (running == false) {//如果游戏失败
85 break;
86 }
87 ranRect();// 绘制下落方格形状
88 start();// 开始游戏
89 }
90 label1.setText("游戏结束!");//则游戏结束
91 }
92 /*绘制下落方格形状*/
93 public void ranRect() {
94 rect = allRect[(int) (Math.random() * 19)];// 随机生成方块类型(共7种,19个形状)

Callers 5

mainMethod · 0.95
router.jsFile · 0.80
router.jsFile · 0.80
router.jsFile · 0.80

Calls 2

ranRectMethod · 0.95
startMethod · 0.95

Tested by

no test coverage detected