@@ -327,7 +327,6 @@ fn _duel(
327
327
};
328
328
let battle = Battle {
329
329
game_id : 0 ,
330
- nonce : 0 ,
331
330
battle_id : battle_id ,
332
331
tx_hash : 0 ,
333
332
duel_id : duel_id ,
@@ -349,7 +348,6 @@ fn _duel(
349
348
let offensive_value = * offensive . pop_front (). unwrap ();
350
349
let battle = Battle {
351
350
game_id : 0 ,
352
- nonce : 0 ,
353
351
battle_id : battle_id ,
354
352
tx_hash : 0 ,
355
353
duel_id : duel_id ,
@@ -370,7 +368,6 @@ fn _duel(
370
368
let defensive_value = * defensive . pop_front (). unwrap ();
371
369
let battle = Battle {
372
370
game_id : 0 ,
373
- nonce : 0 ,
374
371
battle_id : battle_id ,
375
372
tx_hash : 0 ,
376
373
duel_id : duel_id ,
@@ -480,7 +477,9 @@ fn _connected_iter(
480
477
}
481
478
return _connected_iter (target , owner , tiles , ref visiteds , ref unvisiteds );
482
479
},
483
- Option :: None => { return false ; },
480
+ Option :: None => {
481
+ return false ;
482
+ },
484
483
}
485
484
}
486
485
@@ -507,7 +506,9 @@ fn _owned_dedup(ref array: Span<u8>, tiles: Span<Tile>, drops: Span<u8>, owner:
507
506
result . append (element );
508
507
};
509
508
},
510
- Option :: None => { break ; },
509
+ Option :: None => {
510
+ break ;
511
+ },
511
512
};
512
513
};
513
514
result . span ()
@@ -661,7 +662,9 @@ mod tests {
661
662
break index ;
662
663
};
663
664
},
664
- Option :: None => { panic (array! [' Tile: foreigner not found' ]); },
665
+ Option :: None => {
666
+ panic (array! [' Tile: foreigner not found' ]);
667
+ },
665
668
};
666
669
};
667
670
let mut to = TileTrait :: new (GAME_ID , * index , 2 , PLAYER_1 );
@@ -765,10 +768,14 @@ mod tests {
765
768
let mut allies = config :: neighbors (attacker . id). expect (' Tile: invalid id' );
766
769
let index = loop {
767
770
match allies . pop_front () {
768
- Option :: Some (index ) => { if index != @ defender . id {
769
- break index ;
770
- }; },
771
- Option :: None => { panic (array! [' Tile: ally not found' ]); },
771
+ Option :: Some (index ) => {
772
+ if index != @ defender . id {
773
+ break index ;
774
+ };
775
+ },
776
+ Option :: None => {
777
+ panic (array! [' Tile: ally not found' ]);
778
+ },
772
779
};
773
780
};
774
781
let mut ally = TileTrait :: new (GAME_ID , * index , 2 , PLAYER_1 );
@@ -852,7 +859,9 @@ mod tests {
852
859
break index ;
853
860
};
854
861
},
855
- Option :: None => { panic (array! [' Tile: foreigner not found' ]); },
862
+ Option :: None => {
863
+ panic (array! [' Tile: foreigner not found' ]);
864
+ },
856
865
};
857
866
};
858
867
let mut foreigner = TileTrait :: new (GAME_ID , * index , 2 , PLAYER_2 );
@@ -946,7 +955,9 @@ mod tests {
946
955
break index ;
947
956
};
948
957
},
949
- Option :: None => { panic (array! [' Tile: ally not found' ]); },
958
+ Option :: None => {
959
+ panic (array! [' Tile: ally not found' ]);
960
+ },
950
961
};
951
962
};
952
963
attacker . attack (1 , ref defender , ' ATTACK' );
0 commit comments