Some Update and Save before making dangerous changes
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
# Auto detect text data and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
# BlueJ data
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
|
||||
@@ -3,7 +3,7 @@ MIT License
|
||||
Copyright (c) 2021 Noah
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
of this software and associated documentation data (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
|
||||
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
-1257
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 7.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.8 KiB |
@@ -2,6 +2,7 @@ package game;
|
||||
|
||||
import gui.GUI;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class Control {
|
||||
@@ -166,6 +167,32 @@ public class Control {
|
||||
|
||||
}
|
||||
|
||||
// public void checkN(Cell[][] arr, Cell[][] futureGen, int columns, int rows) {
|
||||
// ArrayList<Thread> threads = new ArrayList<>();
|
||||
// final int NUM_OF_THREADS = 8; //Or can be passed as an argument
|
||||
// for (int tid = 0; tid < NUM_OF_THREADS; tid++) {
|
||||
// Integer thread_local_row_start = tid * rows / NUM_OF_THREADS;
|
||||
// Integer thread_local_row_end = (tid + 1) * rows / NUM_OF_THREADS;
|
||||
// Thread t = new Thread(() -> {
|
||||
// for (int row = thread_local_row_start; row < thread_local_row_end; row++) {
|
||||
// for (int column = 0; column < columns; column++) {
|
||||
// countNeighbors(arr, row, column, rows, columns);
|
||||
// evaluateNeighbors(arr[row][column], futureGen[row][column]);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// t.start();
|
||||
// threads.add(t);
|
||||
// }
|
||||
// for (Thread t : threads) {
|
||||
// try {
|
||||
// t.join();
|
||||
// } catch (InterruptedException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
public boolean[][] nextGenBackup() {
|
||||
|
||||
gen++;
|
||||
|
||||
Reference in New Issue
Block a user