当前成功落下时才下
parent
45dfc21713
commit
429f53c7bb
|
@ -61,16 +61,18 @@ public class UserThread extends Thread{
|
|||
NewClick newClick = (NewClick) o;
|
||||
|
||||
if (newClick.color == (cur.get() ? Cross.BLACK : Cross.WHITE) && newClick.color == self){
|
||||
CalDataUtil.draw(newClick, map);
|
||||
cur.set(!cur.get());
|
||||
boolean result = CalDataUtil.draw(newClick, map);
|
||||
if (result) {
|
||||
cur.set(!cur.get());
|
||||
|
||||
users.forEach(u -> {
|
||||
try {
|
||||
if (u.isAlive) u.sendMsg(DataUtil.parseData(map, newClick));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
users.forEach(u -> {
|
||||
try {
|
||||
if (u.isAlive) u.sendMsg(DataUtil.parseData(map, newClick));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (Exception e){
|
||||
System.out.println("::" + e.getMessage());
|
||||
|
|
Loading…
Reference in New Issue