-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObjectTrackerParser.java
More file actions
40 lines (32 loc) · 997 Bytes
/
ObjectTrackerParser.java
File metadata and controls
40 lines (32 loc) · 997 Bytes
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
public class ObjectTrackerParser {
// Ignore this
public static void main(String[] args) throws Exception {
ObjectTrackerParser parser = new ObjectTrackerParser();
try {
parser.run(args);
} catch(Exception ex) {
throw (ex);
}
}
public void run (String[] args) throws Exception
{
// Ignore this
Jevois jevois = new Jevois();
// Read in the Jevois string
String jevoisString = jevois.readString();
// Parse the information
String[] inputs = jevoisString.split(" ");
// Strongly type the coordinates
int x = Integer.parseInt(inputs[1]);
int y = Integer.parseInt(inputs[2]);
// Display the coordinates
System.out.println("x: " + x);
System.out.print("y: " + y);
}
// Fake the Jevois class
private class Jevois {
public String readString() {
return "T2 666 -666";
}
}
}