Skip to content

Commit

Permalink
fix: added conditional for windows build directories (#2)
Browse files Browse the repository at this point in the history
* docs: Added shields

* fix: added conditional for windows build directories

* docs: clarified documentation

* chore: linting
  • Loading branch information
pbellchambers authored Feb 3, 2021
1 parent bed0ba7 commit a4238d8
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,32 @@ jobs:
- name: Format Check
run: cargo fmt -- --check --verbose
- name: Lint Check
run: cargo clippy --verbose
run: cargo clippy -p rustybox -- --verbose -D warnings
- name: Test
run: cargo test --verbose
- name: Build Release
run: cargo build --release --verbose
- name: Upload Artifact
- name: Upload Artifact (ubuntu)
if: ${{ matrix.build == 'ubuntu' }}
uses: actions/[email protected]
with:
name: rustybox-${{ matrix.build }}
path: target/release/rustybox
- name: Upload Artifact (macos)
if: ${{ matrix.build == 'macos' }}
uses: actions/[email protected]
with:
name: rustybox-${{ matrix.build }}
path: target/release/rustybox
- name: Upload Artifact (win32)
if: ${{ matrix.build == 'win32' }}
uses: actions/[email protected]
with:
name: rustybox-${{ matrix.build }}
path: target\release\rustybox.exe
- name: Upload Artifact (win64)
if: ${{ matrix.build == 'win64' }}
uses: actions/[email protected]
with:
name: rustybox-${{ matrix.build }}
path: target\release\rustybox.exe
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# rustybox
Mostly a sandbox for learning rust.
Mostly a sandbox for learning rust. Currently produces a console program that allows a player to move around a box with arrow keys.

Currently produces a console program that allows a player to move around a box with arrow keys.
[![Build status](https://img.shields.io/github/workflow/status/pbellchambers/rustybox/CI/main)](https://github.com/pbellchambers/rustybox/actions)
[![Downloads](https://img.shields.io/github/downloads/pbellchambers/rustybox/total)](https://github.com/pbellchambers/rustybox/releases)
![License](https://img.shields.io/github/license/pbellchambers/rustybox?color=blue)


## Usage
Run `rustybox` from the command line.

Use arrow keys to move around.
4 changes: 2 additions & 2 deletions src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fn update_entities(
entity_map: &mut HashMap<Uuid, Entity>,
viewport: &Viewport,
) {
for (_, entity) in entity_map {
for entity in entity_map.values_mut() {
match entity {
Entity::Player(ref mut player) => update_player_location(player, &console, &viewport),
}
Expand Down Expand Up @@ -70,7 +70,7 @@ fn check_lower_bounds(boundary: u32, current_location: i32, movement: i32) -> i3
}

fn draw_entities(console: &mut ConsoleEngine, entity_map: &HashMap<Uuid, Entity>) {
for (_, entity) in entity_map {
for entity in entity_map.values() {
match entity {
Entity::Player(player) => console.print(
player.location.x,
Expand Down

0 comments on commit a4238d8

Please sign in to comment.