From 1fca99ae3c9548556b6f5c5f4fb2d0bb543a1fbd Mon Sep 17 00:00:00 2001 From: Daniel Lynn Date: Wed, 21 Jul 2021 18:19:33 -0500 Subject: [PATCH] Add rand crate --- Cargo.lock | 2 ++ Cargo.toml | 2 ++ src/main.rs | 1 + 3 files changed, 5 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 6253cae..192aa1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,6 +35,8 @@ name = "adventure-game" version = "0.1.0" dependencies = [ "bevy", + "getrandom", + "rand", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index d7006f6..05b14e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,8 @@ edition = "2018" [dependencies] bevy = { version = "0.5", features = ["dynamic"] } +rand = "0.8" +getrandom = { version = "0.2", features = ["wasm-bindgen"] } [profile.dev.package."*"] opt-level = 3 diff --git a/src/main.rs b/src/main.rs index 895ce0b..92dcbb4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,6 +14,7 @@ mod prelude { diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin}, prelude::*, }; + pub use rand::prelude::*; pub const MAP_WIDTH: i32 = 80; pub const MAP_HEIGHT: i32 = 50;