Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 1; i <= count; i++) {
- int second = 1;
- System.out.println();
- System.out.println("i=" + i);
- for (int k = 1; k <= right[i - 1]; k++) {
- System.out.println("k=" + k);
- indexes[i-1] = getIndex(i, second);
- System.out.println(indexes[i - 1]);
- second++;
- }
- for (int k = 1; k <= straight[i - 1]; k++) {
- indexes[i-1] = getIndex(i, second);
- System.out.println(indexes[i - 1]);
- second++;
- }
- for (int k = 1; k <= left[i - 1]; k++) {
- indexes[i-1] = getIndex(i, second);
- System.out.println(indexes[i - 1]);
- second++;
- }
- if (configuration.getPedestrianCount() != 0) {
- for (int k = 1; k <= pedestrian[i - 1]; k++) {
- indexes[i-1] = getIndex(i, second);
- System.out.println(indexes[i - 1]);
- second++;
- }
- }
- }
- System.out.println("INDEXES ARRAY");
- for (int i = 0; i < indexes.length; i++) {
- System.out.println(indexes[i]);
- }
- OUTPUT:
- i=1
- k=1
- 11
- 12
- 13
- i=2
- k=1
- 21
- 22
- 23
- i=3
- k=1
- 31
- 32
- 33
- i=4
- k=1
- 41
- 42
- 43
- INDEXES ARRAY
- 13
- 23
- 33
- 43
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement