You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tank/src/main/java/com/msb/TankDemo.java

21 lines
523 B

package com.msb;
/**
* @Author bingor
* @Date 2022-09-29 11:02
* @Description: com.msb
* @Version: 1.0
*/
public class TankDemo {
public static void main(String[] args) throws InterruptedException {
TankFrame tankFrame = new TankFrame();
//现实当中,虽然可以过按键来改变方块的坐标并且重新刷新画板来实现移动,但是敌方的坦克应该是自动在跑
while (true) {
Thread.sleep(50);
tankFrame.repaint();
}
}
}