pub fn fromSokoBoard(board: SokoBoard) -> SokoAnnotatedBoard {
    let SokoBoard(board) = board;
    let mut newBoard = Vec::new();
    for row in range(0, board.len()) {
      let mut newRow = Vec::new();
      for col in range(0, board[row].len()) {
        newRow.push( AnnotatedField::new( board[row][col], row, col ) );
      }
      newBoard.push(newRow.move_iter().collect::<Vec<AnnotatedField>>());
    }

    let mut result = SokoAnnotatedBoard{
      board: newBoard.move_iter().collect(),
    };
    reachability(&mut result);
    productivity(&mut result);
    sanityCheck(&result);
    assignIDs(&mut result);
    result
  }
/// Creates a SokoAnnotatedBoard using a Sokoboard.
Creates a SokoAnnotatedBoard using a Sokoboard.
Creates a SokoAnnotatedBoard using a Sokoboard .
pub fn fromSokoBoard(board: SokoBoard) -> SokoAnnotatedBoard {
    let SokoBoard(board) = board;
    let mut newBoard = Vec::new();
    for row in range(0, board.len()) {
      let mut newRow = Vec::new();
      for col in range(0, board[row].len()) {
        newRow.push( AnnotatedField::new( board[row][col], row, col ) );
      }
      newBoard.push(newRow.move_iter().collect::<Vec<AnnotatedField>>());
    }
    let mut result = SokoAnnotatedBoard{
      board: newBoard.move_iter().collect(),
    };
    reachability(&mut result);
    productivity(&mut result);
    sanityCheck(&result);
    assignIDs(&mut result);
    result
  }
pub fn fromSokoBoard ( board : SokoBoard ) -> SokoAnnotatedBoard { let SokoBoard ( board ) = board ; let mut newBoard = Vec :: new ( ) ; for row in range ( 0 , board . len ( ) ) { let mut newRow = Vec :: new ( ) ; for col in range ( 0 , board [ row ] . len ( ) ) { newRow . push ( AnnotatedField :: new ( board [ row ] [ col ] , row , col ) ) ; } newBoard . push ( newRow . move_iter ( ) . collect :: < Vec < AnnotatedField > > ( ) ) ; } let mut result = SokoAnnotatedBoard { board : newBoard . move_iter ( ) . collect ( ) , } ; reachability ( & mut result ) ; productivity ( & mut result ) ; sanityCheck ( & result ) ; assignIDs ( & mut result ) ; result }
Creates a SokoAnnotatedBoard using a Sokoboard.
Creates a SokoAnnotatedBoard using a Sokoboard .
board
SokoBoard
board
SokoBoard