Skip to content

Instantly share code, notes, and snippets.

@xomachine
Created November 12, 2017 16:33
Show Gist options
  • Save xomachine/75f9ef4205119db113d132b9885179d6 to your computer and use it in GitHub Desktop.
Save xomachine/75f9ef4205119db113d132b9885179d6 to your computer and use it in GitHub Desktop.
Buggy example
type ActionType* = enum
NONE = 0
CLEAR_AND_SELECT = 1
ADD_TO_SELECTION = 2
DESELECT = 3
ASSIGN = 4
DISMISS = 5
DISBAND = 6
MOVE = 7
ROTATE = 8
SCALE = 9
SETUP_VEHICLE_PRODUCTION = 10
from VehicleType import VehicleType
from ActionType import ActionType
type Move* = object
case exists*: bool
of true:
action*: ActionType
group*: int32
left*: float64
top*: float64
right*: float64
bottom*: float64
x*: float64
y*: float64
angle*: float64
factor*: float64
maxSpeed*: float64
maxAngularSpeed*: float64
vehicleType*: VehicleType
facilityId*: int64
else: discard
type VehicleType* = enum
ARRV = 0
FIGHTER = 1
HELICOPTER = 2
IFV = 3
TANK = 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment