diff --git a/src/apr.rs b/src/apr.rs index 118663f..92c91c6 100644 --- a/src/apr.rs +++ b/src/apr.rs @@ -49,6 +49,10 @@ impl Apr { pub fn new(_ctx: &mut Context, r: u8, c: u8) -> GameResult { // Load/create resources such as images here. let board = board::make_board(r, c); + let temp_vec: Vec = Vec::new(); + for i in 0..r { + temp_vec.push(Apr::make_actor(_ctx, "/pawn.png", i, 0, 0)); + } Ok(Apr { grid: make_grid(_ctx, r, c, board.board.as_slice())?, board: board, @@ -59,7 +63,8 @@ impl Apr { posn: actor::ActorPosn::BoardPosn { x: 0, y: 0 }, behaviour: 0, }],*/ - actors: vec![Apr::make_actor(_ctx, "/pawn.png", 0, 0, 0)], + //actors: vec![Apr::make_actor(_ctx, "/pawn.png", 0, 0, 0)], + actors: temp_vec, behaviours: vec![behaviour::Behaviour { moves: vec![(0, 1)], }], //the pawn can go ONE forwards