Skip to content

Commit

Permalink
chore: remove unecessaty imports
Browse files Browse the repository at this point in the history
  • Loading branch information
notV4l committed Sep 20, 2023
1 parent c3e05a6 commit 4c00b20
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 53 deletions.
11 changes: 1 addition & 10 deletions src/components/drug.cairo
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use array::{ArrayTrait, SpanTrait};
use traits::{Into, TryInto};
use starknet::ContractAddress;

#[derive(Component, Copy, Drop, Serde, SerdeLen)]
Expand All @@ -16,14 +14,7 @@ struct Drug {
#[generate_trait]
impl DrugImpl of DrugTrait {
fn all() -> Span<felt252> {
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()
}
}
2 changes: 0 additions & 2 deletions src/components/game.cairo
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use box::BoxTrait;
use traits::Into;
use starknet::ContractAddress;

#[derive(Component, Copy, Drop, Serde)]
Expand Down
14 changes: 3 additions & 11 deletions src/components/location.cairo
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
use array::{ArrayTrait, SpanTrait};
use option::OptionTrait;
use traits::{Into, TryInto};
use starknet::ContractAddress;

struct Location {}

#[generate_trait]
impl LocationImpl of LocationTrait {
fn all() -> Span<felt252> {
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()
}

Expand Down
4 changes: 0 additions & 4 deletions src/components/market.cairo
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
use traits::{Into, TryInto};
use option::OptionTrait;
use debug::PrintTrait;

use rollyourown::constants::SCALING_FACTOR;

#[derive(Component, Copy, Drop, Serde)]
Expand Down
3 changes: 0 additions & 3 deletions src/components/risks.cairo
Original file line number Diff line number Diff line change
@@ -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
};
Expand Down
5 changes: 0 additions & 5 deletions src/systems/create.cairo
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 0 additions & 3 deletions src/systems/decide.cairo
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#[system]
mod decide {
use array::ArrayTrait;
use box::BoxTrait;
use traits::{Into, TryInto};
use starknet::ContractAddress;

use dojo::world::Context;
Expand Down
3 changes: 0 additions & 3 deletions src/systems/join.cairo
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#[system]
mod join_game {
use traits::Into;
use box::BoxTrait;
use array::ArrayTrait;
use starknet::ContractAddress;

use dojo::world::Context;
Expand Down
3 changes: 0 additions & 3 deletions src/systems/set_name.cairo
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
5 changes: 0 additions & 5 deletions src/systems/trade.cairo
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#[system]
mod buy {
use traits::Into;
use array::ArrayTrait;
use debug::PrintTrait;
use starknet::ContractAddress;

use dojo::world::Context;
Expand Down Expand Up @@ -76,8 +73,6 @@ mod buy {

#[system]
mod sell {
use traits::Into;
use array::ArrayTrait;
use starknet::ContractAddress;

use dojo::world::Context;
Expand Down
5 changes: 1 addition & 4 deletions src/systems/travel.cairo
Original file line number Diff line number Diff line change
@@ -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};

Expand Down Expand Up @@ -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};
Expand Down

0 comments on commit 4c00b20

Please sign in to comment.