Browse Source

vec.len instead of on iter

master
SilverEmber 4 years ago
parent
commit
adc165f5d1
  1. 8
      src/apr.rs

8
src/apr.rs

@ -57,7 +57,7 @@ impl Apr {
"/pawn.png", "/pawn.png",
i, i,
1, 1,
behaviours.iter().len() as u8, behaviours.len() as u8,
)); ));
behaviours.push(behaviour::Behaviour::new( behaviours.push(behaviour::Behaviour::new(
vec![(1, 1)], vec![(1, 1)],
@ -71,7 +71,7 @@ impl Apr {
"/pawn.png", "/pawn.png",
i, i,
0, 0,
behaviours.iter().len() as u8, behaviours.len() as u8,
)); ));
behaviours.push(behaviour::Behaviour::new( behaviours.push(behaviour::Behaviour::new(
vec![(1, 2)], vec![(1, 2)],
@ -85,7 +85,7 @@ impl Apr {
"/pawn2.png", "/pawn2.png",
i, i,
c - 2, c - 2,
behaviours.iter().len() as u8, behaviours.len() as u8,
)); ));
behaviours.push(behaviour::Behaviour::new( behaviours.push(behaviour::Behaviour::new(
vec![(1, 1)], vec![(1, 1)],
@ -99,7 +99,7 @@ impl Apr {
"/pawn2.png", "/pawn2.png",
i, i,
c - 1, c - 1,
behaviours.iter().len() as u8, behaviours.len() as u8,
)); ));
behaviours.push(behaviour::Behaviour::new( behaviours.push(behaviour::Behaviour::new(
vec![(1, 2)], vec![(1, 2)],

Loading…
Cancel
Save