public void run() { int j; while (true) { try { CountDownSem.acquire(); if (title.getTurn() == 0) // 刚开始游戏,初始化题目 { for (j = 0; j <= 5; j++) { if (!players[j].equals("虚位以待")) break; } title.setDrawer(players[j]); title.setId(j + 1); title.setTurn(1); title.randomkey(); broadcast(6, title); broadcast(11, scores); } broadcast(2, "-------回合开始-------\n"); timeVoid(); } catch (InterruptedException e) { e.printStackTrace(); } } }