|
|
@ -52,7 +52,13 @@ impl Apr { |
|
|
|
let mut behaviours: Vec<behaviour::Behaviour> = Vec::new(); |
|
|
|
for i in 0..r { |
|
|
|
// white side pawns
|
|
|
|
actors.push(actor::Actor::new(_ctx, "/pawn.png", i, 1, 0)); |
|
|
|
actors.push(actor::Actor::new( |
|
|
|
_ctx, |
|
|
|
"/pawn.png", |
|
|
|
i, |
|
|
|
1, |
|
|
|
behaviours.iter().len() as u8, |
|
|
|
)); |
|
|
|
behaviours.push(behaviour::Behaviour::new( |
|
|
|
vec![(1, 1)], |
|
|
|
vec![(1, -1), (-1, -1)], |
|
|
@ -60,7 +66,13 @@ impl Apr { |
|
|
|
} |
|
|
|
for i in 0..=1 { |
|
|
|
// white side knights
|
|
|
|
actors.push(actor::Actor::new(_ctx, "/pawn.png", i, 0, 0)); |
|
|
|
actors.push(actor::Actor::new( |
|
|
|
_ctx, |
|
|
|
"/pawn.png", |
|
|
|
i, |
|
|
|
0, |
|
|
|
behaviours.iter().len() as u8, |
|
|
|
)); |
|
|
|
behaviours.push(behaviour::Behaviour::new( |
|
|
|
vec![(1, 2)], |
|
|
|
vec![(1, -1), (-1, -1)], |
|
|
@ -68,7 +80,13 @@ impl Apr { |
|
|
|
} |
|
|
|
for i in 0..r { |
|
|
|
// black side pawns
|
|
|
|
actors.push(actor::Actor::new(_ctx, "/pawn2.png", i, c - 2, 0)); |
|
|
|
actors.push(actor::Actor::new( |
|
|
|
_ctx, |
|
|
|
"/pawn2.png", |
|
|
|
i, |
|
|
|
c - 2, |
|
|
|
behaviours.iter().len() as u8, |
|
|
|
)); |
|
|
|
behaviours.push(behaviour::Behaviour::new( |
|
|
|
vec![(1, 1)], |
|
|
|
vec![(1, 1), (-1, 1)], |
|
|
@ -76,7 +94,13 @@ impl Apr { |
|
|
|
} |
|
|
|
for i in 0..=1 { |
|
|
|
// black side knights
|
|
|
|
actors.push(actor::Actor::new(_ctx, "/pawn2.png", i, c - 1, 0)); |
|
|
|
actors.push(actor::Actor::new( |
|
|
|
_ctx, |
|
|
|
"/pawn2.png", |
|
|
|
i, |
|
|
|
c - 1, |
|
|
|
behaviours.iter().len() as u8, |
|
|
|
)); |
|
|
|
behaviours.push(behaviour::Behaviour::new( |
|
|
|
vec![(1, 2)], |
|
|
|
vec![(1, 1), (-1, 1)], |
|
|
|