private static Random r = new Random(); //利用random
this(r.nextInt(Yard.ROWS-2) + 2, r.nextInt(Yard.COLS));// nextInt(int a) 在0 到a 范围内产生随机数
时间: 2024-12-16 18:14:26
private static Random r = new Random(); //利用random
this(r.nextInt(Yard.ROWS-2) + 2, r.nextInt(Yard.COLS));// nextInt(int a) 在0 到a 范围内产生随机数