slight adjustmentson the inputbuffer
This commit is contained in:
parent
cc811c93a2
commit
d6c35e24c5
@ -2,6 +2,7 @@ package input;
|
|||||||
|
|
||||||
public class InputBuffer {
|
public class InputBuffer {
|
||||||
|
|
||||||
|
private static final int numberOfInputs = 8;
|
||||||
private static final Boolean[] baseInputs = {false,false,false,false,false,false,false,false};
|
private static final Boolean[] baseInputs = {false,false,false,false,false,false,false,false};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,16 +32,19 @@ public class InputBuffer {
|
|||||||
public InputBuffer() {
|
public InputBuffer() {
|
||||||
this.size = 1;
|
this.size = 1;
|
||||||
this.pos = 0;
|
this.pos = 0;
|
||||||
this.inputList = new Boolean[1][8];
|
this.inputList = new Boolean[1][numberOfInputs];
|
||||||
setLatestInputs(baseInputs);
|
setLatestInputs(baseInputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public InputBuffer(int size) {
|
public InputBuffer(int size) {
|
||||||
this.size = size;
|
this.size = size;
|
||||||
this.pos = 0;
|
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];}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user