This repository was archived by the owner on Aug 17, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMaps.java
More file actions
96 lines (86 loc) · 2.72 KB
/
Copy pathMaps.java
File metadata and controls
96 lines (86 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
public class Maps{
public static void main(String[] args) {
int d = Integer.parseInt(args[0]);
StdOut.println("69 0 0 " + d);
for (int j = -d; j < d + 1; j++) {
for (int i = -d; i < d; i++) {
StdOut.println("true" + " " + (i) + " " + j + " " + (1 + i) + " " + j + " " + "1" + " " + "1" + " " + "15");
StdOut.println("true" + " " + (i+1) + " " + j + " " + (i) + " " + j + " " + "1" + " " + "1" + " " + "15");
}
}
for (int i = -d; i < d + 1; i++) {
for (int j = -d; j < d; j++) {
StdOut.println("false" + " " + (i) + " " + (j) + " " + (i) + " " + (j+1) + " " + "1" + " " + "1" + " " + "15");
StdOut.println("false" + " " + (i) + " " + (j+1) + " " + (i) + " " + (j) + " " + "1" + " " + "1" + " " + "15");
}
}
// int N = Integer.parseInt(args[0]);
// boolean orientation = true;
// double dimension = 20;
// double fromx = 0;
// double fromy = 0;
// double tox = 0;
// double toy = 0;
// double w = 1;
// double h = 1;
// double cap = 15;
// double lr;
// double ud;
//
// for (int i = 0; i < N; i++) {
// lr = Math.random();
// ud = Math.random();
//
// if (lr >= 0.5 && orientation) {
//
// if (ud >= 0.5) {
// tox = fromx;
// toy += 1;
// }
// else {
// tox = fromx;
// toy -= 1;
// }
// orientation = !orientation;
// }
// else if (lr < 0.5 && orientation) {
//
// if (ud >= 0.5) {
// fromx = tox;
// toy += 1;
// }
// else {
// fromx = tox;
// toy -= 1;
// }
// orientation = !orientation;
// }
// else if (lr < 0.5 && !orientation) {
//
// if (ud >= 0.5) {
// tox -= 1;
// toy = fromy;
// }
// else {
// tox += 1;
// toy = fromy;
// }
// orientation = !orientation;
// }
// else if (lr >= 0.5 && orientation) {
//
// if (ud >= 0.5) {
// tox -= 1;
// toy = fromy;
// }
// else {
// tox += 1;
// toy = fromy;
// }
// orientation = !orientation;
// }
//
//
// StdOut.println(!orientation + " " + fromx + " " + fromy + " " + tox + " " + toy + " " + w + " " + h + " " + cap);
}
}