Created
November 12, 2017 16:33
-
-
Save xomachine/75f9ef4205119db113d132b9885179d6 to your computer and use it in GitHub Desktop.
Buggy example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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