

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: SnekObjects
incomplete
2: Integer
incomplete
3: Float
incomplete
4: String
incomplete
5: Vector3
incomplete
6: Array
incomplete
7: Set
incomplete
8: Get
incomplete
9: Length
incomplete
10: Add
incomplete
This lesson's interactive features are locked, please to keep using them
Let's start simple with a single integer object. The difference between a "snek integer" and a regular C integer is that the Snek integer:
Complete the new_snek_integer function in snekobject.c. It should:
If you're curious how this will be used, take a look at the main.c file (where the tests are). You'll see some code that looks like this:
snek_object_t *int_object = new_snek_integer(42);