Solve the position problem
The position was set to (70,76) for all floating pieces because it was the value received. nowk, if thes values are given (for the characters F & L as specified in the specification in the rapport), the piece is set in a floating state (position = null)
This commit is contained in:
		@ -114,7 +114,8 @@ public class BinaryParser implements FileParser {
 | 
			
		||||
            ret[piece_index] = new Piece(_piece_matrix);
 | 
			
		||||
 | 
			
		||||
            if(saved_data){
 | 
			
		||||
                Vec2 _piece_pos = new Vec2(pieces_positions[piece_index*2], pieces_positions[piece_index*2 + 1]);
 | 
			
		||||
                Vec2 _piece_pos = (pieces_positions[piece_index*2] == 70 && pieces_positions[piece_index*2+1] == 76) ?
 | 
			
		||||
                        null : new Vec2(pieces_positions[piece_index*2], pieces_positions[piece_index*2 + 1]);
 | 
			
		||||
                ret[piece_index].setPosition(_piece_pos);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user