Skip to content

Commit

Permalink
Merge pull request #35 from credence0x/patch-1
Browse files Browse the repository at this point in the history
use correct command output
  • Loading branch information
ponderingdemocritus authored Aug 17, 2023
2 parents 1b84fef + 8c88279 commit 360bf23
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cairo/hello-dojo.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,14 @@ Now lets look at the next line:
let position = get!(ctx.world, ctx.origin, (Position));
```

Here we use `get!` [command](./commands.md) to retrieve the `Position` component for the `ctx.origin` entity. `ctx.origin` is the address of the caller. It will return:
Here we use `get!` [command](./commands.md) to retrieve the `Position` component for the `ctx.origin` entity. `ctx.origin` is the address of the caller. When called for the first time, it will return:

```rust,ignore
Moves { remaining: 10 }
Position {
player: 0x0, // zero address
x: 0,
y: 0
}
```

Now the next line:
Expand Down

0 comments on commit 360bf23

Please sign in to comment.