@@ -272,48 +272,6 @@ impl GameState {
272272 Ok ( new_state)
273273 }
274274
275- pub fn perform_move_unchecked ( & self , move_ : Move ) -> GameState {
276- let mut new_state = self . clone ( ) ;
277- debug ! ( "Current ship before move: {:?}" , new_state. current_ship) ;
278- debug ! ( "Other ship before move: {:?}" , new_state. other_ship) ;
279-
280- for action in & move_. actions {
281- match action. perform_unchecked ( & mut new_state) {
282- ( Some ( current_ship) , Some ( other_ship) ) => {
283- new_state. current_ship = current_ship;
284- new_state. other_ship = other_ship;
285- }
286- ( Some ( current_ship) , None ) => {
287- new_state. current_ship = current_ship;
288- }
289- ( None , Some ( _) ) => { }
290- ( None , None ) => { }
291- }
292- }
293-
294- new_state. pick_up_passenger_current_ship ( ) ;
295- new_state. current_ship . points = new_state
296- . ship_points ( new_state. current_ship )
297- . expect ( "Could not calculate ship points" ) ;
298-
299- if move_. actions . iter ( ) . any ( |a| matches ! ( a, Action :: Push ( _) ) ) {
300- new_state. other_ship . points = new_state
301- . ship_points ( new_state. other_ship )
302- . expect ( "Could not calculate other ship's points" ) ;
303- if new_state. other_ship . speed == 1 {
304- new_state. pick_up_passenger_other_ship ( ) ;
305- }
306- }
307-
308- new_state. last_move = Some ( move_) ;
309- new_state. advance_turn ( ) ;
310-
311- debug ! ( "Current ship after move: {:?}" , new_state. current_ship) ;
312- debug ! ( "Other ship after move: {:?}" , new_state. other_ship) ;
313-
314- new_state
315- }
316-
317275 pub fn advance_turn ( & mut self ) {
318276 let current_ship: & mut Ship = & mut self . current_ship ;
319277
0 commit comments