Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Dec 2, 2024
1 parent f060975 commit 70b3eb3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
6 changes: 3 additions & 3 deletions examples/spawn-and-move/manifest_dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -1252,8 +1252,8 @@
},
"contracts": [
{
"address": "0x2e0a8cf3c5d1bc2a4f3ad4e401b50c9b19c490e5b33bfd333d73b3c72669b7f",
"class_hash": "0x40aa706a235ab9f4ce4c415e140856e737834de42978cecd96bf2f647ff2957",
"address": "0x7e8a52c68b243d3a86a55c04ccec2edc760252d5952566d3af4001bd6cf38f3",
"class_hash": "0x636c2cf31b094097625cb5ada96f54ee9a3f7bc6d8cde00cc85e5ef0c622c8b",
"abi": [
{
"type": "impl",
Expand Down Expand Up @@ -2167,7 +2167,7 @@
},
{
"members": [],
"class_hash": "0x78a98614cad448d6a653492736190834e0318f7330e67c648a8d06ebb387460",
"class_hash": "0x77018639b9a36824fe474c7c2b2ba7b9ef0f30fa54be1d1f62037dbfc01a89b",
"tag": "ns-PlayerConfig",
"selector": "0x3bea561c3e142a660a00d1471d7712b70695dc4ee3b173aeaefd5178f7a21af"
},
Expand Down
11 changes: 3 additions & 8 deletions examples/spawn-and-move/src/actions.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ pub mod actions {
name: "hello",
items: array![],
favorite_item: Option::None,
test: array![],
test_tuple: (1, 2, PlayerItem { item_id: 1, quantity: 100, score: 150, test: (1, 2) })
};

let mut world = self.world_default();
Expand Down Expand Up @@ -125,14 +123,11 @@ pub mod actions {
let player = get_caller_address();

let items = array![
PlayerItem { item_id: 1, quantity: 100, score: 150, test: (1, 2) },
PlayerItem { item_id: 2, quantity: 50, score: -32, test: (3, 4) }
PlayerItem { item_id: 1, quantity: 100, score: 150 },
PlayerItem { item_id: 2, quantity: 50, score: -32 }
];

let item = items[0].clone();
let config = PlayerConfig { player, name, items, favorite_item: Option::Some(1), test: array![
array![Option::Some(item)],
], test_tuple: (1, 2, item) };
let config = PlayerConfig { player, name, items, favorite_item: Option::Some(1) };
world.write_model(@config);
}

Expand Down
3 changes: 0 additions & 3 deletions examples/spawn-and-move/src/models.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ pub struct PlayerItem {
pub item_id: u32,
pub quantity: u32,
pub score: i32,
pub test: (u32, u32),
}

#[derive(Drop, Serde)]
Expand All @@ -86,8 +85,6 @@ pub struct PlayerConfig {
pub name: ByteArray,
pub items: Array<PlayerItem>,
pub favorite_item: Option<u32>,
pub test: Array<Array<Option<PlayerItem>>>,
pub test_tuple: (u32, u32, PlayerItem),
}

#[derive(Drop, Serde)]
Expand Down

0 comments on commit 70b3eb3

Please sign in to comment.