This commit is contained in:
commit
568474d52f
1591 files changed
+528213
No files matched your search
Generated
+14
@@ -0,0 +1,14 @@
|
||||
struct RobotConfig(Copyable):
|
||||
var max_speed: Int
|
||||
var wheel_radius: Int
|
||||
var num_sensors: Int
|
||||
|
||||
def __init__(out self, max_speed: Int, wheel_radius: Int, num_sensors: Int):
|
||||
self.max_speed = max_speed
|
||||
self.wheel_radius = wheel_radius
|
||||
self.num_sensors = num_sensors
|
||||
|
||||
|
||||
def main():
|
||||
comptime field_count = reflect[RobotConfig].num_fields()
|
||||
print("RobotConfig fields:", field_count)
|
||||
Reference in new issue
Block a user