Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
shramee committed Mar 15, 2024
1 parent 4afa59f commit 067e5f6
Show file tree
Hide file tree
Showing 22 changed files with 13 additions and 38 deletions.
2 changes: 1 addition & 1 deletion corelib/Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ version = 1

[[package]]
name = "core"
version = "2.4.1"
version = "2.5.3"
1 change: 0 additions & 1 deletion exercises/arrays/arrays3.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ fn test_arrays3() {
// You should not change the index accessed.
a.at(2);
}

3 changes: 1 addition & 2 deletions exercises/dict/dict1.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@

// I AM NOT DONE


fn create_dictionary() -> Felt252Dict<u32> {
let mut dict: Felt252Dict<u32> = Default::default();
//TODO
//TODO

}

Expand Down
3 changes: 1 addition & 2 deletions exercises/dict/dict2.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
// I AM NOT DONE



fn multiply_element_by_10(ref dict: Felt252Dict<u32>, n: usize) {
//TODO : make a function that multiplies the elements stored at the indexes 0 to n of a dictionary by 10


}

// Don't change anything in the test
Expand Down
11 changes: 3 additions & 8 deletions exercises/dict/dict3.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
// Make me compile and pass the test!
// Execute `starklings hint dict3` or use the `hint` watch subcommand for a hint.


// I AM NOT DONE


#[derive(Destruct)]
struct Team {
level: Felt252Dict<usize>,
players_count: usize
level: Felt252Dict<usize>,
players_count: usize
}

#[generate_trait]
Expand All @@ -41,11 +39,9 @@ impl TeamImpl of TeamTrait {
}



#[test]
#[available_gas(200000)]
fn test_add_player() {

let mut team = TeamTrait::new();
team.add_player('bob', 10);
team.add_player('alice', 20);
Expand All @@ -58,9 +54,8 @@ fn test_add_player() {
#[test]
#[available_gas(200000)]
fn test_level_up() {

let mut team = TeamTrait::new();
team.add_player('bobby',10);
team.add_player('bobby', 10);
team.level_up('bobby');

assert(team.level.get('bobby') == 11, 'Wrong level');
Expand Down
6 changes: 2 additions & 4 deletions exercises/enums/enums1.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

// I AM NOT DONE


use debug::PrintTrait;
enum Message { // TODO: define a few types of messages as used below
}
Expand All @@ -18,9 +17,8 @@ fn main() {
impl MessagePrintImpl of PrintTrait<Message> {
fn print(self: Message) {
match self {

Message::Quit => println!("Quit"),
Message::Echo => println!("Echo"),
Message::Quit => println!("Quit"),
Message::Echo => println!("Echo"),
Message::Move => println!("Move"),
Message::ChangeColor => println!("ChangeColor")
}
Expand Down
2 changes: 1 addition & 1 deletion exercises/enums/enums3.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Address all the TODOs to make the tests pass!
// Execute `starklings hint enums3` or use the `hint` watch subcommand for a hint.

// I AM NOT DONE print
// I AM NOT DONE

use debug::PrintTrait;

Expand Down
2 changes: 0 additions & 2 deletions exercises/functions/functions3.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@

// I AM NOT DONE


fn main() {
call_me();
}

fn call_me(num: u64) {

println!("num is {}", num);
}
1 change: 0 additions & 1 deletion exercises/functions/functions4.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

// I AM NOT DONE


fn main() {
let original_price = 51;
println!("sale_price is {}", sale_price(original_price));
Expand Down
1 change: 0 additions & 1 deletion exercises/if/if1.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ mod tests {
assert(42 == bigger(32, 42), '42 bigger than 32');
}
}

2 changes: 1 addition & 1 deletion exercises/if/if2.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ mod tests {
fn default_to_baz() {
assert(foo_if_fizz('literally anything') == 'baz', 'anything else returns baz');
}
}
}
1 change: 0 additions & 1 deletion exercises/intro/intro2.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
// This exercise won't compile... Can you make it compile?


fn main(){}
2 changes: 1 addition & 1 deletion exercises/loops/loops2.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ fn test_loop() {
};

assert(result == 5, 'result should be 5');
}
}
1 change: 0 additions & 1 deletion exercises/modules/modules1.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ mod tests {
assert(order_result == 'order_taken', 'Order not taken');
}
}

2 changes: 0 additions & 2 deletions exercises/primitive_types/primitive_types1.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

// I AM NOT DONE



fn main() {
// Booleans (`bool`)

Expand Down
2 changes: 0 additions & 2 deletions exercises/primitive_types/primitive_types2.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

// I AM NOT DONE



fn main() {
// A short string is a string whose length is at most 31 characters, and therefore can fit into a single field element.
// Short strings are actually felts, they are not a real string.
Expand Down
2 changes: 0 additions & 2 deletions exercises/primitive_types/primitive_types3.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

// I AM NOT DONE



fn main() {
let cat = ('Furry McFurson', 3);
let // your pattern here = cat;
Expand Down
1 change: 0 additions & 1 deletion exercises/quizs/quizs1.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ fn verify_test() {
assert(82 == price3, 'Incorrect price');
assert(130 == price4, 'Incorrect price');
}

1 change: 0 additions & 1 deletion exercises/starknet/basics/starknet4.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,3 @@ mod test {
contract0
}
}

2 changes: 1 addition & 1 deletion exercises/structs/structs3.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ fn calculate_transport_fees() {

assert(package.get_fees(cents_per_gram) == 4500, 'Wrong fees');
}

1 change: 0 additions & 1 deletion exercises/traits/traits3.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,3 @@ fn test_traits3() {
assert(dog.make_noise() == 'woof', 'Wrong noise');
assert(dog.get_distance() == 1, 'Wrong distance');
}

2 changes: 1 addition & 1 deletion exercises/variables/variables1.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Make me compile!
// Execute `starklings hint variables1` or use the `hint` watch subcommand for a hint.

// I AM NOT DONE
// I AM NOT DONE

use debug::PrintTrait;

Expand Down

0 comments on commit 067e5f6

Please sign in to comment.