File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
sdk/src/main/server-api/sc/api/plugins Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ package sc.api.plugins
33import com.thoughtworks.xstream.annotations.XStreamAlias
44import kotlin.random.Random
55
6+ /* * Directions for a field of squares.
7+ * Coordinates increment upwards. */
68@XStreamAlias(value = " direction" )
79enum class Direction (val vector : Vector ): IVector by vector {
810 UP (Vector (0 , 1 )),
@@ -23,6 +25,12 @@ enum class Direction(val vector: Vector): IVector by vector {
2325 get() = Vector (- vector.dx, - vector.dy)
2426}
2527
28+ /* *
29+ * Double-width Directions for a field made of hexagons.
30+ * https://www.redblobgames.com/grids/hexagons/#coordinates-doubled
31+ *
32+ * Coordinates increment downwards.
33+ */
2634enum class HexDirection (val vector : Vector ): IVector by vector {
2735 RIGHT (Vector (+ 2 , 0 )),
2836 DOWN_RIGHT (Vector (+ 1 , + 1 )),
You can’t perform that action at this time.
0 commit comments