summaryrefslogtreecommitdiff
path: root/src/com/encrox/cplot/constants/Direction.java
blob: 11b1932560150040df0fdaaa2edf5172b3f7e57d (plain)
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
package com.encrox.cplot.constants;

public class Direction {
	
	public static final byte NORTH = 0;
	public static final byte SOUTH = 1;
	public static final byte EAST = 2;
	public static final byte WEST = 3;
	public static final byte UP = 4;
	public static final byte DOWN = 5;
	
	public static byte getDirection(String label) {
		switch(label.toLowerCase()) {
		case "north":
			return NORTH;
		case "south":
			return SOUTH;
		case "east":
			return EAST;
		case "west":
			return WEST;
		case "up":
			return UP;
		case "down":
			return DOWN;
		}
		return -1;
	}

}