@Override
    public void deserialize(ChannelBuffer buffer) {
        type = Board.Type.values()[buffer.readInt()];
        board = new Board();
        for(int col = 0 ; col < board.maxCol; col++) {
            for(int row = 0 ; row < board.maxRow; row++) {
                int type = buffer.readInt(); 
                if(type > 2)
                    return;
                board.set(row, col, Board.Type.values()[type]);
            }
        }
    }