Mercurial > touhou
diff src/th06/ecl_vm.rs @ 703:81232dac8136
ecl: simplify parsing with more combinators.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 23 Aug 2019 17:37:22 +0200 |
parents | b6c351ca0a35 |
children | 464c1b02a996 |
line wrap: on
line diff
--- a/src/th06/ecl_vm.rs +++ b/src/th06/ecl_vm.rs @@ -981,7 +981,7 @@ mod tests { let anm0 = anms.pop().unwrap(); let anm0 = Rc::new(RefCell::new(anm0)); let prng = Rc::new(RefCell::new(Prng::new(0))); - let game = Game::new(prng, Rank::Easy); + let game = Game::new(prng, Rank::EASY); let game = Rc::new(RefCell::new(game)); let enemy = Enemy::new(Position::new(0., 0.), 500, 0, 640, Rc::downgrade(&anm0), Rc::downgrade(&game)); (game, enemy) @@ -992,11 +992,11 @@ mod tests { let (game, enemy) = setup(); let ecl = Ecl { mains: vec![], subs: vec![ Sub { instructions: vec![ - CallSub::new(0, Rank::Easy, SubInstruction::Call(1, 13, 12.)), + CallSub::new(0, Rank::EASY, SubInstruction::Call(1, 13, 12.)), ]}, Sub { instructions: vec![ - CallSub::new(0, Rank::Easy, SubInstruction::Noop()), - CallSub::new(1, Rank::Easy, SubInstruction::Return()), + CallSub::new(0, Rank::EASY, SubInstruction::Noop()), + CallSub::new(1, Rank::EASY, SubInstruction::Return()), ]}, ]}; let mut ecl_runner = EclRunner::new(&ecl, enemy, 0);