diff --git a/src/components/drug.cairo b/src/components/drug.cairo index 678d547f7..3215e51db 100644 --- a/src/components/drug.cairo +++ b/src/components/drug.cairo @@ -1,5 +1,3 @@ -use array::{ArrayTrait, SpanTrait}; -use traits::{Into, TryInto}; use starknet::ContractAddress; #[derive(Component, Copy, Drop, Serde, SerdeLen)] @@ -16,14 +14,7 @@ struct Drug { #[generate_trait] impl DrugImpl of DrugTrait { fn all() -> Span { - let mut drugs = array::ArrayTrait::new(); - drugs.append('Acid'.into()); - drugs.append('Weed'.into()); - drugs.append('Ludes'.into()); - drugs.append('Speed'.into()); - drugs.append('Heroin'.into()); - drugs.append('Cocaine'.into()); - + let mut drugs = array!['Acid', 'Weed', 'Ludes', 'Speed', 'Heroin', 'Cocaine']; drugs.span() } } diff --git a/src/components/game.cairo b/src/components/game.cairo index b13222e8d..212c0374a 100644 --- a/src/components/game.cairo +++ b/src/components/game.cairo @@ -1,5 +1,3 @@ -use box::BoxTrait; -use traits::Into; use starknet::ContractAddress; #[derive(Component, Copy, Drop, Serde)] diff --git a/src/components/location.cairo b/src/components/location.cairo index 4364a5c41..b9eff9b60 100644 --- a/src/components/location.cairo +++ b/src/components/location.cairo @@ -1,6 +1,3 @@ -use array::{ArrayTrait, SpanTrait}; -use option::OptionTrait; -use traits::{Into, TryInto}; use starknet::ContractAddress; struct Location {} @@ -8,14 +5,9 @@ struct Location {} #[generate_trait] impl LocationImpl of LocationTrait { fn all() -> Span { - let mut locations = array::ArrayTrait::new(); - locations.append('Queens'.into()); - locations.append('The Bronx'.into()); - locations.append('Brooklyn'.into()); - locations.append('Jersey City'.into()); - locations.append('Central Park'.into()); - locations.append('Coney Island'.into()); - + let mut locations = array![ + 'Queens', 'The Bronx', 'Brooklyn', 'Jersey City', 'Central Park', 'Coney Island' + ]; locations.span() } diff --git a/src/components/market.cairo b/src/components/market.cairo index 23411d046..2bb92aadd 100644 --- a/src/components/market.cairo +++ b/src/components/market.cairo @@ -1,7 +1,3 @@ -use traits::{Into, TryInto}; -use option::OptionTrait; -use debug::PrintTrait; - use rollyourown::constants::SCALING_FACTOR; #[derive(Component, Copy, Drop, Serde)] diff --git a/src/components/risks.cairo b/src/components/risks.cairo index 00d29c1ee..9173e0823 100644 --- a/src/components/risks.cairo +++ b/src/components/risks.cairo @@ -1,7 +1,4 @@ -use traits::{Into, TryInto}; -use option::OptionTrait; use debug::PrintTrait; - use rollyourown::constants::{ SCALING_FACTOR, COPS_DRUG_THRESHOLD, GANGS_CASH_THRESHOLD, ENCOUNTER_BIAS_GANGS }; diff --git a/src/systems/create.cairo b/src/systems/create.cairo index 078396a42..e1adf1ba1 100644 --- a/src/systems/create.cairo +++ b/src/systems/create.cairo @@ -1,10 +1,5 @@ #[system] mod create_game { - use array::ArrayTrait; - use array::SpanTrait; - use box::BoxTrait; - use option::OptionTrait; - use traits::{Into, TryInto}; use starknet::ContractAddress; use dojo::world::Context; diff --git a/src/systems/decide.cairo b/src/systems/decide.cairo index fdf5607dc..ba8a7d0b7 100644 --- a/src/systems/decide.cairo +++ b/src/systems/decide.cairo @@ -1,8 +1,5 @@ #[system] mod decide { - use array::ArrayTrait; - use box::BoxTrait; - use traits::{Into, TryInto}; use starknet::ContractAddress; use dojo::world::Context; diff --git a/src/systems/join.cairo b/src/systems/join.cairo index 5c6c7e1ab..95132a026 100644 --- a/src/systems/join.cairo +++ b/src/systems/join.cairo @@ -1,8 +1,5 @@ #[system] mod join_game { - use traits::Into; - use box::BoxTrait; - use array::ArrayTrait; use starknet::ContractAddress; use dojo::world::Context; diff --git a/src/systems/set_name.cairo b/src/systems/set_name.cairo index 2dbc455b1..78f6c9632 100644 --- a/src/systems/set_name.cairo +++ b/src/systems/set_name.cairo @@ -1,8 +1,5 @@ #[system] mod set_name { - use array::ArrayTrait; - use traits::Into; - use dojo::world::Context; use rollyourown::components::game::Game; use rollyourown::components::name::Name; diff --git a/src/systems/trade.cairo b/src/systems/trade.cairo index 2e0c11ede..924e53867 100644 --- a/src/systems/trade.cairo +++ b/src/systems/trade.cairo @@ -1,8 +1,5 @@ #[system] mod buy { - use traits::Into; - use array::ArrayTrait; - use debug::PrintTrait; use starknet::ContractAddress; use dojo::world::Context; @@ -76,8 +73,6 @@ mod buy { #[system] mod sell { - use traits::Into; - use array::ArrayTrait; use starknet::ContractAddress; use dojo::world::Context; diff --git a/src/systems/travel.cairo b/src/systems/travel.cairo index 20c246dd9..31c269c83 100644 --- a/src/systems/travel.cairo +++ b/src/systems/travel.cairo @@ -1,10 +1,6 @@ #[system] mod travel { - use traits::Into; - use box::BoxTrait; - use array::ArrayTrait; use starknet::ContractAddress; - use debug::PrintTrait; use dojo::world::{Context}; @@ -84,6 +80,7 @@ mod travel { } use dojo::world::{Context, IWorld, IWorldDispatcher, IWorldDispatcherTrait}; + use rollyourown::components::drug::{Drug, DrugTrait}; use rollyourown::components::location::{Location, LocationTrait}; use rollyourown::components::market::{Market, MarketTrait};