Added some classes, Implemented a class that creates random strings

This commit is contained in:
WickedJack99
2022-05-21 03:10:29 +02:00
parent 600a7f2053
commit 798f32e2a7
14 changed files with 260 additions and 13 deletions

View File

@@ -0,0 +1,35 @@
package Controller;
import java.util.concurrent.ConcurrentLinkedQueue;
import Model.ModelData;
import Model.MyModel;
import View.MyView;
public class Main {
public static void main(String[] args) {
ConcurrentLinkedQueue<Integer> qCommands = new ConcurrentLinkedQueue<Integer>();
ConcurrentLinkedQueue<ModelData> qDataFromModel = new ConcurrentLinkedQueue<ModelData>();
Object oThreadLock = new Object();
MyModel oModel = new MyModel(oThreadLock, qDataFromModel);
ModelData oModelData = new ModelData("");
MyView oView = new MyView(oModelData);
oModel.start();
while (true) {
//Wake up model thread if new task to execute.
synchronized(oThreadLock) {
oThreadLock.notifyAll();
}
}
}
}