Skip to content

Commit

Permalink
Fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed Jul 21, 2024
1 parent 3969f13 commit 01ac6ff
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
9 changes: 8 additions & 1 deletion .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,11 @@ Lakos
Lomow
Sutter
ECS

Sams
Bjarne
Stroustrup
postconditions
Alexandrescu
invariants
modularity
SpriteBundle
14 changes: 7 additions & 7 deletions add_player_sprite.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn test_empty_app_has_no_players() {
}
```

This is the last time I will repeat tests that are indentical
This is the last time I will repeat tests that are identical
to earlier chapters: it is not worth the space in a book.
The fix is identical to the one shown in the previous chapter.

Expand Down Expand Up @@ -156,9 +156,9 @@ Here I unpack `add_player`:
- `translation: ..., scale: ..., ..default()`:
initialize the `translation` and `scale` fields with particular value,
keeping the others at default values. A translation is a relative (3D)
movement compared to the origin (i.e, at coordinat `(0, 0, 0)`)
movement compared to the origin (i.e, at coordinate `(0, 0, 0)`)
- `Vec2::extend(initial_player_position, 0.0)`: create a 3D coordinat,
by extending our 2D position with a z coordinat of zero
by extending our 2D position with a z coordinate of zero
- `Vec2::extend(initial_player_size, 1.0)`: create a 3D scale of the sprite,
by extending our 2D size with a z scale of one. A z scale of one means that
the sprite will have its regular scale
Expand Down Expand Up @@ -217,17 +217,17 @@ As we asked for a query matching the tuple `(&Transform, &Player)`,
our (single, thanks to `single`) result will be of the same type.
Of that tuple, we only keep the `Transform` and ignore the (empty) `Player`.

Of the `Transform`, we assume that the z coordinat is zero:
Of the `Transform`, we assume that the z coordinate is zero:
we are working on a 2D game after all! Instead of only assuming this to be
true, we can let Rust confirm this for real. The `assert` macros exist
to do exactly that. Hence, instead of commenting or documenting that the
z coordinat is zero, we `assert` this to be so.
z coordinate is zero, we `assert` this to be so.
Use assertions to document you assumptions `[Lakos, 1996]` `[McConnell, 2004a]`
`[Stroustrup, 1997]` `[Sutter & Alexandrescu, 2004]`.
Use assertions liberally `[Liberty, 2001]` `[Stroustrup, 2012]`.

Of the 3D `Transform` (with a z coordinat of zero),
we return the x and y coordinat of the translation.
Of the 3D `Transform` (with a z coordinate of zero),
we return the x and y coordinate of the translation.

## Fifth test: a player has a size

Expand Down
4 changes: 2 additions & 2 deletions add_player_sprite_with_texture.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ The `if` statement and its body are new, I unpack it here:
asset

A plugin is a combination of entities, components and systems that work
together to archieve a goal. It is a unit of modularity: you can put these
together to achieve a goal. It is a unit of modularity: you can put these
in a Rust crate and become part of the Bevy ecosystem.

With the `AssetPlugin` present, we need to initialize it to allow for
Expand Down Expand Up @@ -156,7 +156,7 @@ a structure for assets.

The creation of the player's `SpriteBundle` is similar too, except for
`texture: asset_server.load("bevy_bird_dark.png")`, where a texture is
loaded from file by the asser server. For this to work, that file (in this
loaded from file by the assets server. For this to work, that file (in this
case, `bevy_bird_dark.png`) must be present in the `assets` folder
of the Rust project.

Expand Down

0 comments on commit 01ac6ff

Please sign in to comment.