slight adjustmentson the inputbuffer

This commit is contained in:
no 2021-05-27 13:03:29 +02:00
parent cc811c93a2
commit d6c35e24c5

View File

@ -2,6 +2,7 @@ package input;
public class InputBuffer {
private static final int numberOfInputs = 8;
private static final Boolean[] baseInputs = {false,false,false,false,false,false,false,false};
/**
@ -31,16 +32,19 @@ public class InputBuffer {
public InputBuffer() {
this.size = 1;
this.pos = 0;
this.inputList = new Boolean[1][8];
this.inputList = new Boolean[1][numberOfInputs];
setLatestInputs(baseInputs);
}
public InputBuffer(int size) {
this.size = size;
this.pos = 0;
this.inputList = new Boolean[this.size][8];
this.inputList = new Boolean[this.size][numberOfInputs];
for(int i = 0; i < this.size; i++) {this.inputList[i] = baseInputs;}
for(int i = 0; i < this.size; i++) {
for(int j = 0; j < numberOfInputs; j++) {
this.inputList[i][j] = baseInputs[j];}
}
}