first commit

This commit is contained in:
Stefano Rossi 2025-07-10 03:45:41 +02:00
commit b827bb4ce6
Signed by: chadmin
GPG key ID: 9EFA2130646BC893
14 changed files with 673 additions and 0 deletions

35
GoL3D1/thread.pde Normal file
View file

@ -0,0 +1,35 @@
public class thVita extends Thread {
private boolean running;
private int wait;
public thVita () {
running = true;
this.wait = round((1/csAgg.getValueF())*1000);
this.start();
}
boolean isRunning(){
return this.running;
}
public void setWait(int wait){
this.wait = wait;
//println(wait);
}
void run () {
//apro il socket
while (running) {
try {
//println("agg");
getFate();
Thread.sleep(wait); // 1/40 di secondo
setFate();
}
catch(InterruptedException e) {
running = false;
}
}
}
}